uniqueness not always correct
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique index
dns=> select * from test;
zone|net
- ----+--------
1|1.2.3/24
1|2.3.4/24
1|1.2.3/24
(3 rows)
Once a unique error is reported, uniqueness seems to be maintained.
Also, if you enter 4 values, then try a duplicate, it all works.
The threshold seems to be 3.
A select before the duplicate add also seems to fix it.
~f
Frank Cusack wrote:
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique index
Yes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):
ais=> create table test (zone int4, net int4, unique(zone, net));
^^^^
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
ais=> insert into test (zone, net) values (1, 1);
INSERT 7712479 1
ais=> insert into test (zone, net) values (1, 2);
INSERT 7712480 1
ais=> insert into test (zone, net) values (1, 1);
ERROR: Cannot insert a duplicate key into a unique index
Vadim
From bouncefilter Thu Nov 11 10:29:44 1999
Received: from localhost (IDENT:root@hectic-4.jpl.nasa.gov [128.149.68.206])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA65554;
Thu, 11 Nov 1999 10:29:29 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA05333;
Thu, 11 Nov 1999 15:35:58 GMT
Sender: lockhart@hub.org
Message-ID: <382AE25E.485114A@alumni.caltech.edu>
Date: Thu, 11 Nov 1999 15:35:58 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Stephens <bruce@cenderis.demon.co.uk>
CC: pgsql-hackers@postgreSQL.org, pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Re: [HACKERS] CORBA STATUS
References: <199911101542.PAA05115@linda.lfix.co.uk>
<87emdx7wal.fsf@cenderis.demon.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
It probably makes sense to try to get things working with one ORB, and
then see if it's worth generalising. I'd guess ORBit is a good one to
start with since it's C-based, and it's pretty small: if I have to
install an extra package on my machine just to run PostgreSQL, I'm not
going to mind ORBit, whereas TAO might annoy me (IIRC, TAO is quite
big; I may be thinking of another ORB, though). ORBit does IIOP, I
believe, so that covers GNOME and KDE people.
Yeah, TAO might annoy you; it takes 1.3GB of disk space to build,
though much less once built ;)
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Thu Nov 11 10:38:45 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id KAA66939
for <hackers@postgreSQL.org>; Thu, 11 Nov 1999 10:38:04 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Lodjur.DoCS.UU.SE (e99re41@Lodjur.DoCS.UU.SE [130.238.9.178])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id QAA17316;
Thu, 11 Nov 1999 16:37:49 +0100
Received: from localhost (e99re41@localhost) by Lodjur.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id QAA22491;
Thu, 11 Nov 1999 16:37:47 +0100
X-Authentication-Warning: Lodjur.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Thu, 11 Nov 1999 16:37:47 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <maillist@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Bernard Frankpitt <frankpit@pop.dn.net>,
hackers@postgreSQL.org
Subject: Re: [HACKERS] Indent
In-Reply-To: <199911110230.VAA08219@candle.pha.pa.us>
Message-ID: <Pine.GSO.4.02A.9911111631090.22368-100000@Lodjur.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 10 Nov 1999, Bruce Momjian wrote:
ObFlameBait: Personally I think we should switch over to standard
8-column tabs, but Bruce is apparently still using some medieval editor
in which physical tab widths dictate logical indent levels :-(Vadim is also in agreement on this. Not many editors can handle
cases where tab size is different from indent size. Emacs obviously
can, and Tom has enjoyed pointing out. :-)I am willing to re-open the discussion if we people would prefer
something else.
Trying to redefine a tab to be 4 spaces is asking for trouble. How about
making pgindent replace 8 spaces with a tab and 4 spaces with, well, 4
spaces. This is how emacs handles bsd indent style if you don't change the
tab sizes. And all other editors should be fine with this.
Personally, I'm always in favour of using no tabs at all, because of this
very problem, and just because they annoy me. But I tend to be alone with
that position.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Nov 11 10:46:52 1999
Received: from fep132.fep.ru (mail@fep132.fep.ru [195.230.89.88])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA68243
for <pgsql-hackers@postgresql.org>;
Thu, 11 Nov 1999 10:45:51 -0500 (EST) (envelope-from phd@phd.russ.ru)
Received: from localhost [127.0.0.1] (phd)
by fep132.fep.ru with esmtp (Exim 2.05 #1 (Debian))
id 11lwPu-00041q-00; Thu, 11 Nov 1999 18:45:42 +0300
Date: Thu, 11 Nov 1999 15:45:42 +0000 (GMT)
From: Oleg Broytmann <phd@phd.russ.ru>
X-Sender: phd@fep132.fep.ru
Reply-To: phd2@earthling.net
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
cc: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
Subject: PostgreSQL and Zope
Message-ID: <Pine.LNX.4.20.9911111539010.15448-100000@fep132.fep.ru>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hello!
Ross J. Reedstrom, current maintainer of PostgreSQL Database Adapter for
Zope (based, of course, on PyGreSQL), said very positive words about
PostgreSQL and Postgres team:
"My experience with the PostgreSQL developers and mailing lists are very
similar to the Zope lists: lots of clueful, helpful people (some of them
are the same people ;-) Bugs exist (what software is perfect?), but get
diagnosed and fixed very rapidly. Features are added (and limitations
removed) on a weekly basis. I get the feeling that the pgsql project has
turned a corner in the last year or two: the code base has been cleaned
up, making it easier to understand, and contribute code. New developers
are being attracted, and quickly becoming contributers. It feels like
it's reaching critical mass. The pgsql-hackers list reminds me of the
linux-kernel list from about '92 or so, in that respect.
If you haven't looked at PostgreSQL since it's Postgres95 days, it's
definitely time to look again."
http://www.egroups.com/list/zope/md185412286.html
Yes, I was one of those who sent him "works for me" message. :)
Oleg.
----
Oleg Broytmann http://members.xoom.com/phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.
From bouncefilter Thu Nov 11 10:49:47 1999
Received: from localhost (IDENT:root@hectic-4.jpl.nasa.gov [128.149.68.206])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA68774
for <hackers@postgreSQL.org>; Thu, 11 Nov 1999 10:49:14 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA06283;
Thu, 11 Nov 1999 15:56:18 GMT
Sender: lockhart@hub.org
Message-ID: <382AE722.F1CB966D@alumni.caltech.edu>
Date: Thu, 11 Nov 1999 15:56:18 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bernard Frankpitt <frankpit@pop.dn.net>
CC: Peter Eisentraut <peter_e@gmx.net>, hackers@postgreSQL.org
Subject: Re: [HACKERS] Indent
References: <Pine.LNX.4.20.9911082316520.4161-100000@peter-e.yi.org>
<3829C81A.F195D285@pop.dn.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
;;; Set tab-width in c-mode to 4 spaces
(add-hook 'c-mode-hook
(function (lambda () (set tab-width 4))))
Typo:
set -> setq (from Tom Lane's code)
I'm now a happy emacs camper :)
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
Vadim Mikheev <vadim@krs.ru> writes:
Yes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):
Yes. Looks like the low-order bits of a CIDR address are garbage,
but network_cmp() compares them as though all bits are significant.
So, indeed, it may think two different instances of '1.2.3/24'
are not equal.
The regular inet comparison functions at least *try* to mask out
garbage bits, but I think they get it wrong too --- they should be
taking the smaller of ip_bits(a1) and ip_bits(a2) as the number of
bits to compare. They don't. Thus, for example,
regression=> select '1.2.5/16'::cidr < '1.2.3/24'::cidr;
?column?
--------
f
(1 row)
which looks wrong to me.
In short, it's a bug in the inet data types, not a generic problem
with unique indexes.
regards, tom lane
From bouncefilter Thu Nov 11 13:22:47 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA90993
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 13:22:28 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id NAA05463;
Thu, 11 Nov 1999 13:21:34 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911111821.NAA05463@candle.pha.pa.us>
Subject: psql and \p\g
In-Reply-To: <Pine.GSO.4.02A.9911091006100.10112-103000@Iller.DoCS.UU.SE> from
Peter Eisentraut at "Nov 9, 1999 10:12:50 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Thu, 11 Nov 1999 13:21:34 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I have found that typing:
test=> select * from pg_class\p\g
no longer works. I honors the \p, but ignores the \g.
Any ideas Peter?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 11 13:28:47 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA91734
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 13:27:53 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id NAA05614;
Thu, 11 Nov 1999 13:27:04 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911111827.NAA05614@candle.pha.pa.us>
Subject: failure of \e in psql
In-Reply-To: <Pine.GSO.4.02A.9911091006100.10112-103000@Iller.DoCS.UU.SE> from
Peter Eisentraut at "Nov 9, 1999 10:12:50 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Thu, 11 Nov 1999 13:27:04 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I see that \e no longer works as expected:
test=> select * from pg_class;
...
test=> \e
and in the editor, the query is not appearing. The 'select' query
should appear in the editor because I have not entered a non-backslash
command to clear the query buffer.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 11 14:09:47 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA97250
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 14:09:12 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id TAA04368
for <pgsql-hackers@postgreSQL.org>; Thu, 11 Nov 1999 19:55:56 +0100
Date: Thu, 11 Nov 1999 19:55:56 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: compression in LO and other fields
Message-ID: <Pine.LNX.3.96.991111194051.4055A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
in TODO is the item "Allow compression of large fields or a
compressed field type". It is good idea, but it prabably needs
binary field firstly (or not?).
I see the inv_api and other LO routines, and my idea is add support
for bzip2 stream to the inv_api and allow in current LO routines used
compression. It si good idea?
Karel Zak
------------------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
------------------------------------------------------------------------------
From bouncefilter Thu Nov 11 14:40:48 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA01265
for <pgsql-hackers@postgresql.org>;
Thu, 11 Nov 1999 14:39:44 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id VAA22591
for <pgsql-hackers@postgresql.org>; Thu, 11 Nov 1999 21:41:09 +0200
Sender: theo@flame.flame.co.za
Message-ID: <382B1BD5.8A7BA9DB@flame.co.za>
Date: Thu, 11 Nov 1999 21:41:09 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: Slow - grindingly slow - query
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi
I have a single table with two views. The table effectively contains both
master and detail info (legacy stuff I'm afraid). The query in question is
used to see if any records exist in the detail that do not exist in the
master. The table and index definition is as follows
create table accounts (
domain text,
registrationtype char
/* Plus a couple of other irrelevant fields */
);
create index domain_idx on accounts (domain);
create index domain_type_idx on accounts (domain, registrationtype);
The views are
create view accountmaster as SELECT * from accounts where registrationtype =
'N';
create view accountdetail as SELECT * from accounts where registrationtype <>
'N';
The query is
select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
I started the query about 5 hours ago and it is still running. I did the same
on Informix Online 7 and it took less than two minutes...
My system details are
postgres: 6.5.3
O/S: RH6.0 Kernel 2.2.5-15smp
Explain shows the following
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster) limit 10;
NOTICE: QUERY PLAN:
Seq Scan on accounts (cost=3667.89 rows=34958 width=12)
SubPlan
-> Seq Scan on accounts (cost=3667.89 rows=33373 width=12)
EXPLAIN
The number of records in the two views are
psql -c "select count(*) from accountmaster" coza;
count
-----
45527
(1 row)
psql -c "select count(*) from accountdetail" coza;
count
-----
22803
I know of exactly one record (I put it there myself) that satisfies the
selection criteria.
Any ideas would be appreciated
--------
Regards
Theo
PS We have it running live at http://co.za (commercial domains in South Africa).
From bouncefilter Thu Nov 11 14:52:48 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA03270
for <hackers@postgresql.org>; Thu, 11 Nov 1999 14:52:09 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id VAA22618
for <hackers@postgresql.org>; Thu, 11 Nov 1999 21:53:31 +0200
Sender: theo@flame.flame.co.za
Message-ID: <382B1EBB.E58133A8@flame.co.za>
Date: Thu, 11 Nov 1999 21:53:31 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: hackers@postgresql.org
Subject: Re: [HACKERS] Indent
References: <Pine.GSO.4.02A.9911111631090.22368-100000@Lodjur.DoCS.UU.SE>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Peter Eisentraut wrote:
Personally, I'm always in favour of using no tabs at all, because of this
very problem, and just because they annoy me. But I tend to be alone with
that position.
No you are not :). Twenty odd years of software development have taught me
to remove the tab key from my keyboard. Two spaces do the trick for me and
try to avoid at all costs lines over 80 cols. (I use emacs in vi[per] mode),
even on win98... Oh how I wish we were back in the days of TECO.
--------
Regards
Theo
From bouncefilter Thu Nov 11 15:34:48 1999
Received: from thelab.hub.org (nat198.58.mpoweredpc.net [142.177.198.58])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA08515
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 15:34:07 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id QAA63237;
Thu, 11 Nov 1999 16:33:48 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Thu, 11 Nov 1999 16:33:47 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Theo Kramer <theo@flame.co.za>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
In-Reply-To: <382B1BD5.8A7BA9DB@flame.co.za>
Message-ID: <Pine.BSF.4.10.9911111623200.2296-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
What does:
explain select domain from accountdetail
where domain not in (
select domain from accountmaster);
show?
Also, did you do a 'vacuum analyze' on the tables?
Also, how about if you get rid of the views
SELECT domain FROM account
WHERE registrationtype <> 'N';
*shakes head* am I missing something here? I'm reading your SELECT and
'CREATE VIEW's and don't they negate each other? *scratch head*
If I'm reading your select properly, and with the amount of sleep I've had
recently, its possible I'm not...
The subselect is saying give me all domains whose registration type = 'N'.
The select itself is saying give me all domains whoe registration type <>
'N' (select accountdetail.domain from accountdetail), and narrow that
listing down further to only include those domains whose registration type
<> 'N'?
Either I'm reading this *totally* wrong, or you satisfy that condition
ujust by doing a 'SELECT domain FROM accountdetail;' ...
No?
On Thu, 11 Nov 1999, Theo Kramer wrote:
Hi
I have a single table with two views. The table effectively contains both
master and detail info (legacy stuff I'm afraid). The query in question is
used to see if any records exist in the detail that do not exist in the
master. The table and index definition is as followscreate table accounts (
domain text,
registrationtype char
/* Plus a couple of other irrelevant fields */
);create index domain_idx on accounts (domain);
create index domain_type_idx on accounts (domain, registrationtype);The views are
create view accountmaster as SELECT * from accounts where registrationtype =
'N';
create view accountdetail as SELECT * from accounts where registrationtype <>
'N';The query is
select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);I started the query about 5 hours ago and it is still running. I did the same
on Informix Online 7 and it took less than two minutes...My system details are
postgres: 6.5.3
O/S: RH6.0 Kernel 2.2.5-15smpExplain shows the following
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster) limit 10;
NOTICE: QUERY PLAN:Seq Scan on accounts (cost=3667.89 rows=34958 width=12)
SubPlan
-> Seq Scan on accounts (cost=3667.89 rows=33373 width=12)EXPLAIN
The number of records in the two views are
psql -c "select count(*) from accountmaster" coza;
count
-----
45527
(1 row)psql -c "select count(*) from accountdetail" coza;
count
-----
22803I know of exactly one record (I put it there myself) that satisfies the
selection criteria.Any ideas would be appreciated
--------
Regards
TheoPS We have it running live at http://co.za (commercial domains in South Africa).
************
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Thu Nov 11 15:42:48 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA09627
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 15:41:50 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 4C5075442; Thu, 11 Nov 1999 22:41:31 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <382B29FB.9FFBF61C@tm.ee>
Date: Thu, 11 Nov 1999 22:41:31 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Theo Kramer <theo@flame.co.za>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
References: <382B1BD5.8A7BA9DB@flame.co.za>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Theo Kramer wrote:
Hi
I have a single table with two views. The table effectively contains both
master and detail info (legacy stuff I'm afraid). The query in question is
used to see if any records exist in the detail that do not exist in the
master. The table and index definition is as followscreate table accounts (
domain text,
registrationtype char
/* Plus a couple of other irrelevant fields */
);create index domain_idx on accounts (domain);
create index domain_type_idx on accounts (domain, registrationtype);
try using
create index registrationtype_index on accounts (registrationtype);
------
Hannu
From bouncefilter Thu Nov 11 15:49:48 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA10559
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 15:48:53 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id WAA22758
for <pgsql-hackers@postgreSQL.org>; Thu, 11 Nov 1999 22:50:14 +0200
Sender: theo@flame.flame.co.za
Message-ID: <382B2C06.356F9234@flame.co.za>
Date: Thu, 11 Nov 1999 22:50:14 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
References: <Pine.BSF.4.10.9911111623200.2296-100000@thelab.hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The Hermit Hacker wrote:
What does:
explain select domain from accountdetail
where domain not in (
select domain from accountmaster);show?
NOTICE: QUERY PLAN:
Seq Scan on accounts (cost=3667.89 rows=34958 width=12)
SubPlan
-> Seq Scan on accounts (cost=3667.89 rows=33373 width=12)
EXPLAIN
Also, did you do a 'vacuum analyze' on the tables?
Yes - should have mentioned that.
Also, how about if you get rid of the views
SELECT domain FROM account
WHERE registrationtype <> 'N';*shakes head* am I missing something here? I'm reading your SELECT and
'CREATE VIEW's and don't they negate each other? *scratch head*
No - a domain can both be new (registrationtype 'N') and updated
(registrationtype 'U') ie. one or more rows with the same domain with one row
containing a domain with registrationtype 'N' and zero or more rows containing
the same domain with registrationtype not 'N'. The reason for the <> 'N' and
not just = 'U' is that we have a couple of rows with registrationtype set to
something else.
The subselect is saying give me all domains whose registration type = 'N'.
The select itself is saying give me all domains whoe registration type <>
'N' (select accountdetail.domain from accountdetail), and narrow that
listing down further to only include those domains whose registration type
<> 'N'?Either I'm reading this *totally* wrong, or you satisfy that condition
ujust by doing a 'SELECT domain FROM accountdetail;' ...No?
No :). See above
--------
Regards
Theo
Import Notes
Reply to msg id not found: YourmessageofThu11Nov1999170725+0700382A955D.56098552@krs.ru | Resolved by subject fallback
I'm not sure that a '<' comparison is really meaningful for inet/cidr?
At least not the '<' comparison you are doing. For networks (cf hosts),
the only really meanininful operators are '<<' (contained within), etc.
A nice easy fix might be to make sure that the unmasked portion of the
data is set to all 0's when storing the data.
~f
ps. I'm not subscribed to the lists so this will probably bounce. Please
repost for me.
On Thu, 11 Nov 1999, "Tom" == Tom Lane wrote:
Tom> Vadim Mikheev <vadim@krs.ru> writes:
+> Yes, I reproduced this (Solaris 2.5/sparc). Seems like CIDR
+> problem(??!):
Tom> Yes. Looks like the low-order bits of a CIDR address are garbage,
Tom> but network_cmp() compares them as though all bits are significant.
Tom> So, indeed, it may think two different instances of '1.2.3/24' are
Tom> not equal.
Tom> The regular inet comparison functions at least *try* to mask out
Tom> garbage bits, but I think they get it wrong too --- they should be
Tom> taking the smaller of ip_bits(a1) and ip_bits(a2) as the number of
Tom> bits to compare. They don't. Thus, for example,
Tom> regression=> select '1.2.5/16'::cidr < '1.2.3/24'::cidr;
Tom> ?column?
Tom> --------
Tom> f
Tom> (1 row)
Tom> which looks wrong to me.
Tom> In short, it's a bug in the inet data types, not a generic problem
Tom> with unique indexes.
Tom> regards, tom lane
On Thu, 11 Nov 1999,
"Tom" == Tom Lane wrote:
Tom> Vadim Mikheev <vadim@krs.ru> writes:
+> Yes, I reproduced this (Solaris 2.5/sparc).
+> Seems like CIDR problem(??!):
Tom> Yes. Looks like the low-order bits of a CIDR address are garbage,
Tom> but network_cmp() compares them as though all bits are significant.
Tom> So, indeed, it may think two different instances of '1.2.3/24'
Tom> are not equal.
Tom> The regular inet comparison functions at least *try* to mask out
Tom> garbage bits, but I think they get it wrong too --- they should be
Tom> taking the smaller of ip_bits(a1) and ip_bits(a2) as the number of
Tom> bits to compare. They don't. Thus, for example,
Tom> regression=> select '1.2.5/16'::cidr < '1.2.3/24'::cidr;
Tom> ?column?
Tom> --------
Tom> f
Tom> (1 row)
Tom> which looks wrong to me.
Tom> In short, it's a bug in the inet data types, not a generic problem
Tom> with unique indexes.
Tom> regards, tom lane
From bouncefilter Thu Nov 11 16:05:49 1999
Received: from ns1.foothill.net (root@ns1.foothill.net [206.170.175.1])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA12795
for <pgsql-interfaces@postgresql.org>;
Thu, 11 Nov 1999 16:04:55 -0500 (EST)
(envelope-from stephen@sealteam.demon.co.uk)
Received: from stephens (redwood-Q5.foothill.net [204.131.12.5])
by ns1.foothill.net (8.9.3/8.9.3) with SMTP id MAA05171
for <pgsql-interfaces@postgresql.org>;
Thu, 11 Nov 1999 12:50:54 -0800 (PST)
From: "Stephen Martin" <stephen@sealteam.demon.co.uk>
To: <pgsql-interfaces@postgresql.org>
Subject: Error on db recovery..
Date: Thu, 11 Nov 1999 13:00:57 -0800
Message-ID: <NDBBKKNKKLBACABPPCCNAEPPCKAA.stephen@sealteam.demon.co.uk>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
In-Reply-To: <382AE25E.485114A@alumni.caltech.edu>
Importance: Normal
Hello,
I am attempting to recover a database previously secured with pg_dump,
however on attempting to restore using
pgsql < db_security_file
I get the following error(s)
ERROR: tbl_breeders relation already exists
I have removed all data tables and user from the database,
what am I over looking?
Stephen
From bouncefilter Thu Nov 11 16:09:50 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA13431
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 16:09:23 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id QAA16204;
Thu, 11 Nov 1999 16:08:10 -0500 (EST)
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
In-reply-to: Your message of Thu, 11 Nov 1999 19:55:56 +0100 (CET)
<Pine.LNX.3.96.991111194051.4055A-100000@ara.zf.jcu.cz>
Date: Thu, 11 Nov 1999 16:08:10 -0500
Message-ID: <16202.942354490@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Karel Zak - Zakkr <zakkr@zf.jcu.cz> writes:
I see the inv_api and other LO routines, and my idea is add support
for bzip2 stream to the inv_api and allow in current LO routines used
compression. It si good idea?
LO is a dead end. What we really want to do is eliminate tuple-size
restrictions and then have large ordinary fields (probably of type
bytea) in regular tuples. I'd suggest working on compression in that
context, say as a new data type called "bytez" or something like that.
bytez would act just like bytea except the on-disk representation would
be compressed. A compressed variant of type "text" would also be useful.
In the long run this will be much more useful and easier to work with
than adding another frammish to large objects.
regards, tom lane
From bouncefilter Thu Nov 11 16:09:49 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA13406
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 16:08:53 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id XAA22816
for <pgsql-hackers@postgreSQL.org>; Thu, 11 Nov 1999 23:10:20 +0200
Sender: theo@flame.flame.co.za
Message-ID: <382B30BC.E31B0C20@flame.co.za>
Date: Thu, 11 Nov 1999 23:10:20 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
References: <382B1BD5.8A7BA9DB@flame.co.za> <382B29FB.9FFBF61C@tm.ee>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hannu Krosing wrote:
try using
create index registrationtype_index on accounts (registrationtype);
OK did that, and am rerunning the query.
The explain now shows
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
NOTICE: QUERY PLAN:
Seq Scan on accounts (cost=3667.89 rows=34958 width=12)
SubPlan
-> Index Scan using registrationtype_idx on accounts (cost=2444.62
rows=33373 width=12)
EXPLAIN
Will let you all know when it completes.
--------
Regards
Theo
From bouncefilter Thu Nov 11 16:18:48 1999
Received: (from news@localhost) by hub.org (8.9.3/8.9.3) id QAA14864
for pgsql-hackers@postgresql.org; Thu, 11 Nov 1999 16:18:01 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: hub.org: news set sender to <news> using -f
Message-ID: <382B348A.B9B3F57B@cpsgroup.com>
Date: Thu, 11 Nov 1999 15:26:35 -0600
From: Bryan Ingram <bingram@cpsgroup.com>
Reply-To: bingram@cpsgroup.com
X-Mailer: Mozilla 4.6 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
X-Newsgroups: comp.databases.postgresql.hackers
Subject: syncing, replicating & crash recovery Q's
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: 11 Nov 1999 15:12:56 -0600, 216.207.61.67
Lines: 49
X-Authenticated-User: boneyjames
X-Report: Report abuse to abuse@newsfeeds.com
X-Abuse-Info: Please be sure to forward a copy of ALL headers,
INCLUDING the body
X-Abuse-Info2: ALL Spam complaints are acted upon within 24 hours!
Organization: Newsfeeds.com http://www.newsfeeds.com 60,
000+ UNCENSORED Newsgroups.
To: pgsql-hackers@postgresql.org
Hi,
I was hoping one of the contributors here on the list could point me in
the right direction with some of the issues I am currently facing with
postgres 6.5.0
I apologize if these topics have been thoroughly discussed before, but I
wasn't able to find anything in the archives.
For these questions, assume that the slave and master are separate
machines each running postmaster, but the postgres data files are
mounted on the same physical (but on different partitions) raid-5
server.
1) real-time syncing
Is it possible to have a "slave" postgres server (a separate machine)
doing nothing but syncing to a master? If the master were to go down,
the slave would be up-to-date and ready to handle connection requests
almost instantly.
2) Replicating
If #1 isn't possible, what would be the best way to periodically sync
the two databases? Would it be possible to exchange deltas (the slave's
only job is to duplicate the master) or would a complete backup and
restore frome one machine to another be necessary?
3) Crash-Recovery!!
The documentation does not have this section filled in. So I'm not even
sure whether or not postgres maintains transaction logging or some other
way to recover from a serious crash. Can someone please give me the
scoop on the current state of this, or what should be done to recover
from a crash?
Are there any other concerns or technologies I'm not aware of that might
be of use?
All comments appreciated!
Thanks,
Bryan Ingram
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
From bouncefilter Thu Nov 11 16:29:49 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA17061
for <hackers@postgresql.org>; Thu, 11 Nov 1999 16:29:06 -0500 (EST)
(envelope-from peter@peter-e.yi.org)
Received: from regulus.its.uu.se ([130.238.7.19]:64453 "EHLO peter-e.yi.org")
by merganser.its.uu.se with ESMTP id <S.s8nIQ203139>;
Thu, 11 Nov 1999 22:29:00 +0100
Received: from peter (helo=localhost)
by peter-e.yi.org with local-esmtp (Exim 3.02 #2)
id 11m1q8-0000ET-00; Thu, 11 Nov 1999 22:33:08 +0100
Date: Thu, 11 Nov 1999 22:33:08 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Zeugswetter Andreas SEV <ZeugswetterA@wien.spardat.at>,
"'hackers@postgresql.org'" <hackers@postgresql.org>
Subject: Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql
In-Reply-To: <13363.942288057@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.20.9911112230211.442-100000@peter-e.yi.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: Peter Eisentraut <peter@peter-e.yi.org>
On 1999-11-10, Tom Lane mentioned:
AFAIK it's not *essential* to make Postgres and Unix UIDs the same
... but I think it is convenient to do so from an admin standpoint.
(One less set of numbers to keep track of, and one fewer way to get
confused about who is who.) I would not like to see you remove a
feature that makes it easy to do that.Of course there's no value in it if you are running a setup in which
not all the Postgres users have Unix-system accounts. But that doesn't
mean there is no value in it for installations where there is such a
correspondence.
Excuse my ignorance once again, but
1) Why bother about those sysids at all? To the end user/administrator they
have about the same informational value as the oid of the float4 type. As
long as you always write "float4" or "username" you don't have to bother.
2) The mere fact of mentioning or even prompting for these ids confuses users.
3) If you really "keep track" of user ids (Unix or PostgreSQL) you really don't
have enough users or a really superior brain.
4) The purpose of the wrapper scripts was to provide "wrappers" around the
various SQL commands. If you do something in the scripts that you can't do in
"SQL" then we'll never stop having these confused users that at one point
almost caused us to remove the scripts altogether.
5) How exactly are you supposed to set the uid? The behaviour of
INSERT INTO pg_shadow VALUES (...);
and
UPDATE pg_shadow SET usesysid = ...;
is non-deterministic at best, unfortunately. The proper fix (ignoring the first
4 points above) would be to provide an extension to CREATE/ALTER USER, and
*then* we can extend the scripts that way.
I seems to me that the scripts were written before there even was a CREATE USER
command and then the functionality was just carried over without much
contemplation.
Well, okay, everyone that wants to set their PostgreSQL user id
explicitly, send me a note and I'll put it back in, which ever way.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Nov 11 16:32:49 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA17784
for <pgsql-hackers@postgresql.org>;
Thu, 11 Nov 1999 16:32:27 -0500 (EST)
(envelope-from peter@peter-e.yi.org)
Received: from regulus.its.uu.se ([130.238.7.19]:64856 "EHLO peter-e.yi.org")
by merganser.its.uu.se with ESMTP id <S.s8nLU211319>;
Thu, 11 Nov 1999 22:32:16 +0100
Received: from peter (helo=localhost)
by peter-e.yi.org with local-esmtp (Exim 3.02 #2)
id 11m1tK-0000Ea-00; Thu, 11 Nov 1999 22:36:26 +0100
Date: Thu, 11 Nov 1999 22:36:26 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <maillist@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: psql and \p\g
In-Reply-To: <199911111821.NAA05463@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.20.9911112233310.442-100000@peter-e.yi.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: Peter Eisentraut <peter@peter-e.yi.org>
On 1999-11-11, Bruce Momjian mentioned:
I have found that typing:
test=> select * from pg_class\p\g
no longer works. I honors the \p, but ignores the \g.
Any ideas Peter?
select * from foo \p \g
This was done to normalize the grammar a little bit (haha, very
funny). In particular it allows this sort of stuff:
=> select * from foo \p \o out.txt \g \\ select * from foo 2 \x \g
etc.
Is it *really* necessary to be able to omit the space?
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Nov 11 16:37:49 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA18632
for <hackers@postgreSQL.org>; Thu, 11 Nov 1999 16:37:24 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id QAA16353;
Thu, 11 Nov 1999 16:36:39 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Zeugswetter Andreas SEV <ZeugswetterA@wien.spardat.at>,
"'hackers@postgresql.org'" <hackers@postgreSQL.org>
Subject: Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql
In-reply-to: Your message of Thu, 11 Nov 1999 22:33:08 +0100 (CET)
<Pine.LNX.4.20.9911112230211.442-100000@peter-e.yi.org>
Date: Thu, 11 Nov 1999 16:36:39 -0500
Message-ID: <16351.942356199@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
5) How exactly are you supposed to set the uid? The behaviour of
INSERT INTO pg_shadow VALUES (...);
and
UPDATE pg_shadow SET usesysid = ...;
is non-deterministic at best, unfortunately.
INSERT seems to have worked fine in the old version of createuser...
but I agree CREATE/ALTER USER ought to have the same functionality.
regards, tom lane
From bouncefilter Thu Nov 11 16:33:49 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA17912
for <pgsql-hackers@postgresql.org>;
Thu, 11 Nov 1999 16:33:47 -0500 (EST)
(envelope-from peter@peter-e.yi.org)
Received: from regulus.its.uu.se ([130.238.7.19]:62349 "EHLO peter-e.yi.org")
by merganser.its.uu.se with ESMTP id <S.s8nMn199043>;
Thu, 11 Nov 1999 22:33:39 +0100
Received: from peter (helo=localhost)
by peter-e.yi.org with local-esmtp (Exim 3.02 #2)
id 11m1uf-0000Ec-00; Thu, 11 Nov 1999 22:37:49 +0100
Date: Thu, 11 Nov 1999 22:37:49 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <maillist@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: failure of \e in psql
In-Reply-To: <199911111827.NAA05614@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.20.9911112236460.442-100000@peter-e.yi.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: Peter Eisentraut <peter@peter-e.yi.org>
On 1999-11-11, Bruce Momjian mentioned:
I see that \e no longer works as expected:
test=> select * from pg_class;
...
test=> \eand in the editor, the query is not appearing. The 'select' query
should appear in the editor because I have not entered a non-backslash
command to clear the query buffer.
Well, once you send it, it's sent and gone. You have to edit it before you
send it. I guess I'm not following you. Of course you should somehow be
able to re-edit the previous query. Hmm.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Nov 11 16:52:50 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA21378
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 16:52:07 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id QAA16006;
Thu, 11 Nov 1999 16:50:19 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911112150.QAA16006@candle.pha.pa.us>
Subject: Re: psql and \p\g
In-Reply-To: <Pine.LNX.4.20.9911112233310.442-100000@peter-e.yi.org> from
Peter
Eisentraut at "Nov 11, 1999 10:36:26 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Thu, 11 Nov 1999 16:50:18 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On 1999-11-11, Bruce Momjian mentioned:
I have found that typing:
test=> select * from pg_class\p\g
no longer works. I honors the \p, but ignores the \g.
Any ideas Peter?
select * from foo \p \g
This was done to normalize the grammar a little bit (haha, very
funny). In particular it allows this sort of stuff:
=> select * from foo \p \o out.txt \g \\ select * from foo 2 \x \g
etc.Is it *really* necessary to be able to omit the space?
Yes, I believe it is, in the sense that many people are used to doing
them together. Can a backslash trigger some separation of commands, or
at least \p\g be recognized correctly. I don't think there are other
meaningful combinations.
Can you add a unix-style timestamp for \T?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 11 16:52:49 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA21422
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 16:52:31 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id QAA16058;
Thu, 11 Nov 1999 16:51:14 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911112151.QAA16058@candle.pha.pa.us>
Subject: Re: failure of \e in psql
In-Reply-To: <Pine.LNX.4.20.9911112236460.442-100000@peter-e.yi.org> from
Peter
Eisentraut at "Nov 11, 1999 10:37:49 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Thu, 11 Nov 1999 16:51:14 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On 1999-11-11, Bruce Momjian mentioned:
I see that \e no longer works as expected:
test=> select * from pg_class;
...
test=> \eand in the editor, the query is not appearing. The 'select' query
should appear in the editor because I have not entered a non-backslash
command to clear the query buffer.Well, once you send it, it's sent and gone. You have to edit it before you
send it. I guess I'm not following you. Of course you should somehow be
able to re-edit the previous query. Hmm.
That is how it used to work. You run the query, get an error, and \e
pulls it into the editor for fixing.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 11 16:57:49 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA22207
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 16:57:45 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id QAA16516;
Thu, 11 Nov 1999 16:56:36 -0500 (EST)
To: Theo Kramer <theo@flame.co.za>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
In-reply-to: Your message of Thu, 11 Nov 1999 21:41:09 +0200
<382B1BD5.8A7BA9DB@flame.co.za>
Date: Thu, 11 Nov 1999 16:56:36 -0500
Message-ID: <16514.942357396@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Theo Kramer <theo@flame.co.za> writes:
The query is
select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
Try something like
select accountdetail.domain from accountdetail where
not exists (select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);
I believe this is in the FAQ...
regards, tom lane
From bouncefilter Thu Nov 11 17:04:49 1999
Received: from perio.unlp.edu.ar (IDENT:root@perio.unlp.edu.ar [163.10.16.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA23332
for <pgsql-interfaces@postgresql.org>;
Thu, 11 Nov 1999 17:04:36 -0500 (EST)
(envelope-from ser@perio.unlp.edu.ar)
Received: from speedy ([163.10.16.11])
by perio.unlp.edu.ar (8.9.3/8.8.7) with SMTP id TAA25062;
Thu, 11 Nov 1999 19:04:45 GMT
From: "Sergio A. Kessler" <ser@perio.unlp.edu.ar>
Message-Id: <SAK.1999.11.11.ifhlcnef@speedy>
In-Reply-To: <NDBBKKNKKLBACABPPCCNAEPPCKAA.stephen@sealteam.demon.co.uk>
Date: Thu, 11 Nov 1999 19:04:20 -0300
X-Priority: 3
X-Mailer: Correo F���cil
To: pgsql-interfaces@postgresql.org, stephen@sealteam.demon.co.uk
MIME-Version: 1.0
Subject: Re: [INTERFACES] Error on db recovery..
Content-Type: Text/Plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8Bit
"Stephen Martin" <stephen@sealteam.demon.co.uk> el d���a Thu, 11 Nov 1999
13:00:57 -0800, escribi���:
Hello,
I am attempting to recover a database previously secured with pg_dump,
however on attempting to restore usingpgsql < db_security_file
bad, bad ...
go to /usr/doc/postgres and read ...
Sergio
From bouncefilter Thu Nov 11 17:17:49 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA25448
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 17:16:57 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA16638;
Thu, 11 Nov 1999 17:16:12 -0500 (EST)
To: Bruce Momjian <maillist@candle.pha.pa.us>
cc: Peter Eisentraut <peter_e@gmx.net>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: psql and \p\g
In-reply-to: Your message of Thu, 11 Nov 1999 16:50:18 -0500 (EST)
<199911112150.QAA16006@candle.pha.pa.us>
Date: Thu, 11 Nov 1999 17:16:12 -0500
Message-ID: <16636.942358572@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <maillist@candle.pha.pa.us> writes:
This was done to normalize the grammar a little bit (haha, very
funny). In particular it allows this sort of stuff:
=> select * from foo \p \o out.txt \g \\ select * from foo 2 \x \g
etc.Is it *really* necessary to be able to omit the space?
Yes, I believe it is, in the sense that many people are used to doing
them together. Can a backslash trigger some separation of commands, or
at least \p\g be recognized correctly. I don't think there are other
meaningful combinations.
It'd probably be sufficient if backslash-commands that never take
parameters can be adjacent to a following backslash command.
regards, tom lane
From bouncefilter Thu Nov 11 18:21:50 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA34311
for <hackers@postgreSQL.org>; Thu, 11 Nov 1999 18:20:52 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id PAA16254;
Thu, 11 Nov 1999 15:20:21 -0800 (PST)
Message-Id: <3.0.1.32.19991111151615.00fd5130@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 11 Nov 1999 15:16:15 -0800
To: Theo Kramer <theo@flame.co.za>, hackers@postgreSQL.org
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Indent
In-Reply-To: <382B1EBB.E58133A8@flame.co.za>
References: <Pine.GSO.4.02A.9911111631090.22368-100000@Lodjur.DoCS.UU.SE>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 09:53 PM 11/11/99 +0200, Theo Kramer wrote:
Peter Eisentraut wrote:
Personally, I'm always in favour of using no tabs at all, because of this
very problem, and just because they annoy me. But I tend to be alone with
that position.No you are not :). Twenty odd years of software development have taught me
to remove the tab key from my keyboard. Two spaces do the trick for me and
try to avoid at all costs lines over 80 cols. (I use emacs in vi[per] mode),
even on win98... Oh how I wish we were back in the days of TECO.
TECO! If you were to dig up a copy of the original manual for
Dec's OS/8 TECO, you'd see a reference to me on the first page. Not
by name, but by organization, for having done the first version.
Sheesh, those where old days.
Anyway, I too avoid tabs. Life's too short to figure out how to
make all the tools I use tab the way I want them to.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Nov 11 18:45:50 1999
Received: from atbib.be (IDENT:root@a01-148.antw.online.be [62.112.2.148])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA37220
for <pgsql-hackers@postgresql.org>;
Thu, 11 Nov 1999 18:45:46 -0500 (EST) (envelope-from fve@atbib.be)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id BAA08204
for <pgsql-hackers@postgresql.org>; Fri, 12 Nov 1999 01:45:20 +0100
Message-Id: <3.0.6.32.19991112005011.0086ce30@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Fri, 12 Nov 1999 00:50:11 +0100
To: pgsql-hackers@postgresql.org
From: Frans Van Elsacker <fve@atbib.be>
Subject: new version 6.5.3
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Probably it is of interest for jou, or i did something very stupid:
I had a little piece of code who works fine up till know, just after
installing
the version 6.5.3 i got the message 'parse error near union'
create table work as
select * from opdracht
union
select * from opdrachtproost
I know i can solve the problem with
insert into work in stead of the union keyword, but it is enoying that all
the programs had to be recompiled
many thanks, its a good product
Frans
From bouncefilter Thu Nov 11 18:50:50 1999
Received: from atbib.be (IDENT:root@a01-148.antw.online.be [62.112.2.148])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA37748
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 18:50:17 -0500 (EST) (envelope-from fve@atbib.be)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id BAA08262
for <pgsql-hackers@postgreSQL.org>; Fri, 12 Nov 1999 01:49:57 +0100
Message-Id: <3.0.6.32.19991112005448.00876670@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Fri, 12 Nov 1999 00:54:48 +0100
To: pgsql-hackers@postgreSQL.org
From: Frans Van Elsacker <fve@atbib.be>
Subject:
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
subscribe
From bouncefilter Thu Nov 11 18:53:50 1999
Received: from atbib.be (IDENT:root@a01-148.antw.online.be [62.112.2.148])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA37869
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 18:53:40 -0500 (EST) (envelope-from fve@atbib.be)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id BAA08295
for <pgsql-hackers@postgreSQL.org>; Fri, 12 Nov 1999 01:53:19 +0100
Message-Id: <3.0.6.32.19991112005811.00877450@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Fri, 12 Nov 1999 00:58:11 +0100
To: pgsql-hackers@postgreSQL.org
From: Frans Van Elsacker <fve@atbib.be>
Subject: subscribe
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
subscribe
From bouncefilter Thu Nov 11 19:05:50 1999
Received: from atbib.be (IDENT:root@a02-063.antw.online.be [62.112.3.63])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA39360
for <pgsql-hackers@postgresql.org>;
Thu, 11 Nov 1999 19:05:35 -0500 (EST) (envelope-from fve@atbib.be)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id CAA08404
for <pgsql-hackers@postgresql.org>; Fri, 12 Nov 1999 02:05:14 +0100
Message-Id: <3.0.6.32.19991112011006.00876c00@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Fri, 12 Nov 1999 01:10:06 +0100
To: pgsql-hackers@postgresql.org
From: Frans Van Elsacker <fve@atbib.be>
Subject: union problem version 6.5.3
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Probably it is of interest for jou, or i did something very stupid:
I had a little piece of code who works fine up till know, just after
installing
the version 6.5.3 i got the message 'parse error near union'
create table work as
select * from opdracht
union
select * from opdrachtproost
I know i can solve the problem with
insert into work in stead of the union keyword, but it is enoying that all
the programs had to be recompiled
many thanks, its a good product
Frans
From bouncefilter Thu Nov 11 21:01:51 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA56809
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 21:01:44 -0500 (EST)
(envelope-from t-ishii@srapc451.sra.co.jp)
Received: from srapc451.sra.co.jp (srapc451 [133.137.44.37])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id LAA11506;
Fri, 12 Nov 1999 11:00:08 +0900 (JST)
Received: from srapc451.sra.co.jp (localhost [127.0.0.1]) by
srapc451.sra.co.jp (8.8.8/3.5Wpl7) with ESMTP id LAA19911;
Fri, 12 Nov 1999 11:00:08 +0900 (JST)
Message-Id: <199911120200.LAA19911@srapc451.sra.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
From: Tatsuo Ishii <t-ishii@sra.co.jp>
Reply-To: t-ishii@sra.co.jp
In-reply-to: Your message of Thu, 11 Nov 1999 16:08:10 EST.
<16202.942354490@sss.pgh.pa.us>
Date: Fri, 12 Nov 1999 11:00:08 +0900
Sender: t-ishii@srapc451.sra.co.jp
LO is a dead end. What we really want to do is eliminate tuple-size
restrictions and then have large ordinary fields (probably of type
bytea) in regular tuples. I'd suggest working on compression in that
context, say as a new data type called "bytez" or something like that.
It sounds ideal but I remember that Vadim said inserting a 2GB record
is not good idea since it will be written into the log too. If it's a
necessary limitation from the point of view of WAL, we have to accept
it, I think.
BTW, I still don't have enough time to run the huge sort tests on
6.5.x. Probably I would have chance next week to do that...
---
Tatsuo Ishii
From bouncefilter Thu Nov 11 22:41:53 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id WAA68559
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 22:41:38 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11m7SM-0003kLC; Fri, 12 Nov 99 04:32 MET
Message-Id: <m11m7SM-0003kLC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] compression in LO and other fields
To: t-ishii@sra.co.jp
Date: Fri, 12 Nov 1999 04:32:58 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, zakkr@zf.jcu.cz, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199911120200.LAA19911@srapc451.sra.co.jp> from "Tatsuo Ishii" at
Nov 12, 99 11:00:08 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tatsuo Ishii wrote:
LO is a dead end. What we really want to do is eliminate tuple-size
restrictions and then have large ordinary fields (probably of type
bytea) in regular tuples. I'd suggest working on compression in that
context, say as a new data type called "bytez" or something like that.It sounds ideal but I remember that Vadim said inserting a 2GB record
is not good idea since it will be written into the log too. If it's a
necessary limitation from the point of view of WAL, we have to accept
it, I think.
Just in case someone want to implement a complete compressed
data type (including comarision functions, operators and
indexing default operator class).
I already made some tests with a type I called 'lztext'
locally. Only the input-/output-functions exist so far and
as the name might suggest, it would be an alternative for
'text'. It uses a simple but fast, byte oriented LZ backward
pointing method. No Huffman coding or variable offset/size
tagging. First byte of a chunk tells bitwise if the next
following 8 items are raw bytes to copy or 12 bit offset, 4
bit size copy information. That is max back offset 4096 and
max match size 17 bytes.
What made it my preferred method was the fact, that
decompression is done entirely using the already decompressed
portion of the data, so it does not need any code tables or
the like at that time.
It is really FASTEST on decompression, which I assume would
be the mostly often used operation on huge data types. With
some care, comparision could be done on the fly while
decompressing two values, so that the entire comparision can
be aborted at the occurence of the first difference.
The compression rates aren't that giantic. I've got 30-50%
for rule plan strings (size limit on views!!!). And the
method used only allows for buffer back references of 4K
offsets at most, so the rate will not grow for larger data
chunks. That's a heavy tradeoff between compression rate and
no memory leakage for sure and speed, I know, but I prefer
not to force it, instead I usually use a bigger hammer (the
tuple size limit is still our original problem - and another
IBM 72GB disk doing 22-37 MB/s will make any compressing data
type obsolete then).
Sorry for the compression specific slang here. Well, anyone
interested in the code?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Nov 11 22:55:53 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA69821
for <pgsql-hackers@postgreSQL.org>;
Thu, 11 Nov 1999 22:55:00 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id WAA26738;
Thu, 11 Nov 1999 22:50:16 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911120350.WAA26738@candle.pha.pa.us>
Subject: Re: [HACKERS] compression in LO and other fields
In-Reply-To: <m11m7SM-0003kLC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Nov 12, 1999 04:32:58 am"
To: Jan Wieck <wieck@debis.com>
Date: Thu, 11 Nov 1999 22:50:16 -0500 (EST)
CC: t-ishii@sra.co.jp, tgl@sss.pgh.pa.us, zakkr@zf.jcu.cz,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
The compression rates aren't that giantic. I've got 30-50%
for rule plan strings (size limit on views!!!). And the
method used only allows for buffer back references of 4K
offsets at most, so the rate will not grow for larger data
chunks. That's a heavy tradeoff between compression rate and
no memory leakage for sure and speed, I know, but I prefer
not to force it, instead I usually use a bigger hammer (the
tuple size limit is still our original problem - and another
IBM 72GB disk doing 22-37 MB/s will make any compressing data
type obsolete then).Sorry for the compression specific slang here. Well, anyone
interested in the code?
In contrib?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Nov 12 00:07:54 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA81540
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 00:07:38 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id HAA23704
for <pgsql-hackers@postgreSQL.org>; Fri, 12 Nov 1999 07:09:15 +0200
Sender: theo@flame.flame.co.za
Message-ID: <382BA0FB.82D96E3C@flame.co.za>
Date: Fri, 12 Nov 1999 07:09:15 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
References: <16514.942357396@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Theo Kramer <theo@flame.co.za> writes:
The query is
select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
This takes more than 5 hours and 30 minutes.
Try something like
select accountdetail.domain from accountdetail where
not exists (select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);
This takes 5 seconds - wow!
I believe this is in the FAQ...
Will check out the FAQs. Many thanks.
--------
Regards
Theo
From bouncefilter Fri Nov 12 00:52:55 1999
Received: from sunpine.krs.ru (SunPine.krs.ru [195.161.16.37])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA87549
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 00:52:40 -0500 (EST) (envelope-from vadim@krs.ru)
Received: from krs.ru (dune.krs.ru [195.161.16.38])
by sunpine.krs.ru (8.8.8/8.8.8) with ESMTP id MAA10217;
Fri, 12 Nov 1999 12:52:30 +0700 (KRS)
Sender: root@sunpine.krs.ru
Message-ID: <382BAB1D.4AF25BFE@krs.ru>
Date: Fri, 12 Nov 1999 12:52:29 +0700
From: Vadim Mikheev <vadim@krs.ru>
Organization: OJSC Rostelecom (Krasnoyarsk)
X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-RELEASE i386)
X-Accept-Language: ru, en
MIME-Version: 1.0
To: Theo Kramer <theo@flame.co.za>
CC: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
References: <16514.942357396@sss.pgh.pa.us> <382BA0FB.82D96E3C@flame.co.za>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Theo Kramer wrote:
Try something like
select accountdetail.domain from accountdetail where
not exists (select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);This takes 5 seconds - wow!
I did the same on Informix Online 7 and it took less than two minutes...
^^^^^^^^^^^
Could you run the query above in Informix?
How long would it take to complete?
Vadim
From bouncefilter Fri Nov 12 01:08:55 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA89650
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 01:08:41 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id BAA01516;
Fri, 12 Nov 1999 01:07:46 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911120607.BAA01516@candle.pha.pa.us>
Subject: Re: failure of \e in psql
In-Reply-To: <Pine.LNX.4.20.9911112236460.442-100000@peter-e.yi.org> from
Peter
Eisentraut at "Nov 11, 1999 10:37:49 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 12 Nov 1999 01:07:46 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On 1999-11-11, Bruce Momjian mentioned:
I see that \e no longer works as expected:
test=> select * from pg_class;
...
test=> \eand in the editor, the query is not appearing. The 'select' query
should appear in the editor because I have not entered a non-backslash
command to clear the query buffer.Well, once you send it, it's sent and gone. You have to edit it before you
send it. I guess I'm not following you. Of course you should somehow be
able to re-edit the previous query. Hmm.
Peter, before I go hunting around, can you tell me any other things psql
used to do that it doesn't do anymore?
We had hand-tuned psql over the years, and it would be good to know what
features no longer exist so we can decide if they are needed.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Nov 12 01:15:55 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA90635
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 01:15:53 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA25686;
Fri, 12 Nov 1999 01:14:44 -0500 (EST)
To: t-ishii@sra.co.jp
cc: Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
In-reply-to: Your message of Fri, 12 Nov 1999 11:00:08 +0900
<199911120200.LAA19911@srapc451.sra.co.jp>
Date: Fri, 12 Nov 1999 01:14:43 -0500
Message-ID: <25684.942387283@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
LO is a dead end. What we really want to do is eliminate tuple-size
restrictions and then have large ordinary fields (probably of type
bytea) in regular tuples. I'd suggest working on compression in that
context, say as a new data type called "bytez" or something like that.
It sounds ideal but I remember that Vadim said inserting a 2GB record
is not good idea since it will be written into the log too. If it's a
necessary limitation from the point of view of WAL, we have to accept
it, I think.
LO won't make that any better: the data still goes into a table.
You'd have 2GB worth of WAL entries either way.
The only thing LO would do for you is divide the data into block-sized
tuples, so there would be a bunch of little WAL entries instead of one
big one. But that'd probably be easy to duplicate too. If we implement
big tuples by chaining together disk-block-sized segments, which seems
like the most likely approach, couldn't WAL log each segment as a
separate log entry? If so, there's almost no difference between LO and
inline field for logging purposes.
regards, tom lane
From bouncefilter Fri Nov 12 01:47:59 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA93966
for <hackers@postgresql.org>; Fri, 12 Nov 1999 01:47:11 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id GAA08182;
Fri, 12 Nov 1999 06:54:20 GMT
Sender: lockhart@hub.org
Message-ID: <382BB99C.7B8B94E0@alumni.caltech.edu>
Date: Fri, 12 Nov 1999 06:54:20 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: applixware-list@applix.com
CC: Postgres Hackers List <hackers@postgresql.org>
Subject: Re: AWL: Re: tm1
References: <199911112148.QAA25209@saltmine.radix.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
People may have problems with the NULL statements with some versions
of PostgreSQL. I have information about editing the applix macro
on that creates the tables my web site:
http://www.radix.net/~cobrien/applix/applix.txt
Just in case someone cares ;)
The "NULL" constraint for a column definition is not defined in SQL92,
and is not necessary and could be dropped from Applix's definition of
the table. The default behavior of any column defined in SQL is to
allow NULL values.
Postgres does not implement this redundant syntax extension because
yacc-style parsers such as the one used in Postgres find the use of
the bare NULL an ambiguous context. Presumably that is why SQL92 does
not define it.
However, I see that in a limited context, such as a bare NULL with no
other qualifiers, yacc can handle its use. I'll add it to Postgres'
next release...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Nov 12 02:39:59 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA98659
for <hackers@postgreSQL.org>; Fri, 12 Nov 1999 02:39:13 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id HAA08267;
Fri, 12 Nov 1999 07:39:55 GMT
Sender: lockhart@hub.org
Message-ID: <382BC44B.2BE4AA39@alumni.caltech.edu>
Date: Fri, 12 Nov 1999 07:39:55 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Eisentraut <peter_e@gmx.net>
CC: Tom Lane <tgl@sss.pgh.pa.us>,
Zeugswetter Andreas SEV <ZeugswetterA@wien.spardat.at>,
"'hackers@postgresql.org'" <hackers@postgreSQL.org>
Subject: Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql
References: <Pine.LNX.4.20.9911112230211.442-100000@peter-e.yi.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Well, okay, everyone that wants to set their PostgreSQL user id
explicitly, send me a note and I'll put it back in, which ever way.
I thought that Tom Lane was representing me just fine, so was keeping
quiet ;)
An aside on procedures: on a change like this, I might have expected a
discussion on functionality *before* the patch was developed, since it
changes a seemingly fundamental feature. Though I haven't thought of a
strong, or even weak, argument for why id matching is necessary, it is
a topic about which there has been no discussion in the past, so I
didn't realize I needed an opinion until now.
Another aside: I'd like to think that most good ideas which stand the
test of an extended discussion will get a consensus to form. So if you
really think this is a step forward then keep talking about it; don't
give up too soon...
Back on topic: If there is currently no apparent need for a link
between Postgres user ids and external system ids, it is the case that
this is an obvious mechanism to make that link. So if someday a user
or a system feature needs it, it is already there and has been so from
day 1. afaik other DBs have a similar attribute for users.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Nov 12 03:03:59 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA04732
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 03:03:44 -0500 (EST)
(envelope-from theo@flame.flame.co.za)
Received: (from theo@localhost) by flame.flame.co.za (8.8.7/8.8.7) id
KAA24099;
Fri, 12 Nov 1999 10:04:58 +0200
From: Theo Kramer <theo@flame.flame.co.za>
Message-Id: <199911120804.KAA24099@flame.flame.co.za>
Subject: Re: [HACKERS] Slow - grindingly slow - query
To: vadim@krs.ru (Vadim Mikheev)
Date: Fri, 12 Nov 1999 10:04:58 +0200 (SAST)
Cc: pgsql-hackers@postgresql.org
In-Reply-To: <382BAB1D.4AF25BFE@krs.ru> from "Vadim Mikheev" at Nov 12,
99 12:52:29 pm
Content-Type: text
Vadim wrote:
I did the same on Informix Online 7 and it took less than two minutes...
Could you run the query above in Informix?
How long would it take to complete?
I include both explain and timing for the queries for both postgres and
Informix.
Explain from postgres for the two queries.
------------------------------------------
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
NOTICE: QUERY PLAN:
Seq Scan on accounts (cost=3667.89 rows=34958 width=12)
SubPlan
-> Index Scan using registrationtype_idx on accounts (cost=2444.62 rows=33373 width=12)
EXPLAIN
explain select accountdetail.domain from accountdetail
where not exists (
select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);
NOTICE: QUERY PLAN:
Seq Scan on accounts (cost=3667.89 rows=34958 width=12)
SubPlan
-> Index Scan using domain_type_idx on accounts (cost=2.04 rows=1 width=12)
EXPLAIN
Explain from informix online 7 for the two queries
--------------------------------------------------
QUERY:
------
select accountdetail.domain from accountdetail where
accountdetail.domain not in (select accountmaster.domain from accountmaster)
Estimated Cost: 8995
Estimated # of Rows Returned: 47652
1) informix.accounts: SEQUENTIAL SCAN
Filters: (informix.accounts.domain != ALL <subquery> AND informix.accounts.registrationtype != 'N' )
Subquery:
---------
Estimated Cost: 4497
Estimated # of Rows Returned: 5883
1) informix.accounts: SEQUENTIAL SCAN
Filters: informix.accounts.registrationtype = 'N'
QUERY:
------
select accountdetail.domain from accountdetail where
accountdetail.domain not in (select accountmaster.domain from accountmaster)
Estimated Cost: 4510
Estimated # of Rows Returned: 58810
1) informix.accounts: SEQUENTIAL SCAN
Filters: (informix.accounts.domain != ALL <subquery> AND informix.accounts.registrationtype != 'N' )
Subquery:
---------
Estimated Cost: 12
Estimated # of Rows Returned: 10
1) informix.accounts: INDEX PATH
(1) Index Keys: registrationtype
Lower Index Filter: informix.accounts.registrationtype = 'N'
Timing from postgres 6.5.3 for the two queries
----------------------------------------------
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
Greater than 5 hours and 30 minutes
explain select accountdetail.domain from accountdetail
where not exists (
select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);
0.00user 0.01system 0:04.75elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
Timing from Informix Online 7 for the two queries
----------------------------------------------
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
0.03user 0.01system 0:10.35elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
explain select accountdetail.domain from accountdetail
where not exists (
select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);
0.03user 0.00system 0:03.56elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
The machine is a Pentium II 400 MHz with Fast Wide SCSI and is the same
for both Informix and Postgres. Informix uses Linux I/O ie. it does not
use a raw partition. The datasets are the same.
Regards
Theo
From bouncefilter Fri Nov 12 03:12:56 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA05802
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 03:12:43 -0500 (EST)
(envelope-from theo@flame.flame.co.za)
Received: (from theo@localhost) by flame.flame.co.za (8.8.7/8.8.7) id KAA24132
for pgsql-hackers@postgresql.org; Fri, 12 Nov 1999 10:14:25 +0200
From: Theo Kramer <theo@flame.flame.co.za>
Message-Id: <199911120814.KAA24132@flame.flame.co.za>
Subject: Re: [HACKERS] Slow - grindingly slow - query
To: pgsql-hackers@postgresql.org
Date: Fri, 12 Nov 1999 10:14:25 +0200 (SAST)
Reply-To: theo@flame.co.za
Content-Type: text
Vadim wrote:
I did the same on Informix Online 7 and it took less than two minutes...
Could you run the query above in Informix?
How long would it take to complete?
I include both explain and timing for the queries for both postgres and
Informix.
Explain from postgres for the two queries.
------------------------------------------
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
NOTICE: QUERY PLAN:
Seq Scan on accounts (cost=3667.89 rows=34958 width=12)
SubPlan
-> Index Scan using registrationtype_idx on accounts (cost=2444.62 rows=33373 width=12)
EXPLAIN
explain select accountdetail.domain from accountdetail
where not exists (
select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);
NOTICE: QUERY PLAN:
Seq Scan on accounts (cost=3667.89 rows=34958 width=12)
SubPlan
-> Index Scan using domain_type_idx on accounts (cost=2.04 rows=1 width=12)
EXPLAIN
Explain from informix online 7 for the two queries
--------------------------------------------------
QUERY:
------
select accountdetail.domain from accountdetail where
accountdetail.domain not in (select accountmaster.domain from accountmaster)
Estimated Cost: 8995
Estimated # of Rows Returned: 47652
1) informix.accounts: SEQUENTIAL SCAN
Filters: (informix.accounts.domain != ALL <subquery> AND informix.accounts.registrationtype != 'N' )
Subquery:
---------
Estimated Cost: 4497
Estimated # of Rows Returned: 5883
1) informix.accounts: SEQUENTIAL SCAN
Filters: informix.accounts.registrationtype = 'N'
QUERY:
------
select accountdetail.domain from accountdetail where
accountdetail.domain not in (select accountmaster.domain from accountmaster)
Estimated Cost: 4510
Estimated # of Rows Returned: 58810
1) informix.accounts: SEQUENTIAL SCAN
Filters: (informix.accounts.domain != ALL <subquery> AND informix.accounts.registrationtype != 'N' )
Subquery:
---------
Estimated Cost: 12
Estimated # of Rows Returned: 10
1) informix.accounts: INDEX PATH
(1) Index Keys: registrationtype
Lower Index Filter: informix.accounts.registrationtype = 'N'
Timing from postgres 6.5.3 for the two queries
----------------------------------------------
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
Greater than 5 hours and 30 minutes
explain select accountdetail.domain from accountdetail
where not exists (
select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);
0.00user 0.01system 0:04.75elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
Timing from Informix Online 7 for the two queries
----------------------------------------------
explain select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);
0.03user 0.01system 0:10.35elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
explain select accountdetail.domain from accountdetail
where not exists (
select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);
0.03user 0.00system 0:03.56elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
The machine is a Pentium II 400 MHz with Fast Wide SCSI and is the same
for both Informix and Postgres. Informix uses Linux I/O ie. it does not
use a raw partition. The datasets are the same.
Regards
Theo
From bouncefilter Fri Nov 12 04:33:57 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA14416
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 04:33:23 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id KAA16562;
Fri, 12 Nov 1999 10:16:21 +0100
Date: Fri, 12 Nov 1999 10:16:21 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: t-ishii@sra.co.jp, pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
In-Reply-To: <25684.942387283@sss.pgh.pa.us>
Message-ID: <Pine.LNX.3.96.991112094645.14930A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Tom Lane wrote:
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
LO is a dead end. What we really want to do is eliminate tuple-size
restrictions and then have large ordinary fields (probably of type
bytea) in regular tuples. I'd suggest working on compression in that
context, say as a new data type called "bytez" or something like that.
--- cut ---
The only thing LO would do for you is divide the data into block-sized
tuples, so there would be a bunch of little WAL entries instead of one
big one. But that'd probably be easy to duplicate too. If we implement
big tuples by chaining together disk-block-sized segments, which seems
like the most likely approach, couldn't WAL log each segment as a
separate log entry? If so, there's almost no difference between LO and
inline field for logging purposes.
I'am not sure, that LO is a dead end for every users. Big (blob) fields
going during SQL engine (?), but why - if I needn't use this data as
typically SQL data (I not need index, search .. in (example) gif files).
Will pity if LO devel. will go down. I still thing that LO compression is
not bad idea :-)
Other eventual compression questions:
* some aplication allow use over slow networks between client<->server
a compressed stream, and PostgreSQL?
* MySQL dump allow make compressed dump file, it is good, and PostgreSQL?
Karel
From bouncefilter Fri Nov 12 04:52:57 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA16432
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 04:52:14 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id KAA17726;
Fri, 12 Nov 1999 10:38:55 +0100
Date: Fri, 12 Nov 1999 10:38:55 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Jan Wieck <wieck@debis.com>
cc: t-ishii@sra.co.jp, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] compression in LO and other fields
In-Reply-To: <m11m7SM-0003kLC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.3.96.991112101708.14930B-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Jan Wieck wrote:
Just in case someone want to implement a complete compressed
data type (including comarision functions, operators and
indexing default operator class).I already made some tests with a type I called 'lztext'
locally. Only the input-/output-functions exist so far and
as the name might suggest, it would be an alternative for
'text'. It uses a simple but fast, byte oriented LZ backward
pointing method. No Huffman coding or variable offset/size
tagging. First byte of a chunk tells bitwise if the next
following 8 items are raw bytes to copy or 12 bit offset, 4
bit size copy information. That is max back offset 4096 and
max match size 17 bytes.
I is your original implementation or you use any current compression
code? I try bzip2, but output from this algorithm is total binary,
I don't know how this use in PgSQL if in backend are all routines
(in/out) use *char (yes, I'am newbie for PgSQL hacking:-).
What made it my preferred method was the fact, that
decompression is done entirely using the already decompressed
portion of the data, so it does not need any code tables or
the like at that time.It is really FASTEST on decompression, which I assume would
be the mostly often used operation on huge data types. With
some care, comparision could be done on the fly while
decompressing two values, so that the entire comparision can
be aborted at the occurence of the first difference.The compression rates aren't that giantic. I've got 30-50%
Not is problem, that your implementation compress all data at once?
Typically compression use a stream, and compress only small a buffer
in any cycle.
for rule plan strings (size limit on views!!!). And the
method used only allows for buffer back references of 4K
offsets at most, so the rate will not grow for larger data
chunks. That's a heavy tradeoff between compression rate and
no memory leakage for sure and speed, I know, but I prefer
not to force it, instead I usually use a bigger hammer (the
tuple size limit is still our original problem - and another
IBM 72GB disk doing 22-37 MB/s will make any compressing data
type obsolete then).Sorry for the compression specific slang here. Well, anyone
interested in the code?
Yes, for me - I finish to_char()/to_data() ora compatible routines
(Thomas, you still quiet?) and this is new appeal for me :-)
Karel
From bouncefilter Fri Nov 12 04:49:57 1999
Received: from loopy.berkhirt.com (loopy.berkhirt.com [209.220.85.54])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA16038
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 04:49:31 -0500 (EST)
(envelope-from bhirt@loopy.berkhirt.com)
Received: (from bhirt@localhost)
by loopy.berkhirt.com (8.9.3/8.8.7) id DAA21601;
Fri, 12 Nov 1999 03:49:01 -0600
Date: Fri, 12 Nov 1999 03:49:01 -0600
From: Brian Hirt <bhirt@mobygames.com>
To: pgsql-hackers@postgreSQL.org
Cc: bhirt@loopy.berkhirt.com
Subject: Re: [HACKERS] Slow - grindingly slow - query
Message-ID: <19991112034901.B21136@loopy.berkhirt.com>
Reply-To: bhirt@mobygames.com
References: <16514.942357396@sss.pgh.pa.us> <382BA0FB.82D96E3C@flame.co.za>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.4us
In-Reply-To: <382BA0FB.82D96E3C@flame.co.za>;
from Theo Kramer on Fri, Nov 12, 1999 at 07:09:15AM +0200
X-PC-Gaming: http://www.mobygames.com/
select accountdetail.domain from accountdetail where
accountdetail.domain not in
(select accountmaster.domain from accountmaster);This takes more than 5 hours and 30 minutes.
select accountdetail.domain from accountdetail where
not exists (select accountmaster.domain from accountmaster where
accountmaster.domain = accountdetail.domain);This takes 5 seconds - wow!
I have a general comment/question here. Why do in/not in clauses seem
to perform so slowly? I've noticed this type of behavior with with my
system also. I think the above queries will always return the exact
same results regardless of the data. From looking at the query plan
with explain, it's clear the second query makes better use of the
indexes. Can't the rewrite engine recognize a simple case like the
one above and rewrite it to use exists and not exists with the proper
joins? Or possibly the optimizer can generate a better plan? Sometimes
it's not so easy to just change a query in the code. Sometimes you can't
change the code because you only have executables and sometimes you are
using a tool that automatically generates SQL using in clauses.
Additionally, since intersect and union get rewritten as in clauses they
suffer the same performance problems.
-brian
--
The world's most ambitious and comprehensive PC game database project.
From bouncefilter Fri Nov 12 05:04:57 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id FAA19065
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 05:04:08 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Gepard.DoCS.UU.SE (e99re41@Gepard.DoCS.UU.SE [130.238.9.100])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id LAA19610;
Fri, 12 Nov 1999 11:04:05 +0100
Received: from localhost (e99re41@localhost) by Gepard.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id LAA00806;
Fri, 12 Nov 1999 11:04:04 +0100
X-Authentication-Warning: Gepard.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Fri, 12 Nov 1999 11:04:03 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <maillist@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: psql and \p\g
In-Reply-To: <199911112150.QAA16006@candle.pha.pa.us>
Message-ID: <Pine.GSO.4.02A.9911121103020.791-100000@Gepard.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 11 Nov 1999, Bruce Momjian wrote:
Can you add a unix-style timestamp for \T?
Do you mean \echo `date` ?
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Nov 12 05:11:59 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id FAA20748
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 05:11:21 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Gepard.DoCS.UU.SE (e99re41@Gepard.DoCS.UU.SE [130.238.9.100])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id LAA20063;
Fri, 12 Nov 1999 11:11:19 +0100
Received: from localhost (e99re41@localhost) by Gepard.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id LAA00810;
Fri, 12 Nov 1999 11:11:18 +0100
X-Authentication-Warning: Gepard.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Fri, 12 Nov 1999 11:11:17 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <maillist@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: failure of \e in psql
In-Reply-To: <199911120607.BAA01516@candle.pha.pa.us>
Message-ID: <Pine.GSO.4.02A.9911121104290.791-100000@Gepard.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Bruce Momjian wrote:
Peter, before I go hunting around, can you tell me any other things psql
used to do that it doesn't do anymore?
Well, let's put it this way: Everythings that used to work, that people
found useful, and that doesn't work anymore is a bug. That's what it's all
about after all.
However: About the \e thing I simply didn't know. The \p\g was removed for
consistency. You might also be interested to know that \E no longer
exists, because I couldn't make sense of it. Also \d* is slated for
implementation but no one wanted to respond to my request to explain what
this is actually supposed to do. That's all I can come up with right now.
We had hand-tuned psql over the years, and it would be good to know what
features no longer exist so we can decide if they are needed.
Well, I really comes down to what Tom said, doesn't it: If the docs don't
match the code, the code it wrong. And it will get fixed. A lot of those
"tunings" seemed to be of the nature "If I put \o after \x I want it to do
<foo> instead".
That doesn't mean that they were bad of course, but the purpose of all of
this was to put a consistent face on things.
Having said that, if I mess it up I'll fix it of course.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Nov 12 06:17:00 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA29615
for <hackers@postgreSQL.org>; Fri, 12 Nov 1999 06:16:28 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Ko.DoCS.UU.SE (e99re41@Ko.DoCS.UU.SE [130.238.9.93]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA24083;
Fri, 12 Nov 1999 12:16:26 +0100
Received: from localhost (e99re41@localhost) by Ko.DoCS.UU.SE (8.6.12/8.6.12)
with SMTP id MAA10800; Fri, 12 Nov 1999 12:16:24 +0100
X-Authentication-Warning: Ko.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Fri, 12 Nov 1999 12:16:23 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Tom Lane <tgl@sss.pgh.pa.us>,
"'hackers@postgresql.org'" <hackers@postgreSQL.org>
Subject: Re: AW: [HACKERS] Re: [GENERAL] users in Postgresql
In-Reply-To: <382BC44B.2BE4AA39@alumni.caltech.edu>
Message-ID: <Pine.GSO.4.02A.9911121204060.10772-100000@Ko.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Thomas Lockhart wrote:
Well, okay, everyone that wants to set their PostgreSQL user id
explicitly, send me a note and I'll put it back in, which ever way.I thought that Tom Lane was representing me just fine, so was keeping
quiet ;)
Okay, vote noted.
An aside on procedures: on a change like this, I might have expected a
discussion on functionality *before* the patch was developed, since it
changes a seemingly fundamental feature. Though I haven't thought of a
strong, or even weak, argument for why id matching is necessary, it is
a topic about which there has been no discussion in the past, so I
didn't realize I needed an opinion until now.
It seems to me that especially in the code I'm digging around now, there
are a lot of way old things lying around (think Postgres95). When I ask if
someone actually uses them I usually get responses like "No, we can't yank
it, someone might be using it", which doesn't answer my question at all.
Thus I found it more effective to threaten removal first and then see if
someone speaks up.
Another aside: I'd like to think that most good ideas which stand the
test of an extended discussion will get a consensus to form. So if you
really think this is a step forward then keep talking about it; don't
give up too soon...
I just remember the heart-breaking discussion about the pg_ prefix ;)
Well, I outlined my points: 1) It confuses users, 2) It doesn't match the
SQL, 3) user IDs are internal representations that you should not be able
to mess with with user-level tools, 4) If you can pick it, you should also
be able to change it later. But you can't, really.
Back on topic: If there is currently no apparent need for a link
between Postgres user ids and external system ids, it is the case that
this is an obvious mechanism to make that link. So if someday a user
or a system feature needs it, it is already there and has been so from
day 1. afaik other DBs have a similar attribute for users.
This is based on the premise that it would somehow be useful to link Unix
and PostgreSQL users. In that case this would certainly be needed.
However, this would be a significant step backwards, since database users
are in general not equal to system users, most importantly since clients
might run on completely different systems than the server.
-Peter
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Nov 12 07:01:58 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA35770
for <hackers@postgreSQL.org>; Fri, 12 Nov 1999 07:01:15 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id NAA51944;
Fri, 12 Nov 1999 13:01:04 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <45YXP2X5>; Fri, 12 Nov 1999 13:01:04 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC168@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SEV <ZeugswetterA@wien.spardat.at>
To: "'Peter Eisentraut'" <peter_e@gmx.net>
Cc: "'hackers@postgresql.org'" <hackers@postgreSQL.org>
Subject: AW: AW: [HACKERS] Re: [GENERAL] users in Postgresql
Date: Fri, 12 Nov 1999 13:01:03 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
This is based on the premise that it would somehow be useful to link Unix
and PostgreSQL users.
This is useful, for a system like postgres, since due to the user types,
some user functions will eventually be executed with a setuid to a specific
unix user.
This may be the function owner, (dba procedure) or the user who is
connected.
In that case this would certainly be needed.
Yes imho.
However, this would be a significant step backwards, since
database users
are in general not equal to system users, most importantly
since clients
might run on completely different systems than the server.
Well , since I need all users as unix users, I do not want
postgres users at all. At the very least I do not want to keep
separate passwords for db users in the db.
Andreas
From bouncefilter Fri Nov 12 08:45:00 1999
Received: from ext04.sra.co.jp (IDENT:root@ykh28DS03.kng.mesh.ad.jp
[133.205.214.3]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA46711
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 08:44:35 -0500 (EST)
(envelope-from t-ishii@ext04.sra.co.jp)
Received: from ext04.sra.co.jp (t-ishii@localhost [127.0.0.1])
by ext04.sra.co.jp (8.8.8/8.8.8) with ESMTP id WAA01906;
Fri, 12 Nov 1999 22:42:22 +0900
Message-Id: <199911121342.WAA01906@ext04.sra.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: t-ishii@sra.co.jp, Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
From: Tatsuo Ishii <t-ishii@sra.co.jp>
Reply-To: t-ishii@sra.co.jp
In-reply-to: Your message of Fri, 12 Nov 1999 01:14:43 EST.
<25684.942387283@sss.pgh.pa.us>
Date: Fri, 12 Nov 1999 22:42:22 +0900
Sender: t-ishii@ext04.sra.co.jp
It sounds ideal but I remember that Vadim said inserting a 2GB record
is not good idea since it will be written into the log too. If it's a
necessary limitation from the point of view of WAL, we have to accept
it, I think.LO won't make that any better: the data still goes into a table.
You'd have 2GB worth of WAL entries either way.
What in my mind was LO that is not under the transaction control. I
would not say this is a good thing, but I'm afraid we might need this
kind of beast in WAL.
The only thing LO would do for you is divide the data into block-sized
tuples, so there would be a bunch of little WAL entries instead of one
big one. But that'd probably be easy to duplicate too. If we implement
big tuples by chaining together disk-block-sized segments, which seems
like the most likely approach, couldn't WAL log each segment as a
separate log entry? If so, there's almost no difference between LO and
inline field for logging purposes.
Right.
BTW, does anybody know how BLOBs are handled by WAL in commercial
DBMSs?
---
Tatsuo Ishii
From bouncefilter Fri Nov 12 09:08:00 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id JAA49633
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 09:07:19 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11mHDk-0003kLC; Fri, 12 Nov 99 14:58 MET
Message-Id: <m11mHDk-0003kLC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] compression in LO and other fields
To: zakkr@zf.jcu.cz (Karel Zak - Zakkr)
Date: Fri, 12 Nov 1999 14:58:32 +0100 (MET)
Cc: wieck@debis.com, t-ishii@sra.co.jp, tgl@sss.pgh.pa.us,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.LNX.3.96.991112101708.14930B-100000@ara.zf.jcu.cz> from
"Karel Zak - Zakkr" at Nov 12, 99 10:38:55 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Karel Zak - Zakkr wrote:
On Fri, 12 Nov 1999, Jan Wieck wrote:
I already made some tests with a type I called 'lztext'
locally. Only the input-/output-functions exist so far andI is your original implementation or you use any current compression
code? I try bzip2, but output from this algorithm is total binary,
I don't know how this use in PgSQL if in backend are all routines
(in/out) use *char (yes, I'am newbie for PgSQL hacking:-).
The internal storage format is based on an article I found
at:
http://www.neutralzone.org/home/faqsys/docs/slz_art.txt
Simple Compression using an LZ buffer
Part 3 Revision 1.d:
An introduction to compression on the Amiga by Adisak Pochanayon
Freely Distributable as long as reproduced completely.
Copyright 1993 Adisak Pochanayon
I've written the code from scratch.
The internal representation is binary, for sure. It's a
PostgreSQL variable length data format as usual.
I don't know if there's a compression library available that
fit's our need. First and most important it must have a
license that permits us to include it in the distribution
under our existing license. Second it's implementation must
not cause any problems in the backend like memory leakage or
the like.
The compression rates aren't that giantic. I've got 30-50%
Not is problem, that your implementation compress all data at once?
Typically compression use a stream, and compress only small a buffer
in any cycle.
No, that's no problem. On type input, the original value is
completely in memory given as a char*, and the internal
representation is returned as a palloc()'d Datum. For output
it's vice versa.
O.K. some details on the compression rate. I've used 112
.html files with a total size of 1188346 bytes this time.
The smallest one was 131 bytes, the largest one 114549 bytes
and most of the files are somewhere between 3-12K.
Compression results on the binary level are:
gzip -9 outputs 398180 bytes (66.5% rate)
gzip -1 outputs 447597 bytes (62.3% rate)
my code outputs 529420 bytes (55.4% rate)
Html input might be somewhat optimal for Adisak's storage
format, but taking into account that my source implementing
the type input and output functions is smaller than 600
lines, I think 11% difference to a gzip -9 is a good result
anyway.
Sorry for the compression specific slang here. Well, anyone
interested in the code?Yes, for me - I finish to_char()/to_data() ora compatible routines
(Thomas, you still quiet?) and this is new appeal for me :-)
Bruce suggested the contrib area, but I'm not sure if that's
the right place. If it goes into the distribution at all, I'd
like to use this data type for rule plan strings and function
source text in the system catalogs. I don't expect we'll have
a general solution for tuples split across multiple blocks
for v7.0. And using lztext for rules and function sources
would lower some FRP's. But using it in the catalogs requires
to be builtin.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Nov 12 09:46:00 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA54587
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 09:45:16 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA26514;
Fri, 12 Nov 1999 09:44:03 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: zakkr@zf.jcu.cz (Karel Zak - Zakkr), t-ishii@sra.co.jp,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] compression in LO and other fields
In-reply-to: Your message of Fri, 12 Nov 1999 14:58:32 +0100 (MET)
<m11mHDk-0003kLC@orion.SAPserv.Hamburg.dsh.de>
Date: Fri, 12 Nov 1999 09:44:03 -0500
Message-ID: <26512.942417843@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Html input might be somewhat optimal for Adisak's storage
format, but taking into account that my source implementing
the type input and output functions is smaller than 600
lines, I think 11% difference to a gzip -9 is a good result
anyway.
These strike me as very good results. I'm not at all sure that using
gzip or bzip would give much better results in practice in Postgres,
because those compressors are optimized for relatively large files,
whereas a compressed-field datatype would likely be getting relatively
small field values to work on. (So your test data set is probably a
good one for our purposes --- do the numbers change if you exclude
all the files over, say, 10K?)
Bruce suggested the contrib area, but I'm not sure if that's
the right place. If it goes into the distribution at all, I'd
like to use this data type for rule plan strings and function
source text in the system catalogs.
Right, if we are going to bother with it at all, we should put it
into the core so that we can use it for rule plans.
I don't expect we'll have
a general solution for tuples split across multiple blocks
for v7.0.
I haven't given up hope of that yet --- but even if we do, compressing
the data is an attractive choice to reduce the frequency with which
tuples must be split across blocks.
It occurred to me last night that applying compression to individual
fields might not be the best approach. Certainly a "bytez" data type
is the easiest thing to fit into the existing system, but it's leaving
some space savings on the table. What about compressing the *whole*
data contents of a tuple on-disk, as a single entity? That should save
more space than field-by-field compression. It could be triggered in
the tuple storage routines whenever the uncompressed size exceeds some
threshold. (We'd need a flag in the tuple header to indicate compressed
data, but I think there are bits to spare.) When we get around to
having split tuples, the code would still be useful because it'd be
applied as a first resort before splitting a large tuple; it'd reduce
the frequency of splits and the number of sections big tuples get split
into. All automatic and transparent, too --- the user doesn't have to
change data declarations at all.
Also, if we do it that way, then it would *automatically* apply to
both regular tuples and LO, because the current LO implementation is
just tuples. (Tatsuo's idea of a non-transaction-controlled LO would
need extra work, of course, if we decide that's a good idea...)
regards, tom lane
From bouncefilter Fri Nov 12 09:51:00 1999
Received: from thelab.hub.org (nat198.58.mpoweredpc.net [142.177.198.58])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA55114
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 09:50:02 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id KAA69715;
Fri, 12 Nov 1999 10:49:32 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 12 Nov 1999 10:49:31 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Jan Wieck <wieck@debis.com>
cc: Karel Zak - Zakkr <zakkr@zf.jcu.cz>, t-ishii@sra.co.jp, tgl@sss.pgh.pa.us,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] compression in LO and other fields
In-Reply-To: <m11mHDk-0003kLC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.BSF.4.10.9911121047360.2296-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Jan Wieck wrote:
I don't know if there's a compression library available that
fit's our need. First and most important it must have a
license that permits us to include it in the distribution
under our existing license. Second it's implementation must
not cause any problems in the backend like memory leakage or
the like.
Is this something that could be a configure option? Put the stubs in
place, and if someone wants to enable that feature, they can install the
compression library first and run with it?
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Nov 12 09:59:00 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id JAA56512
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 09:58:38 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11mI1a-0003kLC; Fri, 12 Nov 99 15:50 MET
Message-Id: <m11mI1a-0003kLC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] compression in LO and other fields
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Fri, 12 Nov 1999 15:50:02 +0100 (MET)
Cc: wieck@debis.com, zakkr@zf.jcu.cz, t-ishii@sra.co.jp,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <26512.942417843@sss.pgh.pa.us> from "Tom Lane" at Nov 12,
99 09:44:03 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
Html input might be somewhat optimal for Adisak's storage
format, but taking into account that my source implementing
the type input and output functions is smaller than 600
lines, I think 11% difference to a gzip -9 is a good result
anyway.These strike me as very good results. I'm not at all sure that using
gzip or bzip would give much better results in practice in Postgres,
because those compressors are optimized for relatively large files,
whereas a compressed-field datatype would likely be getting relatively
small field values to work on. (So your test data set is probably a
good one for our purposes --- do the numbers change if you exclude
all the files over, say, 10K?)
Will give it a try.
It occurred to me last night that applying compression to individual
fields might not be the best approach. Certainly a "bytez" data type
is the easiest thing to fit into the existing system, but it's leaving
some space savings on the table. What about compressing the *whole*
data contents of a tuple on-disk, as a single entity? That should save
more space than field-by-field compression.
But it requires decompression of every tuple into palloc()'d
memory during heap access. AFAIK, the heap access routines
currently return a pointer to the tuple inside the shm
buffer. Don't know what it's performance impact would be.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Nov 12 09:46:02 1999
Received: from localhost (IDENT:root@hectic-3.jpl.nasa.gov [128.149.68.205])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA54608
for <hackers@postgresql.org>; Fri, 12 Nov 1999 09:45:52 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id OAA08796;
Fri, 12 Nov 1999 14:52:58 GMT
Sender: lockhart@hub.org
Message-ID: <382C29CA.8EE3466F@alumni.caltech.edu>
Date: Fri, 12 Nov 1999 14:52:58 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
CC: Postgres Hackers List <hackers@postgresql.org>
Subject: Re: internationalizing and etc..
References: <Pine.LNX.3.96.991110162143.7055A-100000@ara.zf.jcu.cz>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I send you my last letter again, because I'am not sure if you obtain it
(you had problem with connection (?)).
Actually yes! I was off the air for a week or so, and didn't remember
that I had a mail to answer. Sorry about that...
For normal strings, we can implement NATIONAL CHARACTER and CHARACTER
SET features from SQL92 to handle locales and alternative languages.
We'll do this by defining new types for each language or locale. For
date/time, a clear path is to standardize on ISO-8601 formats (already
available as an option) which use numeric fields only. SQL92 offers no
suggestions on how to do date/time types with alphabetic fields.I'm going to switch the default date format to ISO-8601 for the next
release, which should help. We could also think about
internationalizing the date/time support as you suggest, with external
language-specific catalogs, but a catalog lookup to do date/time i/o
would seem to be very slow, for a catalog within Postgres or for an
external flat file.Yes, external catalogs is problem (speed, needs glibc..), better resolution is
probably (cached) system catalogs. If I good underatand you, your idea is
add langs and locales to pg_type (..example), well. After this si not problem
make internal catalogs for locales with months, days names...etc. And join
this locales table (pg_locale?) with pg_type via oid and we can implement
any translator between langs (for datetime strings).(This is better, because in the glibc's catalogs has features which we
needn't in PgSQL.)Will feature which allow make possible to set LOCALE type during transaction,
SET LOCALE/NATIONAL command ?If you have any exactly ideas I can help you with it (if you want).
I have a little time now and I want spend it with PgSQL :-)
My thought for the *first* implementation of locales and character
sets is to do it all through pg_type, pg_proc, and pg_operator, with a
little help from built-in features in the parser to recognize the
SQL92 conventions for character sets.
For the moment then, we focus on the character set features, not on
how to tie this into the date/time features. For SQL92, you can't
change character sets on the fly, though you can specify that they be
converted on the fly. And the same would hold true of the date/time
types. You can't do a "SET LOCALE" and magically find that both
character types and date/time types change locale too. Or I should say
I haven't seen how to do that yet.
I complete to_char/to_date, and I testing it now. Where/Who I must send this
routines for moving to contrib (to You or to other major developer)?
Send it to the "patches" list, or directly to the "hackers" list if it
is under 40kbytes. After we look at the code, we will decide if it
goes into contrib or directly into the backend, and will put it into
the tree.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Nov 12 09:48:00 1999
Received: from localhost (IDENT:root@hectic-3.jpl.nasa.gov [128.149.68.205])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA54723
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 09:47:11 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id OAA08803;
Fri, 12 Nov 1999 14:54:04 GMT
Sender: lockhart@hub.org
Message-ID: <382C2A0C.39D59678@alumni.caltech.edu>
Date: Fri, 12 Nov 1999 14:54:04 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
CC: Jan Wieck <wieck@debis.com>, t-ishii@sra.co.jp, tgl@sss.pgh.pa.us,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] compression in LO and other fields
References: <Pine.LNX.3.96.991112101708.14930B-100000@ara.zf.jcu.cz>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Yes, for me - I finish to_char()/to_data() ora compatible routines
(Thomas, you still quiet?) and this is new appeal for me :-)
Ack! When I saw this I rolled up my primary Netscape window and found
you're almost-completed reply underneath. I've sent it along now.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Nov 12 10:06:06 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA58257
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 10:05:43 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11mI8O-0003kLC; Fri, 12 Nov 99 15:57 MET
Message-Id: <m11mI8O-0003kLC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] compression in LO and other fields
To: scrappy@hub.org (The Hermit Hacker)
Date: Fri, 12 Nov 1999 15:57:04 +0100 (MET)
Cc: wieck@debis.com, zakkr@zf.jcu.cz, t-ishii@sra.co.jp, tgl@sss.pgh.pa.us,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.BSF.4.10.9911121047360.2296-100000@thelab.hub.org> from
"The Hermit Hacker" at Nov 12, 99 10:49:31 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Marc G. Fournier wrote:
On Fri, 12 Nov 1999, Jan Wieck wrote:
I don't know if there's a compression library available that
fit's our need. First and most important it must have a
license that permits us to include it in the distribution
under our existing license. Second it's implementation must
not cause any problems in the backend like memory leakage or
the like.Is this something that could be a configure option? Put the stubs in
place, and if someone wants to enable that feature, they can install the
compression library first and run with it?
If using the new type in system catalogs, the option could
only be what kind of compression to use. And we need our own
default compression code shipped anyway.
Of course, it could depend on the config what types are used
in the syscat. But making the catalog headers things that are
shipped as a .in isn't really that good IMHO.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Nov 12 10:00:00 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA56607
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 09:59:19 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA26651;
Fri, 12 Nov 1999 09:58:14 -0500 (EST)
To: bhirt@mobygames.com
cc: pgsql-hackers@postgreSQL.org, bhirt@loopy.berkhirt.com
Subject: Re: [HACKERS] Slow - grindingly slow - query
In-reply-to: Your message of Fri, 12 Nov 1999 03:49:01 -0600
<19991112034901.B21136@loopy.berkhirt.com>
Date: Fri, 12 Nov 1999 09:58:14 -0500
Message-ID: <26649.942418694@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Brian Hirt <bhirt@mobygames.com> writes:
Can't the rewrite engine recognize a simple case like the
one above and rewrite it to use exists and not exists with the proper
joins? Or possibly the optimizer can generate a better plan?
This is on the TODO list, and will get done someday. IMHO it's not as
urgent as a lot of the planner/optimizer's other shortcomings, because
it can usually be worked around by revising the query.
If it's bugging you enough to go fix it now, contributions are always
welcome ;-)
regards, tom lane
From bouncefilter Fri Nov 12 19:48:08 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA49183
for <hackers@postgresql.org>; Fri, 12 Nov 1999 19:47:31 -0500 (EST)
(envelope-from peter@peter-e.yi.org)
Received: from regulus.its.uu.se ([130.238.7.19]:61852 "EHLO peter-e.yi.org")
by merganser.its.uu.se with ESMTP id <S.s99I.168312>;
Sat, 13 Nov 1999 01:46:56 +0100
Received: from peter (helo=localhost)
by peter-e.yi.org with local-esmtp (Exim 3.02 #2) id 11mIDt-0000py-00
for hackers@postgresql.org; Fri, 12 Nov 1999 16:02:45 +0100
Date: Fri, 12 Nov 1999 16:02:45 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: hackers@postgresql.org
Subject: RFC: create/alter user extension
Message-ID: <Pine.LNX.4.20.9911121555290.1261-100000@peter-e.yi.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: Peter Eisentraut <peter@peter-e.yi.org>
Is everyone okay with the following syntax:
CREATE USER username
[ WITH ID digits ]
^^^^^^^^^^^^^^^^^^
[ WITH PASSWORD password ]
[ CREATEDB | NOCREATEDB ]
[ CREATEUSER | NOCREATEUSER ]
[ IN GROUP groupname [, ...] ]
[ VALID UNTIL 'abstime' ]
ALTER USER username
[ WITH ID digits ]
^^^^^^^^^^^^^^^^^^
[ WITH PASSWORD password ]
[ CREATEDB | NOCREATEDB ]
[ CREATEUSER | NOCREATEUSER ]
[ IN GROUP groupname [, ...] ]
[ VALID UNTIL 'abstime' ]
The catch is that ID would have to be a new keyword and we'd have to live
with that for a long time. Other choices include:
* UID
* SYSID
* USESYSID
etc.
What do the standards and pseudo-standards say?
I think I'll take a stab at this and settle the createuser script issue
the proper way.
-Peter
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Nov 12 10:16:05 1999
Received: from thelab.hub.org (nat198.58.mpoweredpc.net [142.177.198.58])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA60391
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 10:15:29 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id LAA69953
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 11:15:27 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
X-Received: from localhost (localhost.hub.org [127.0.0.1])
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id LAA69918
for <scrappy@localhost>; Fri, 12 Nov 1999 11:11:35 -0400 (AST)
(envelope-from pjw@rhyme.com.au)
X-Received: from mail.hub.org by localhost with IMAP (fetchmail-5.0.5)
for scrappy@localhost (single-drop);
Fri, 12 Nov 1999 11:11:37 -0400 (AST)
X-Received: (from majordom@localhost) by hub.org (8.9.3/8.9.3) id KAA58731
for pgsql-hackers-team; Fri, 12 Nov 1999 10:08:01 -0500 (EST)
(envelope-from owner-majordomo)
X-Received: from acheron.rime.com.au (root@albatr.lnk.telstra.net
[139.130.54.222]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA58637
for <owner-pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 10:07:26 -0500 (EST)
(envelope-from pjw@rhyme.com.au)
X-Received: from oberon (Oberon.rime.com.au [203.8.195.100])
by acheron.rime.com.au (8.9.3/8.9.3) with SMTP id CAA30915;
Sat, 13 Nov 1999 02:06:51 +1100
Message-Id: <3.0.5.32.19991113020723.00c7f9a0@mail.rhyme.com.au>
X-Sender: pjw@mail.rhyme.com.au
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Sat, 13 Nov 1999 02:07:23 +1100
To: t-ishii@sra.co.jp
From: Philip Warner <pjw@rhyme.com.au>
Subject: Re: [HACKERS] compression in LO and other fields
Cc: owner-pgsql-hackers@postgresql.org
In-Reply-To: <199911121342.WAA01906@ext04.sra.co.jp>
References: <Your message of Fri,
12 Nov 1999 01:14:43 EST. <25684.942387283@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
ReSent-Date: Fri, 12 Nov 1999 11:15:22 -0400 (AST)
ReSent-From: The Hermit Hacker <scrappy@hub.org>
ReSent-To: pgsql-hackers@postgresql.org
ReSent-Subject: Re: [HACKERS] compression in LO and other fields
ReSent-Message-ID: <Pine.BSF.4.10.9911121115220.2296@thelab.hub.org>
BTW, does anybody know how BLOBs are handled by WAL in commercial
DBMSs?
Dec/RDB stores them in it's equivalent of the WAL; full rollback etc is
supported. If you load lots of large blobs, you need to make sure you have
enough disk space for the journal copies.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: +61-03-5367 7422 | _________ \
Fax: +61-03-5367 7430 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
From bouncefilter Fri Nov 12 10:14:01 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA59770
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 10:13:27 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA26762;
Fri, 12 Nov 1999 10:12:16 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: zakkr@zf.jcu.cz, t-ishii@sra.co.jp, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] compression in LO and other fields
In-reply-to: Your message of Fri, 12 Nov 1999 15:50:02 +0100 (MET)
<m11mI1a-0003kLC@orion.SAPserv.Hamburg.dsh.de>
Date: Fri, 12 Nov 1999 10:12:15 -0500
Message-ID: <26760.942419535@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Tom Lane wrote:
It occurred to me last night that applying compression to individual
fields might not be the best approach. Certainly a "bytez" data type
is the easiest thing to fit into the existing system, but it's leaving
some space savings on the table. What about compressing the *whole*
data contents of a tuple on-disk, as a single entity? That should save
more space than field-by-field compression.
But it requires decompression of every tuple into palloc()'d
memory during heap access. AFAIK, the heap access routines
currently return a pointer to the tuple inside the shm
buffer. Don't know what it's performance impact would be.
Good point, but the same will be needed when a tuple is split across
multiple blocks. I would expect that (given a reasonably fast
decompressor) there will be a net performance *gain* due to having
less disk I/O to do. Also, this won't be happening for "every" tuple,
just those exceeding a size threshold --- we'd be able to tune the
threshold value to trade off speed and space.
One thing that does occur to me is that we need to store the
uncompressed as well as the compressed data size, so that the
working space can be palloc'd before starting the decompression.
Also, in case it wasn't clear, I was envisioning leaving the tuple
header uncompressed, so that time quals etc can be checked before
decompressing the tuple data.
regards, tom lane
From bouncefilter Fri Nov 12 10:32:01 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA64056
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 10:31:35 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id QAA30515;
Fri, 12 Nov 1999 16:18:30 +0100
Date: Fri, 12 Nov 1999 16:18:30 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Jan Wieck <wieck@debis.com>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
In-Reply-To: <m11mHDk-0003kLC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.3.96.991112160056.30102A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Jan Wieck wrote:
I don't know if there's a compression library available that
fit's our need. First and most important it must have a
license that permits us to include it in the distribution
IMHO bzip2 compression algorith is free and open source - README
from bzip2 source:
"bzip2-0.9.5 is distributed under a BSD-style license. For details,
see the file LICENSE"
Bruce suggested the contrib area, but I'm not sure if that's
the right place. If it goes into the distribution at all, I'd
Is any space (on postgresql ftp?) for this unstable code? Good project
has incoming of ftp for devel. versions...
If you this code not move to contrib, send me it (patch?), please.
Karel
From bouncefilter Fri Nov 12 10:36:01 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA64880
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 10:35:49 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA26966;
Fri, 12 Nov 1999 10:34:46 -0500 (EST)
To: Frans Van Elsacker <fve@atbib.be>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] union problem version 6.5.3
In-reply-to: Your message of Fri, 12 Nov 1999 01:10:06 +0100
<3.0.6.32.19991112011006.00876c00@193.75.233.1>
Date: Fri, 12 Nov 1999 10:34:45 -0500
Message-ID: <26964.942420885@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Frans Van Elsacker <fve@atbib.be> writes:
I had a little piece of code who works fine up till know, just after
installing
the version 6.5.3 i got the message 'parse error near union'
create table work as
select * from opdracht
union
select * from opdrachtproost
Hmm, the grammar has
CreateAsStmt: CREATE OptTemp TABLE relation_name OptCreateAs AS SubSelect
and SubSelect doesn't allow unions. This is overly restrictive,
I agree, but I thought it had been that way for a good while.
What version were you using before?
regards, tom lane
From bouncefilter Fri Nov 12 10:50:01 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA67355
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 10:49:46 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11mIp4-0003kLC; Fri, 12 Nov 99 16:41 MET
Message-Id: <m11mIp4-0003kLC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] compression in LO and other fields
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Fri, 12 Nov 1999 16:41:10 +0100 (MET)
Cc: wieck@debis.com, zakkr@zf.jcu.cz, t-ishii@sra.co.jp,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <26760.942419535@sss.pgh.pa.us> from "Tom Lane" at Nov 12,
99 10:12:15 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
But it requires decompression of every tuple into palloc()'d
memory during heap access. AFAIK, the heap access routines
currently return a pointer to the tuple inside the shm
buffer. Don't know what it's performance impact would be.Good point, but the same will be needed when a tuple is split across
multiple blocks. I would expect that (given a reasonably fast
decompressor) there will be a net performance *gain* due to having
less disk I/O to do. Also, this won't be happening for "every" tuple,
just those exceeding a size threshold --- we'd be able to tune the
threshold value to trade off speed and space.
Right, this time it's your good point. All of the problems
will be there on tuple split implementation.
The major problem I see is that a palloc()'d tuple should be
pfree()'d after the fetcher is done with it. Since they are
in buffer actually, the fetcher doesn't have to care.
One thing that does occur to me is that we need to store the
uncompressed as well as the compressed data size, so that the
working space can be palloc'd before starting the decompression.
Yepp - and I'm doing so. Only during compression the result
size isn't known. But there is a well known maximum, that is
the header overhead plus the data size by 1.125 plus 2 bytes
(totally worst case on uncompressable data). And a general
mechanism working on the tuple level would fallback to store
uncompressed data in the case the compressed size is bigger.
Also, in case it wasn't clear, I was envisioning leaving the tuple
header uncompressed, so that time quals etc can be checked before
decompressing the tuple data.
Of course.
Well, you asked for the rates on the smaller html files only.
78 files, 131 bytes min, 10000 bytes max, 4582 bytes avg,
357383 bytes total.
gzip -9 outputs 145659 bytes (59.2%)
gzip -1 outputs 155113 bytes (56.6%)
my code outputs 184109 bytes (48.5%)
67 files, 2000 bytes min, 10000 bytes max, 5239 bytes avg,
351006 bytes total.
gzip -9 outputs 141772 bytes (59.6%)
gzip -1 outputs 151150 bytes (56.9%)
my code outputs 179428 bytes (48.9%)
The threshold will surely be a tuning parameter of interest.
Another tuning option must be to allow/deny compression per
table at all. Then we could have both options, using a
compressing field type to define which portion of a tuple to
compress, or allow to compress the entire tuples.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Nov 12 11:01:03 1999
Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu
[128.42.12.154])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA70602
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 11:00:06 -0500 (EST)
(envelope-from reedstrm@wallace.ece.rice.edu)
Received: by wallace.ece.rice.edu via sendmail from stdin
id <m11mJ7D-000LECC@wallace.ece.rice.edu> (Debian Smail3.2.0.102)
for pgsql-hackers@postgreSQL.org; Fri, 12 Nov 1999 09:59:55 -0600 (CST)
Date: Fri, 12 Nov 1999 09:59:55 -0600
From: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, t-ishii@sra.co.jp,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
Message-ID: <19991112095955.D9755@wallace.ece.rice.edu>
References: <25684.942387283@sss.pgh.pa.us>
<Pine.LNX.3.96.991112094645.14930A-100000@ara.zf.jcu.cz>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.3i
In-Reply-To: <Pine.LNX.3.96.991112094645.14930A-100000@ara.zf.jcu.cz>;
from Karel Zak - Zakkr on Fri, Nov 12, 1999 at 10:16:21AM +0100
On Fri, Nov 12, 1999 at 10:16:21AM +0100, Karel Zak - Zakkr wrote:
Other eventual compression questions:
* MySQL dump allow make compressed dump file, it is good, and PostgreSQL?
pg_dump database | gzip >db.out.gz
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
From bouncefilter Fri Nov 12 11:32:02 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA76392
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 11:31:50 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id RAA31638;
Fri, 12 Nov 1999 17:15:06 +0100
Date: Fri, 12 Nov 1999 17:15:05 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
cc: Tom Lane <tgl@sss.pgh.pa.us>, t-ishii@sra.co.jp,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
In-Reply-To: <19991112095955.D9755@wallace.ece.rice.edu>
Message-ID: <Pine.LNX.3.96.991112171242.31595A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Ross J. Reedstrom wrote:
On Fri, Nov 12, 1999 at 10:16:21AM +0100, Karel Zak - Zakkr wrote:
Other eventual compression questions:
* MySQL dump allow make compressed dump file, it is good, and PostgreSQL?
pg_dump database | gzip >db.out.gz
Thank... :-))
But mysqldump --compress is very nice.
Karel
From bouncefilter Fri Nov 12 11:22:02 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA74392
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 11:21:12 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA27124;
Fri, 12 Nov 1999 11:19:58 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: zakkr@zf.jcu.cz, t-ishii@sra.co.jp, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] compression in LO and other fields
In-reply-to: Your message of Fri, 12 Nov 1999 16:41:10 +0100 (MET)
<m11mIp4-0003kLC@orion.SAPserv.Hamburg.dsh.de>
Date: Fri, 12 Nov 1999 11:19:57 -0500
Message-ID: <27122.942423597@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
The major problem I see is that a palloc()'d tuple should be
pfree()'d after the fetcher is done with it. Since they are
in buffer actually, the fetcher doesn't have to care.
I think this may not be as big a problem as it looks. Most places
in the executor keep tuples in TupleTableSlots, which are responsible
for pfree'ing the tuple if (and only if) necessary; all that code is
ready for this change already. There are probably some routines in
heapam/indexam that assume they only work with tuples that never need
to be freed, but I don't think the fixes will be pervasive. And we're
going to have to do that work in any case to support big tuples
(assuming we do it by splitting tuples into segments that fit in disk
pages).
And a general
mechanism working on the tuple level would fallback to store
uncompressed data in the case the compressed size is bigger.
Right. Another possible place for speed-vs-space tuning would be to
store the uncompressed representation unless the compressed version is
at least X percent smaller, not just at-least-one-byte smaller.
regards, tom lane
From bouncefilter Fri Nov 12 11:52:03 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA80011
for <hackers@postgreSQL.org>; Fri, 12 Nov 1999 11:51:37 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id LAA15737;
Fri, 12 Nov 1999 11:50:06 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911121650.LAA15737@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: AWL: Re: tm1
In-Reply-To: <382BB99C.7B8B94E0@alumni.caltech.edu> from Thomas Lockhart at
"Nov 12, 1999 06:54:20 am"
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Date: Fri, 12 Nov 1999 11:50:06 -0500 (EST)
CC: applixware-list@applix.com, Postgres Hackers List <hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
People may have problems with the NULL statements with some versions
of PostgreSQL. I have information about editing the applix macro
on that creates the tables my web site:
http://www.radix.net/~cobrien/applix/applix.txtJust in case someone cares ;)
The "NULL" constraint for a column definition is not defined in SQL92,
and is not necessary and could be dropped from Applix's definition of
the table. The default behavior of any column defined in SQL is to
allow NULL values.Postgres does not implement this redundant syntax extension because
yacc-style parsers such as the one used in Postgres find the use of
the bare NULL an ambiguous context. Presumably that is why SQL92 does
not define it.However, I see that in a limited context, such as a bare NULL with no
other qualifiers, yacc can handle its use. I'll add it to Postgres'
next release...
Yes, we are hearing people use it. Seems like we could just ignore the
NULL if possible.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Nov 12 11:57:02 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA80703
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 11:55:53 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id LAA15841;
Fri, 12 Nov 1999 11:54:44 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911121654.LAA15841@candle.pha.pa.us>
Subject: Re: psql and \p\g
In-Reply-To: <Pine.GSO.4.02A.9911121103020.791-100000@Gepard.DoCS.UU.SE> from
Peter Eisentraut at "Nov 12, 1999 11:04:03 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 12 Nov 1999 11:54:44 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Thu, 11 Nov 1999, Bruce Momjian wrote:
Can you add a unix-style timestamp for \T?
Do you mean \echo `date` ?
Oh, very nifty. Never mind. I didn't see that.
Seems you have added more powerful flags to take over some of the old
flag usage. If you want to remove some of the older psql flags and
require them to use your newer syntax that allows more functionality,
you can do it.
If you want, just print an error message for the old flag showing them
the new syntax to use and we can remove the messages after a few
releases.
However, some of the more popular flags should probably be left in.
Maybe it should just be left alone. Not sure.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Nov 12 12:02:06 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA81679
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 12:01:22 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id MAA16016;
Fri, 12 Nov 1999 12:00:27 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911121700.MAA16016@candle.pha.pa.us>
Subject: Re: failure of \e in psql
In-Reply-To: <Pine.GSO.4.02A.9911121104290.791-100000@Gepard.DoCS.UU.SE> from
Peter Eisentraut at "Nov 12, 1999 11:11:17 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 12 Nov 1999 12:00:27 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Fri, 12 Nov 1999, Bruce Momjian wrote:
Peter, before I go hunting around, can you tell me any other things psql
used to do that it doesn't do anymore?Well, let's put it this way: Everythings that used to work, that people
found useful, and that doesn't work anymore is a bug. That's what it's all
about after all.However: About the \e thing I simply didn't know. The \p\g was removed for
consistency. You might also be interested to know that \E no longer
exists, because I couldn't make sense of it. Also \d* is slated for
implementation but no one wanted to respond to my request to explain what
this is actually supposed to do. That's all I can come up with right now.
First, let me say I am very glad you overhauled psql. It was very
needed, and I like the new functionality. Already learned \echo `date`.
Quite handy and very flexible.
I was just curious if there was any stuff you found confusing and
skipped so we could comment on it all at once.
We have fixed the pager off by default, and looks like \p\g and \e need
work, but that is small compared to how much functionality does work
perfectly. I personally found the \e and \p\g stuff very tricky to
implement.
[Of course, with the new output, I am going to have to re-do every one
of my SQL query outputs for the book. :-) ]
No idea what \d* does, nor \E.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Nov 12 12:15:03 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA83639
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 12:14:08 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id MAA16458;
Fri, 12 Nov 1999 12:10:35 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911121710.MAA16458@candle.pha.pa.us>
Subject: Re: [HACKERS] compression in LO and other fields
In-Reply-To: <26512.942417843@sss.pgh.pa.us> from Tom Lane at "Nov 12,
1999 09:44:03 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 12 Nov 1999 12:10:35 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
t-ishii@sra.co.jp, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce suggested the contrib area, but I'm not sure if that's
the right place. If it goes into the distribution at all, I'd
like to use this data type for rule plan strings and function
source text in the system catalogs.Right, if we are going to bother with it at all, we should put it
into the core so that we can use it for rule plans.
Agreed. I suggested contrib so the code doesn't just disappear.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Nov 12 12:35:04 1999
Received: (from news@localhost) by hub.org (8.9.3/8.9.3) id MAA86879
for pgsql-hackers@postgresql.org; Fri, 12 Nov 1999 12:34:44 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: hub.org: news set sender to <news> using -f
From: "gov-boi" <gov-boi@hack.co.za>
X-Newsgroups: alt.marketplace.crack-corner, alt.master.hackers,
alt.music.cracker-cvb, alt.nl.binaries.hack, alt.phreaking,
alt.recovery.codependency, alt.source-code.mac,
borland.public.codecentral, chinese.text.unicode,
comp.databases.postgresql.hackers, comp.databas
Subject: www.hack.co.za - exploit archives updates - 0day
Date: Fri, 12 Nov 1999 19:32:13 +0200
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <382c4fad.0@news1.mweb.co.za>
X-Trace: 12 Nov 1999 19:34:37 +0200, cpt-dial-196-2-56-33.mweb.co.za
To: pgsql-hackers@postgresql.org
[[-Fri 12 November-]]
Added su.c Unixware 7.0 local exploit by K2, posted by demi.(0-day)
Added xlock.c Unixware 7.0 local exploit by K2, posted by demi.(0-day)
Added Xsco.c Unixware 7.0 local exploit by K2, posted by demi.(0-day)
[[-Thur 11 November-]]
Added seyon.sh FreeBSD 3.3 local exploit by Brock Tellier.
Added nfsd2.c RPC + Debian 2.1 + Redhat 5.2 remote exploit by tmoggie.
Added ypbreak.c RPC/nis exploit by anonymous. (old)
Added ypsnarf.c RPC/nis exploit by anonymous. (old)
Added hijaak.sh Sendmail 8.8.8 local exploit by Michal Zalewski
Added Win95/98 and WinNT exploit section.(requested numerous times)
Added wftpdexp.tgz Win95/98/NT remote exploit by Alberto Solino.
Added msadc2.pl WinNT 4.0 remote exploit by rfp.
Added ex_cmail.c Win98 remote exploit by UNYUN.
Added ex_fuse.c Win98 remote exploit by UNYUN.
Added ex_netsrv.c Win98 remote exploit by UNYUN.
Added ex_servu.c Win98 remote exploit by UNYUN.
Added ex_tinyftpd.c Win98 remote exploit by UNYUN.
Added ex_zommail.c Win98 remote exploit by UNYUN.
Added ex_almail.c Win98 local exploit by UNYUN.
Added ex_midiplug.c Win98 local exploit by UNYUN.
Added ex_ssmail.c WinNT 4.0 remote exploit by UNYUN.
Added sendexp.c WinNT 4.0 remote exploit by UNYUN.
[[-Tues 9 November-]]
Added dtappgather.sh Unixware 7.0 local exploit by K2.
Added dopewarez.c Linux/misc remote exploit by nuuB.
Added hylafax.c FreeBSD 3.3 local exploit by Brock Tellier.
[[-Wed 3 November-]]
Added amanda.c FreeBSD 3.3 local exploit by Brock Tellier.
Added canuum.c TurboLinux 3.5 local exploit by UNYUN.
Added sendmail-8.9.3.tar.gz by icesk. (0-day)
Added sperl4.036.c FreeBSD 2.2.8 exploit by OVX. (old)
Added tcpdump.c Linux/misc exploit BLADI. (old)
(exploits/code to post? submit@hack.co.za)
(queries/questions? wwwboard is running)
[[-Disclaimer-]]
The members at www.hack.co.za can not and will not be held
responsible for anyone's actions, nothing on this site is meant
to be used to malicious intent. We will not give out server logs
of people connecting, or will not supply any information that
envolves the "tracking down" of people. We believe in freedom
of speech, any code posted to this page will not be removed
under any circumstances, regardless of copyright or anything
similar. If you do not agree with any of the above, leave now.
From bouncefilter Fri Nov 12 13:03:03 1999
Received: from loopy.berkhirt.com (loopy.berkhirt.com [209.220.85.54])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA91068
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 13:02:42 -0500 (EST)
(envelope-from bhirt@loopy.berkhirt.com)
Received: (from bhirt@localhost)
by loopy.berkhirt.com (8.9.3/8.8.7) id MAA28394;
Fri, 12 Nov 1999 12:02:07 -0600
Date: Fri, 12 Nov 1999 12:02:07 -0600
From: Brian Hirt <bhirt@mobygames.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: bhirt@mobygames.com, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
Message-ID: <19991112120207.A27778@loopy.berkhirt.com>
Reply-To: bhirt@mobygames.com
References: <19991112034901.B21136@loopy.berkhirt.com>
<26649.942418694@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.4us
In-Reply-To: <26649.942418694@sss.pgh.pa.us>;
from Tom Lane on Fri, Nov 12, 1999 at 09:58:14AM -0500
X-PC-Gaming: http://www.mobygames.com/
On Fri, Nov 12, 1999 at 09:58:14AM -0500, Tom Lane wrote:
Brian Hirt <bhirt@mobygames.com> writes:
Can't the rewrite engine recognize a simple case like the
one above and rewrite it to use exists and not exists with the proper
joins? Or possibly the optimizer can generate a better plan?This is on the TODO list, and will get done someday. IMHO it's not as
urgent as a lot of the planner/optimizer's other shortcomings, because
it can usually be worked around by revising the query.If it's bugging you enough to go fix it now, contributions are always
welcome ;-)
Okay, what would be the correct approach to solving the problem,
and where would be a good place to start? I'v only been on this list
for a few weeks, so I'm missed discussion on the approach to solving
this problem. Should this change be localized to just the planner?
Should the rewrite system be creating a different query tree? Will both
need to be changed? If a lot of work is being done to this part of
the system, is now a bad time to try this work?
I'm willing to jump in to this, but I may take a while to figure it out
and ask a lot of questions that are obvious to the hardened postgres
programmer. I'm not famaliar with the postgres code, yet.
-brian
--
The world's most ambitious and comprehensive PC game database project.
From bouncefilter Fri Nov 12 13:45:04 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA96941
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 13:44:48 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id KAA28936;
Fri, 12 Nov 1999 10:43:17 -0800 (PST)
Message-Id: <3.0.1.32.19991112100957.010f0300@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Fri, 12 Nov 1999 10:09:57 -0800
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
"Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] compression in LO and other fields
Cc: Tom Lane <tgl@sss.pgh.pa.us>, t-ishii@sra.co.jp,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
In-Reply-To: <Pine.LNX.3.96.991112171242.31595A-100000@ara.zf.jcu.cz>
References: <19991112095955.D9755@wallace.ece.rice.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 05:15 PM 11/12/99 +0100, Karel Zak - Zakkr wrote:
pg_dump database | gzip >db.out.gz
Thank... :-))
But mysqldump --compress is very nice.
Why add functionality for something that can be done so
easily by piping the output of pg_dump?
This is exactly the kind of coupling of tools that pipes
were invented for.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Fri Nov 12 14:33:04 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA04955
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 14:32:38 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id UAA262682;
Fri, 12 Nov 1999 20:32:34 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <45YXPK4F>; Fri, 12 Nov 1999 20:32:34 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC16D@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SEV <ZeugswetterA@wien.spardat.at>
To: "'Jan Wieck'" <wieck@debis.com>
Cc: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: AW: [HACKERS] compression in LO and other fields
Date: Fri, 12 Nov 1999 20:32:34 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
I don't know if there's a compression library available that
fit's our need. First and most important it must have a
license that permits us to include it in the distribution
under our existing license. Second it's implementation must
not cause any problems in the backend like memory leakage or
the like.
LZO (Lempel-Ziv-Oberhuemer) sounds like a candidate.
http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html
It is a realtime compressor, designed for real time
compression/decompression of data.
It is really fast, like >20 Mb/s decompressions are easily possible and has
a pretty good compression ratio,
almost as good as gzip, since it favours speed over ratio.
It seems to have a pretty safe and compatible license.
It comes with a gzip cmdline compatible program called lzop.
I really love it.
Andreas
From bouncefilter Fri Nov 12 16:20:05 1999
Received: from lycanthrope.crosslink.net (lycanthrope.crosslink.net
[206.246.124.36]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA18241
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 16:19:53 -0500 (EST)
(envelope-from bayardk@crosslink.net)
Received: from crosslink.net ([209.147.70.109]) by lycanthrope.crosslink.net
(8.9.3/) with ESMTP id QAA04635 for
<pgsql-hackers@postgresql.org>; Fri, 12 Nov 1999 16:19:51 -0500
X-Really-To: <pgsql-hackers@postgresql.org>
Message-ID: <382C821C.36863C16@crosslink.net>
Date: Fri, 12 Nov 1999 16:09:48 -0500
From: bayard kohlhepp <bayardk@crosslink.net>
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD NSCPCD47 (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: how to handle struct within EXEC SQL DECLARE SECTION?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
i tried posting this to other groups, as well as searching the archives,
and came up with nothing.
i am using 6.5.2/Mandrake(RedHat)linux 6.0/pentium. i am trying to port
an existing informix 7 web application to postgresql. all of the CGI
programs use embedded SQL. they all use constructs of the form:
...
EXEC SQL BEGIN DECLARE SECTION;
struct user { /* 40 or 50 or 80 fields... */
int x;
...
};
EXEC SQL END DECLARE SECTION;
func1(struct user *x,...);
func2(struct user *X, ...);
main()
{
EXEC SQL BEGIN DECLARE SECTION;
struct user user_rec;
EXEC SQL END DECLARE SECTION;
...
}
ecpg doesn't recognize (ie, "parse error") struct declarations that
occurred outside of the current BEGIN/END section. that forces me to
redeclare the entire struct definition with every variable declaration.
i have gone through and exploded all the declarations to do that, but
now ecpg dies with a segmentation fault, does not report a line number,
and erases the .c in the process so i can't tell how far it got (i
experimented with 2 and 3 field structs, and it worked okay, but some of
these structs have 140+ fields).
what is the proper solution for defining a database record structure,
then declaring variables that use that definition within EXEC SQL
sections?
From bouncefilter Fri Nov 12 16:58:06 1999
Received: from lycanthrope.crosslink.net (lycanthrope.crosslink.net
[206.246.124.36]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA22374
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 16:57:19 -0500 (EST)
(envelope-from bayardk@crosslink.net)
Received: from crosslink.net ([209.147.70.106]) by lycanthrope.crosslink.net
(8.9.3/) with ESMTP id QAA14108 for
<pgsql-hackers@postgreSQL.org>; Fri, 12 Nov 1999 16:57:14 -0500
X-Really-To: <pgsql-hackers@postgreSQL.org>
Message-ID: <382C8AF5.D4EEFBD6@crosslink.net>
Date: Fri, 12 Nov 1999 16:47:33 -0500
From: bayard kohlhepp <bayardk@crosslink.net>
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD NSCPCD47 (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgreSQL.org
Subject: how should you define a struct within EXEC SQL section?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
i tried posting this to other groups, as well as searching the archives,
and came up with nothing.
i am using 6.5.2/Mandrake(RedHat)linux 6.0/pentium. i am trying to port
an existing informix 7 web application to postgresql. all of the CGI
programs use embedded SQL. they all use constructs of the form:
...
EXEC SQL BEGIN DECLARE SECTION;
struct user { /* 40 or 50 or 80 fields... */
int x;
...
};
EXEC SQL END DECLARE SECTION;
func1(struct user *x,...);
func2(struct user *X, ...);
main()
{
EXEC SQL BEGIN DECLARE SECTION;
struct user user_rec;
EXEC SQL END DECLARE SECTION;
...
}
ecpg doesn't recognize (ie, "parse error") struct declarations that
occurred outside of the current BEGIN/END section. that forces me to
redeclare the entire struct definition with every variable declaration.
i have gone through and exploded all the declarations to do that, but
now ecpg dies with a segmentation fault, does not report a line number,
and erases the .c in the process so i can't tell how far it got (i
experimented with 2 and 3 field structs, and it worked okay, but some of
these structs have 140+ fields).
what is the proper solution for defining a database record structure,
then declaring variables that use that definition within EXEC SQL
sections?
From bouncefilter Fri Nov 12 17:04:06 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA23329
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 17:03:07 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 6A22A5554; Sat, 13 Nov 1999 00:02:54 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <382C8E8E.999C67A1@tm.ee>
Date: Sat, 13 Nov 1999 00:02:54 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Jan Wieck <wieck@debis.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, zakkr@zf.jcu.cz, t-ishii@sra.co.jp,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] compression in LO and other fields
References: <m11mIp4-0003kLC@orion.SAPserv.Hamburg.dsh.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Jan Wieck wrote:
Of course.
Well, you asked for the rates on the smaller html files only.
78 files, 131 bytes min, 10000 bytes max, 4582 bytes avg,
357383 bytes total.gzip -9 outputs 145659 bytes (59.2%)
gzip -1 outputs 155113 bytes (56.6%)
my code outputs 184109 bytes (48.5%)67 files, 2000 bytes min, 10000 bytes max, 5239 bytes avg,
351006 bytes total.gzip -9 outputs 141772 bytes (59.6%)
gzip -1 outputs 151150 bytes (56.9%)
my code outputs 179428 bytes (48.9%)The threshold will surely be a tuning parameter of interest.
Another tuning option must be to allow/deny compression per
table at all. Then we could have both options, using a
compressing field type to define which portion of a tuple to
compress, or allow to compress the entire tuples.
The next step would be tweaking the costs for sequential scans vs.
index scans.
I guess that the indexes would stay uncompressed ?
------
Hannu
From bouncefilter Fri Nov 12 17:12:06 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA24778
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 17:11:25 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 492A25554; Sat, 13 Nov 1999 00:11:13 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <382C9080.103696C9@tm.ee>
Date: Sat, 13 Nov 1999 00:11:12 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Don Baccus <dhogaza@pacifier.com>
Cc: Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
"Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>,
Tom Lane <tgl@sss.pgh.pa.us>, t-ishii@sra.co.jp,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
References: <19991112095955.D9755@wallace.ece.rice.edu>
<3.0.1.32.19991112100957.010f0300@mail.pacifier.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Don Baccus wrote:
At 05:15 PM 11/12/99 +0100, Karel Zak - Zakkr wrote:
pg_dump database | gzip >db.out.gz
Thank... :-))
But mysqldump --compress is very nice.
Why add functionality for something that can be done so
easily by piping the output of pg_dump?This is exactly the kind of coupling of tools that pipes
were invented for.
Exactly !
Another version of the same is used when dumping databases
bigger than 2GB (or whatever the file system size limit is)
just do:
pg_dump database | gzip | split -b 1000000000 db.out.gz.
and restore it using
cat db.out.gz* | gunzip > psql
you could also do other fancy things with your dumps - send
them directly to tape storage in Japan or whatever ;)
If you need that functionality often enough then write a shell
script.
---------------
Hannu
From bouncefilter Fri Nov 12 18:28:07 1999
Received: from atbib.be (IDENT:root@a00-212.antw.online.be [62.112.1.212])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA34067
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 18:27:08 -0500 (EST) (envelope-from fve@atbib.be)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id BAA10111;
Sat, 13 Nov 1999 01:26:38 +0100
Message-Id: <3.0.6.32.19991113003130.0087d230@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Sat, 13 Nov 1999 00:31:30 +0100
To: Tom Lane <tgl@sss.pgh.pa.us>
From: Frans Van Elsacker <fve@atbib.be>
Subject: Re: [HACKERS] union problem version 6.5.3
Cc: pgsql-hackers@postgreSQL.org
In-Reply-To: <26964.942420885@sss.pgh.pa.us>
References: <Your message of Fri, 12 Nov 1999 01:10:06 +0100
<3.0.6.32.19991112011006.00876c00@193.75.233.1>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
thanks for your quick answer,
Our earlier version was postgresql 6.4.2
Regards, Frans
At 10:34 12/11/99 -0500, Tom Lane wrote:
Frans Van Elsacker <fve@atbib.be> writes:
I had a little piece of code who works fine up till know, just after
installing
the version 6.5.3 i got the message 'parse error near union'create table work as
select * from opdracht
union
select * from opdrachtproostHmm, the grammar has
CreateAsStmt: CREATE OptTemp TABLE relation_name OptCreateAs AS SubSelect
and SubSelect doesn't allow unions. This is overly restrictive,
I agree, but I thought it had been that way for a good while.
What version were you using before?regards, tom lane
************
From bouncefilter Fri Nov 12 19:00:07 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA39309
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 19:00:03 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id SAA28158;
Fri, 12 Nov 1999 18:58:59 -0500 (EST)
To: Frans Van Elsacker <fve@atbib.be>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] union problem version 6.5.3
In-reply-to: Your message of Sat, 13 Nov 1999 00:31:30 +0100
<3.0.6.32.19991113003130.0087d230@193.75.233.1>
Date: Fri, 12 Nov 1999 18:58:59 -0500
Message-ID: <28156.942451139@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Frans Van Elsacker <fve@atbib.be> writes:
Our earlier version was postgresql 6.4.2
OK, I thought the change was older than that. It probably got into 6.5
as a side-effect of incorporating the INTERSECT/EXCEPT feature. Anyway,
we ought to try to restore the old functionality.
regards, tom lane
Hmm, the grammar has
CreateAsStmt: CREATE OptTemp TABLE relation_name OptCreateAs AS SubSelect
and SubSelect doesn't allow unions. This is overly restrictive,
I agree, but I thought it had been that way for a good while.
What version were you using before?
From bouncefilter Fri Nov 12 20:53:08 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id UAA57089
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 20:52:21 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgresql.org
id m11mSEF-0003kLC; Sat, 13 Nov 99 02:43 MET
Message-Id: <m11mSEF-0003kLC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] compression in LO and other fields
To: hannu@tm.ee (Hannu Krosing)
Date: Sat, 13 Nov 1999 02:43:47 +0100 (MET)
Cc: wieck@debis.com, tgl@sss.pgh.pa.us, zakkr@zf.jcu.cz, t-ishii@sra.co.jp,
pgsql-hackers@postgresql.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <382C8E8E.999C67A1@tm.ee> from "Hannu Krosing" at Nov 13,
99 00:02:54 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Jan Wieck wrote:
Of course.
Well, you asked for the rates on the smaller html files only.
78 files, 131 bytes min, 10000 bytes max, 4582 bytes avg,
357383 bytes total.gzip -9 outputs 145659 bytes (59.2%)
gzip -1 outputs 155113 bytes (56.6%)
my code outputs 184109 bytes (48.5%)67 files, 2000 bytes min, 10000 bytes max, 5239 bytes avg,
351006 bytes total.gzip -9 outputs 141772 bytes (59.6%)
gzip -1 outputs 151150 bytes (56.9%)
my code outputs 179428 bytes (48.9%)The threshold will surely be a tuning parameter of interest.
Another tuning option must be to allow/deny compression per
table at all. Then we could have both options, using a
compressing field type to define which portion of a tuple to
compress, or allow to compress the entire tuples.The next step would be tweaking the costs for sequential scans vs.
index scans.I guess that the indexes would stay uncompressed ?
------
Hannu
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Nov 12 21:02:08 1999
Received: from thelab.hub.org (nat198.58.mpoweredpc.net [142.177.198.58])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA58176
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 21:02:03 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id WAA74835;
Fri, 12 Nov 1999 22:02:10 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 12 Nov 1999 22:02:10 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Jan Wieck <wieck@debis.com>, zakkr@zf.jcu.cz, t-ishii@sra.co.jp,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] compression in LO and other fields
In-Reply-To: <26760.942419535@sss.pgh.pa.us>
Message-ID: <Pine.BSF.4.10.9911122156360.2296-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
Tom Lane wrote:
It occurred to me last night that applying compression to individual
fields might not be the best approach. Certainly a "bytez" data type
is the easiest thing to fit into the existing system, but it's leaving
some space savings on the table. What about compressing the *whole*
data contents of a tuple on-disk, as a single entity? That should save
more space than field-by-field compression.But it requires decompression of every tuple into palloc()'d
memory during heap access. AFAIK, the heap access routines
currently return a pointer to the tuple inside the shm
buffer. Don't know what it's performance impact would be.Good point, but the same will be needed when a tuple is split across
multiple blocks. I would expect that (given a reasonably fast
decompressor) there will be a net performance *gain* due to having
less disk I/O to do.
Right now, we're dealing theory...my concern is what Jan points
out "what it's performance impact would be"...would much harder would it
be to extent our "CREATE TABLE" syntax to do something like:
CREATE TABLE classname ( .. ) compressed;
Or something similar? Something that leaves the ability to do
this in the core, but makes the use of this the choice of the admin?
*Assuming* that I'm also reading this thread correctly, it should
almost be extended into "ALTER TABLE classname SET COMPRESSED on;", or
something like that. Where all new records are *written* compressed (or
uncompressed), but any reads checks if compressed size == uncompressed
size, and decompresses accordingly...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Nov 12 21:34:09 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id VAA62253
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 21:33:35 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgresql.org
id m11mSsA-0003kzC; Sat, 13 Nov 99 03:25 MET
Message-Id: <m11mSsA-0003kzC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] compression in LO and other fields
To: hannu@tm.ee (Hannu Krosing)
Date: Sat, 13 Nov 1999 03:25:02 +0100 (MET)
Cc: wieck@debis.com, tgl@sss.pgh.pa.us, zakkr@zf.jcu.cz, t-ishii@sra.co.jp,
pgsql-hackers@postgresql.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <382C8E8E.999C67A1@tm.ee> from "Hannu Krosing" at Nov 13,
99 00:02:54 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Ech - wrong key :-)
Hannu Krosing wrote:
Jan Wieck wrote:
The next step would be tweaking the costs for sequential scans vs.
index scans.I guess that the indexes would stay uncompressed ?
I'm sure about this. On a database of significant size,
anyone indexing a field with a possible size over 100 bytes
is doing something wrong (and only idiots go above 500
bytes). They are IMPLEMENTING a not well thought out database
DESIGN. A database engine should support indices on bigger
fields, but it's still a bad schema and thus idiotic.
Currently, we don't check the size of indexed fields. And the
only problems I've seen with it where some reports that huge
PL functions could not be created because there was an unused
(idiotic) index on the prosrc attribute and they exceeded the
4K limit for index tuples. I've removed this index already in
the v7.0 tree. The ?bug? in the btree code, failing to split
a page if the key values exceed 4K, is still there. But I
don't think anyone really cares for it.
Thus, I assume there aren't many idiots out there. And I
don't expect that anyone would ever create an index on a
compressed data type.
?bug? -> The difference between a bug and a feature is
DOCUMENTATION. Thomas, would you please add this limit on
index tuples to the doc's so we have a new FEATURE to tell in
the v7.0 announcement?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Nov 12 22:01:09 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id WAA66773
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 22:00:23 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgresql.org
id m11mTI4-0003l0C; Sat, 13 Nov 99 03:51 MET
Message-Id: <m11mTI4-0003l0C@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] compression in LO and other fields
To: scrappy@hub.org (The Hermit Hacker)
Date: Sat, 13 Nov 1999 03:51:48 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, wieck@debis.com, zakkr@zf.jcu.cz, t-ishii@sra.co.jp,
pgsql-hackers@postgresql.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.BSF.4.10.9911122156360.2296-100000@thelab.hub.org> from
"The Hermit Hacker" at Nov 12, 99 10:02:10 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Marc G. Fournier wrote:
On Fri, 12 Nov 1999, Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
Tom Lane wrote:
Right now, we're dealing theory...my concern is what Jan points
out "what it's performance impact would be"...would much harder would it
be to extent our "CREATE TABLE" syntax to do something like:CREATE TABLE classname ( .. ) compressed;
Or something similar? Something that leaves the ability to do
this in the core, but makes the use of this the choice of the admin?
Yepp, exactly that's what I meant with making tuple
compression a per table option. Obviously, ALTER TABLE ...
must be supported too - that's simply a parser -> utility ->
flip flag in pg_class thing (90% cut&paste).
I think the part on deciding what to compress is easy,
because the flag telling if heap access should try to
compress a tuple on append (i.e. INSERT or UPDATE) has to be
in pg_class. And the content of a relations pg_class entry is
somewhere below the Relation struct (thus already known after
heap_open).
The idea was to use another bit in the tuple header to tell
if an existing heap tuple's data is compressed or not. So the
heap fetching allways looks at the bit in the tuple header,
and the heap appending looks at the flag in the relation
pointer. That's exactly what you want, no?
The major part is to make all callers of heap_fetch() and
sisters treat in memory decompressed (or from block split
reconstructed) tuples the right way.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Nov 12 22:48:09 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA85359
for <pgsql-hackers@postgresql.org>;
Fri, 12 Nov 1999 22:47:43 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA28579;
Fri, 12 Nov 1999 22:45:57 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: scrappy@hub.org (The Hermit Hacker), zakkr@zf.jcu.cz, t-ishii@sra.co.jp,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] compression in LO and other fields
In-reply-to: Your message of Sat, 13 Nov 1999 03:51:48 +0100 (MET)
<m11mTI4-0003l0C@orion.SAPserv.Hamburg.dsh.de>
Date: Fri, 12 Nov 1999 22:45:57 -0500
Message-ID: <28577.942464757@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
The idea was to use another bit in the tuple header to tell
if an existing heap tuple's data is compressed or not. So the
heap fetching allways looks at the bit in the tuple header,
and the heap appending looks at the flag in the relation
pointer. That's exactly what you want, no?
Right. Compressed tuples must be unambiguously marked as such on-disk.
Whether to compress a tuple when writing it out is a decision that
can be made on-the-fly, using strategies that could change from time
to time, without invalidating the data that's already out there or
affecting the tuple-reading code.
If we choose to provide also a way of compressing individual fields
rather than whole tuples, it would be good to provide the same
flexibility at the field level. Some tuples might contain the field
in compressed form, some in uncompressed form. The reading logic
should not need to be aware of the way that the writing logic chooses
which to do.
regards, tom lane
From bouncefilter Fri Nov 12 23:11:12 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA89676
for <hackers@postgreSQL.org>; Fri, 12 Nov 1999 23:10:42 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA28744;
Fri, 12 Nov 1999 23:10:02 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] RFC: create/alter user extension
In-reply-to: Your message of Fri, 12 Nov 1999 16:02:45 +0100 (CET)
<Pine.LNX.4.20.9911121555290.1261-100000@peter-e.yi.org>
Date: Fri, 12 Nov 1999 23:10:02 -0500
Message-ID: <28742.942466202@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
Is everyone okay with the following syntax:
CREATE USER username
[ WITH ID digits ]
^^^^^^^^^^^^^^^^^^
The catch is that ID would have to be a new keyword and we'd have to live
with that for a long time. Other choices include:
* UID
* SYSID
* USESYSID
etc.
I'd be inclined to go with UID or SYSID. In any case, since the new
keyword is used in such a limited context, we could almost certainly
still allow it as a ColId and thus not create any real compatibility
problem.
regards, tom lane
From bouncefilter Fri Nov 12 23:33:10 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA92483
for <pgsql-hackers@postgreSQL.org>;
Fri, 12 Nov 1999 23:32:17 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA28765;
Fri, 12 Nov 1999 23:30:55 -0500 (EST)
To: bhirt@mobygames.com
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
In-reply-to: Your message of Fri, 12 Nov 1999 12:02:07 -0600
<19991112120207.A27778@loopy.berkhirt.com>
Date: Fri, 12 Nov 1999 23:30:55 -0500
Message-ID: <28763.942467455@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Brian Hirt <bhirt@mobygames.com> writes:
On Fri, Nov 12, 1999 at 09:58:14AM -0500, Tom Lane wrote:
If it's bugging you enough to go fix it now, contributions are always
welcome ;-)
Okay, what would be the correct approach to solving the problem,
and where would be a good place to start? I'v only been on this list
for a few weeks, so I'm missed discussion on the approach to solving
this problem. Should this change be localized to just the planner?
Should the rewrite system be creating a different query tree? Will both
need to be changed? If a lot of work is being done to this part of
the system, is now a bad time to try this work?
Well, actually, figuring out how & where to do it is the trickiest part
of the work. Might not be the best project for a newbie backend-hacker
to start with :-(.
After a few moments' thought, it seems to me that this issue might be
closely intertwined with the OUTER JOIN stuff that Thomas is working on
and the querytree representation redesign that Jan and I have been
muttering about (but not yet actually doing anything about). We want
to handle SELECT ... WHERE expr IN (SELECT ...) like a join, but the
semantics aren't exactly the same as a conventional join, so it might
be that the thing needs to be rewritten as a special join type. In
that case it'd fit right in with OUTER JOIN, I suspect.
The Informix EXPLAIN results that Theo Kramer posted (a few messages
back in this thread) are pretty interesting too. If I'm reading that
printout right, Informix is not any smarter than we are about choosing
the scan types for the outer and inner queries; and yet they have a much
faster runtime for the WHERE IN query. I speculate that they are doing
the physical matching of outer and inner tuples in a smarter way than we
are --- perhaps they are doing one scan of the inner query and entering
all the values into a hashtable that's then probed for each outer tuple.
(As opposed to rescanning the inner query for each outer tuple, as we
currently do.) If that's the answer, then it could probably be
implemented as a localized change: rewrite the SubPlan node executor to
look more like the HashJoin node executor. This isn't perfect --- it
wouldn't pick up the possibility of a merge-style join --- but it would
be better than what we have for a lot less work than the "full" solution.
This is all shooting from the hip; I haven't spent time looking into it.
Has anyone else got insights to offer?
regards, tom lane
From bouncefilter Sat Nov 13 00:17:11 1999
Received: from mailhub.southeast.net (root@mailhub.southeast.net
[207.98.192.83]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA99914
for <pgsql-hackers@postgresql.org>;
Sat, 13 Nov 1999 00:16:58 -0500 (EST)
(envelope-from mtsinc@southeast.net)
Received: from southeast.net (mail.mousetech.com [216.199.14.19])
by mailhub.southeast.net (8.8.5/8.8.5) with ESMTP id AAA16724
for <pgsql-hackers@postgresql.org>;
Sat, 13 Nov 1999 00:16:55 -0500 (EST)
Message-ID: <382CF140.CBC119C9@southeast.net>
Date: Sat, 13 Nov 1999 00:04:00 -0500
From: Tim Holloway <mtsinc@southeast.net>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Thread-safe queueing?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I need to create a cross-process producer/consumer data queue (e.g. singly-linked list).
That is - Processes A, B, and C add nodes to a controlled list and process D removes them.
Not sure if the creation of the nodes would be best done by the producers or consumers,
but destruction would have to be done by the consumer, as the producers don't wait for
processing. For optimal results, the consumer process should sleep until item(s) are added
to its queue.
Query: within the existing backend framework, what's the best way to accomplish this?
Thanks,
Tim Holloway
From bouncefilter Sat Nov 13 02:54:12 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA17107
for <hackers@postgreSQL.org>; Sat, 13 Nov 1999 02:53:44 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id CAA29204;
Sat, 13 Nov 1999 02:53:09 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] Backend build fails in current
In-reply-to: Your message of Mon, 8 Nov 1999 15:37:02 +0100 (MET)
<Pine.GSO.4.02A.9911081528230.2099-100000@Krokodil.DoCS.UU.SE>
Date: Sat, 13 Nov 1999 02:53:09 -0500
Message-ID: <29202.942479589@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
...
make -C common parser/parse.h
make[4]: Entering directory `/home/fenix0/eh99/e99re41/pgsql/src/backend/access/common'
make[4]: *** No rule to make target `parser/parse.h'. Stop.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Are you still seeing this? I didn't see it with a pull from CVS
yesterday. If you are, what version of make are you using?
regards, tom lane
From bouncefilter Sat Nov 13 04:54:14 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA36562
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 04:53:27 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame.flame.co.za [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id LAA26775
for <pgsql-hackers@postgreSQL.org>; Sat, 13 Nov 1999 11:55:38 +0200
Sender: theo@flame.flame.co.za
Message-ID: <382D359A.DB093E91@flame.co.za>
Date: Sat, 13 Nov 1999 11:55:38 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Slow - grindingly slow - query
References: <28763.942467455@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
The Informix EXPLAIN results that Theo Kramer posted (a few messages
back in this thread) are pretty interesting too. If I'm reading that
printout right, Informix is not any smarter than we are about choosing
the scan types for the outer and inner queries; and yet they have a much
faster runtime for the WHERE IN query.
The informix EXPLAIN for the 'not in' query was when I did not have an
index on registrationtype (the explain appends to file sqexplain.out so I
missed it :(). Anyway here is the Informix EXPLAIN with the index on
registrationtype.
QUERY:
------
select accountdetail.domain from accountdetail where
accountdetail.domain not in (select accountmaster.domain from accountmaster)
Estimated Cost: 4510
Estimated # of Rows Returned: 58810
1) informix.accounts: SEQUENTIAL SCAN
Filters: (informix.accounts.domain != ALL <subquery> AND
informix.accounts.registrationtype != 'N' )
Subquery:
---------
Estimated Cost: 12
Estimated # of Rows Returned: 10
1) informix.accounts: INDEX PATH
(1) Index Keys: registrationtype
Lower Index Filter: informix.accounts.registrationtype = 'N'
The speed difference with or without the subquery index is neglible for
Informix.
--------
Regards
Theo
From bouncefilter Sat Nov 13 08:37:16 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id IAA58009
for <hackers@postgreSQL.org>; Sat, 13 Nov 1999 08:36:44 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Val.DoCS.UU.SE (e99re41@Val.DoCS.UU.SE [130.238.9.94]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id OAA22716;
Sat, 13 Nov 1999 14:36:35 +0100
Received: from localhost (e99re41@localhost) by Val.DoCS.UU.SE (8.6.12/8.6.12)
with SMTP id OAA01327; Sat, 13 Nov 1999 14:36:32 +0100
X-Authentication-Warning: Val.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Sat, 13 Nov 1999 14:36:31 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] Backend build fails in current
In-Reply-To: <29202.942479589@sss.pgh.pa.us>
Message-ID: <Pine.GSO.4.02A.9911131431230.606-100000@Val.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sat, 13 Nov 1999, Tom Lane wrote:
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
...
make -C common parser/parse.h
make[4]: Entering directory `/home/fenix0/eh99/e99re41/pgsql/src/backend/access/common'
make[4]: *** No rule to make target `parser/parse.h'. Stop.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Are you still seeing this? I didn't see it with a pull from CVS
yesterday. If you are, what version of make are you using?
Affirmative. Same problem.
GNU Make version 3.74, by Richard Stallman and Roland McGrath.
That's a little old it seems, but I don't have any power to upgrade it on
this particular machine. It should certainly be possible to fix the make
files, since requiring GNU make is already a hassle for some, but
requiring the latest version might be too much to ask for?
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Nov 13 08:38:16 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id IAA58046
for <hackers@postgreSQL.org>; Sat, 13 Nov 1999 08:38:06 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Val.DoCS.UU.SE (e99re41@Val.DoCS.UU.SE [130.238.9.94]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id OAA22800;
Sat, 13 Nov 1999 14:38:05 +0100
Received: from localhost (e99re41@localhost) by Val.DoCS.UU.SE (8.6.12/8.6.12)
with SMTP id OAA01331; Sat, 13 Nov 1999 14:38:03 +0100
X-Authentication-Warning: Val.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Sat, 13 Nov 1999 14:38:03 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] RFC: create/alter user extension
In-Reply-To: <28742.942466202@sss.pgh.pa.us>
Message-ID: <Pine.GSO.4.02A.9911131436450.606-100000@Val.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 12 Nov 1999, Tom Lane wrote:
Peter Eisentraut <peter_e@gmx.net> writes:
Is everyone okay with the following syntax:
CREATE USER username
[ WITH ID digits ]
^^^^^^^^^^^^^^^^^^The catch is that ID would have to be a new keyword and we'd have to live
with that for a long time. Other choices include:
* UID
* SYSID
* USESYSID
etc.I'd be inclined to go with UID or SYSID. In any case, since the new
keyword is used in such a limited context, we could almost certainly
still allow it as a ColId and thus not create any real compatibility
problem.
I'm not sure about this distinction. Where would that be reflected in the
(parser) code?
-Peter
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Nov 13 09:51:17 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA65303
for <hackers@postgreSQL.org>; Sat, 13 Nov 1999 09:50:41 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA00281;
Sat, 13 Nov 1999 09:50:08 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] Backend build fails in current
In-reply-to: Your message of Sat, 13 Nov 1999 14:36:31 +0100 (MET)
<Pine.GSO.4.02A.9911131431230.606-100000@Val.DoCS.UU.SE>
Date: Sat, 13 Nov 1999 09:50:08 -0500
Message-ID: <279.942504608@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
Are you still seeing this? I didn't see it with a pull from CVS
yesterday. If you are, what version of make are you using?
Affirmative. Same problem.
GNU Make version 3.74, by Richard Stallman and Roland McGrath.
That's a little old it seems,
It is. I'd suggest leaning on your sysadmin to get it updated to
something current (3.78.1 is current I think).
In the meantime, please try the attached patch. If it seems to
straighten out the behavior on your make, I'll commit it.
regards, tom lane
*** src/backend/Makefile.orig Sun Mar 7 18:05:56 1999
--- src/backend/Makefile Sat Nov 13 09:43:17 1999
***************
*** 116,127 ****
# make files in our subdirectories.
parse.h: parser/parse.h
- $(MAKE) -C parser parse.h
cp parser/parse.h .
! fmgr.h:
! $(MAKE) -C utils fmgr.h
cp utils/fmgr.h .
#############################################################################
clean:
--- 116,131 ----
# make files in our subdirectories.
parse.h: parser/parse.h
cp parser/parse.h .
! parser/parse.h:
! $(MAKE) -C parser parse.h
!
! fmgr.h: utils/fmgr.h
cp utils/fmgr.h .
+
+ utils/fmgr.h:
+ $(MAKE) -C utils fmgr.h
#############################################################################
clean:
From bouncefilter Sat Nov 13 09:58:17 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA65998
for <hackers@postgreSQL.org>; Sat, 13 Nov 1999 09:57:40 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA00320;
Sat, 13 Nov 1999 09:57:08 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] RFC: create/alter user extension
In-reply-to: Your message of Sat, 13 Nov 1999 14:38:03 +0100 (MET)
<Pine.GSO.4.02A.9911131436450.606-100000@Val.DoCS.UU.SE>
Date: Sat, 13 Nov 1999 09:57:08 -0500
Message-ID: <318.942505028@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
I'd be inclined to go with UID or SYSID. In any case, since the new
keyword is used in such a limited context, we could almost certainly
still allow it as a ColId and thus not create any real compatibility
problem.
I'm not sure about this distinction. Where would that be reflected in the
(parser) code?
You should try to add this (or any other) new keyword to the list in the
ColId: production in gram.y. If that doesn't provoke any complaints
from yacc (shift/reduce conflicts etc), then you're home free: the
parser won't get confused if the keyword is used as a column name.
If it does cause a shift/reduce conflict, which is fairly likely for
anything that can appear inside an expression, you might still be
able to add the new keyword to the ColLabel: list. That allows it
to be used as an identifier in a more restricted set of contexts.
Only if neither of these will work does the keyword need to be a
truly "reserved" word.
regards, tom lane
From bouncefilter Sat Nov 13 10:16:17 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA67927
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 10:15:28 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA00433;
Sat, 13 Nov 1999 10:14:21 -0500 (EST)
To: Tim Holloway <mtsinc@southeast.net>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Thread-safe queueing?
In-reply-to: Your message of Sat, 13 Nov 1999 00:04:00 -0500
<382CF140.CBC119C9@southeast.net>
Date: Sat, 13 Nov 1999 10:14:21 -0500
Message-ID: <431.942506061@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Tim Holloway <mtsinc@southeast.net> writes:
I need to create a cross-process producer/consumer data queue
(e.g. singly-linked list). That is - Processes A, B, and C add nodes
to a controlled list and process D removes them. Not sure if the
creation of the nodes would be best done by the producers or
consumers, but destruction would have to be done by the consumer, as
the producers don't wait for processing. For optimal results, the
consumer process should sleep until item(s) are added to its queue.
Query: within the existing backend framework, what's the best way to
accomplish this?
More context, please. What are you trying to accomplish? Is this
really a communication path between backends (and if so, what backend
code needs it?), or are you trying to set up a queue between SQL
clients? How much data might need to be in the queue at one time?
regards, tom lane
From bouncefilter Sat Nov 13 10:42:18 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA70642
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 10:41:35 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA00704;
Sat, 13 Nov 1999 10:41:02 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Backend build fails in current
In-reply-to: Your message of Sat, 13 Nov 1999 16:19:38 +0100 (MET)
<Pine.GSO.4.02A.9911131606450.606-100000@Val.DoCS.UU.SE>
Date: Sat, 13 Nov 1999 10:41:02 -0500
Message-ID: <702.942507662@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Okay, the build went fine, but the following came up:
make -C parser all
make[1]: Entering directory `/home/fenix0/eh99/e99re41/postgresql-cur/src/backend/parser'
Makefile:39: warning: overriding commands for target `parse.h'
Makefile:34: warning: ignoring old commands for target `parse.h'
With that fixed you could commit it.
I haven't the foggiest how to work around that --- but since my make
(3.76.1, no spring chicken itself) doesn't generate any such complaint,
I'd say it's another bug in that old version you have.
My inclination is to apply the patch anyway, since it's cleaner coding.
If make 3.74 does the right things despite the warning, then you could
live with it. Otherwise, time to upgrade.
It seems we ought to add a minimum GNU make version number to the list
of prerequisites for Postgres. Data points so far are that 3.74 has
problems and 3.76.1 is OK --- can anyone fill in more observations?
Anyone using 3.75, for instance?
regards, tom lane
From bouncefilter Sat Nov 13 11:34:19 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA75554
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 11:34:09 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id LAA24305;
Sat, 13 Nov 1999 11:19:42 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911131619.LAA24305@candle.pha.pa.us>
Subject: Re: [HACKERS] Backend build fails in current
In-Reply-To: <702.942507662@sss.pgh.pa.us> from Tom Lane at "Nov 13,
1999 10:41:02 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sat, 13 Nov 1999 11:19:42 -0500 (EST)
CC: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
It seems we ought to add a minimum GNU make version number to the list
of prerequisites for Postgres. Data points so far are that 3.74 has
problems and 3.76.1 is OK --- can anyone fill in more observations?
Anyone using 3.75, for instance?
3.75 ships with BSD/OS and is fine.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Nov 13 11:37:19 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA75992
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 11:36:53 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id LAA24800;
Sat, 13 Nov 1999 11:35:47 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911131635.LAA24800@candle.pha.pa.us>
Subject: Failure to show descriptions in \df command
In-Reply-To: <Pine.LNX.4.20.9911112236460.442-100000@peter-e.yi.org> from
Peter
Eisentraut at "Nov 11, 1999 10:37:49 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sat, 13 Nov 1999 11:35:47 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Peter, I no longer see the pg_description descriptions when using the
\do, \df, and \dT commands.
The commands are much less useful without the descriptions. Seems \dd
with a string is much smarter, and pulls descriptions based on string
matching.
Interesting that \dd shows descriptions of everything.
Not sure how to recommend you change this. The new \df and \do
displays are much clearer without the descriptions. It seems \df and
\do show additional information about argument types and return values,
while \dd shows comments.
Maybe just add descriptions to \dT, and suggest people use \dd to get
info about specific operators of functions? But that kind of messes the
clarity of using \dd for descriptions.
I am stumped. Maybe it can't be improved.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Nov 13 12:16:19 1999
Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net
[194.217.242.39]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA80940
for <pgsql-hackers@postgresql.org>;
Sat, 13 Nov 1999 12:15:43 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1)
id 11mgm3-000P0j-0B; Sat, 13 Nov 1999 17:15:39 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id RAA16056; Sat, 13 Nov 1999 17:15:28 GMT
Message-Id: <199911131715.RAA16056@mtcc.demon.co.uk>
Date: Sat, 13 Nov 1999 17:15:28 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: Re: [HACKERS] translate function (BUG?)
To: pgsql-hackers@postgresql.org, ramirez@doc.mssm.edu
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: yG7jW03obvAJZUF/dUwfdQ==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
What happened with this?
I think I saw a response from Bruce but it wasn't fixed and
doesn't appear in the current CVS of V7.
Keith.
From: Edwin Ramirez <ramirez@doc.mssm.edu>
Hello all,I was looking at the translate function and I think that it does not
behave quite right. I modified the translate function in
oracle_compat.c (included below) to make work more like its Oracle
counterpart. It seems to work but it returns the following message:
NOTICE: PortalHeapMemoryFree: 0x8241fcc not in alloc set!Below are the Oracle and Postgres session transcripts.
select translate('edwin', 'wi', 'af') from dual;
ORACLE:
TRANS
-----
edafn
1 row selected.POSTGRES
translate
---------
edain
(1 row)
<snip>
From bouncefilter Sat Nov 13 12:16:19 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id MAA80971
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 12:15:57 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Val.DoCS.UU.SE (e99re41@Val.DoCS.UU.SE [130.238.9.94]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id SAA05318;
Sat, 13 Nov 1999 18:15:55 +0100
Received: from localhost (e99re41@localhost) by Val.DoCS.UU.SE (8.6.12/8.6.12)
with SMTP id SAA03140; Sat, 13 Nov 1999 18:15:53 +0100
X-Authentication-Warning: Val.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Sat, 13 Nov 1999 18:15:53 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <maillist@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: Failure to show descriptions in \df command
In-Reply-To: <199911131635.LAA24800@candle.pha.pa.us>
Message-ID: <Pine.GSO.4.02A.9911131804490.606-100000@Val.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
You can turn the descriptions on by typing \set description on (or \set
description foo, or whatever, as long as it's something), for example, in
your ~/.psqlrc (or in your .psqlrc-7.0.0 if you don't want to interfere
with the current version).
The reason for having descriptions off by default was that in a number of
views (I recall functions and operators), they don't fit on the screen
very nicely. On the other hand, the \dd command always shows descriptions,
because it's sort of the built-in manual, but it doesn't show anything
else (argument types, etc.).
Read the fine (SGML) manual ;)
-Peter
On Sat, 13 Nov 1999, Bruce Momjian wrote:
Peter, I no longer see the pg_description descriptions when using the
\do, \df, and \dT commands.The commands are much less useful without the descriptions. Seems \dd
with a string is much smarter, and pulls descriptions based on string
matching.Interesting that \dd shows descriptions of everything.
Not sure how to recommend you change this. The new \df and \do
displays are much clearer without the descriptions. It seems \df and
\do show additional information about argument types and return values,
while \dd shows comments.Maybe just add descriptions to \dT, and suggest people use \dd to get
info about specific operators of functions? But that kind of messes the
clarity of using \dd for descriptions.I am stumped. Maybe it can't be improved.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Nov 13 13:21:20 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA88720
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 13:21:04 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id NAA27752;
Sat, 13 Nov 1999 13:19:19 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911131819.NAA27752@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: Failure to show descriptions in \df command
In-Reply-To: <Pine.GSO.4.02A.9911131804490.606-100000@Val.DoCS.UU.SE> from
Peter Eisentraut at "Nov 13, 1999 06:15:53 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sat, 13 Nov 1999 13:19:19 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
You can turn the descriptions on by typing \set description on (or \set
description foo, or whatever, as long as it's something), for example, in
your ~/.psqlrc (or in your .psqlrc-7.0.0 if you don't want to interfere
with the current version).
OK. I noticed that the existance of an .psqlrc file causes an extra
newline to be printed on startup before the first prompt. Is that
intentional?
The reason for having descriptions off by default was that in a number of
views (I recall functions and operators), they don't fit on the screen
very nicely. On the other hand, the \dd command always shows descriptions,
because it's sort of the built-in manual, but it doesn't show anything
else (argument types, etc.).
Got it. Yes, much clearer for \df and \do. I noticed that using \set
description on and then using \dT generates an error of:
test=> \set description on
test=> \dT
ERROR: Relation 'p' does not exist
Also, the \set commands don't seem to complain about bad commands:
test=> \set figgle
test=>
Is that intentional?
Read the fine (SGML) manual ;)
That was part of my problem. I hadn't figured out how to generate html
from the sgml ref stuff. I just spent some time and figured out I have
to issue the 'make' command from the upper sgml directory because there
is no Makefile in the sgml/ref directory. I can view them fine now.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Nov 13 16:15:22 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA06162
for <pgsql-hackers@postgresql.org>;
Sat, 13 Nov 1999 16:14:51 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame.flame.co.za [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id XAA27921
for <pgsql-hackers@postgresql.org>; Sat, 13 Nov 1999 23:17:21 +0200
Sender: theo@flame.flame.co.za
Message-ID: <382DD561.4A6E05E7@flame.co.za>
Date: Sat, 13 Nov 1999 23:17:21 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: My bits moved right off the end of the world...
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This message appeared from the backend when running vacuum
analyze on our live data. I remember seeing a posting
regarding this sometime back but no longer have this message.
The version of postgres is 6.5.1 on RH6. There is more than
sufficient disk space left, and postmaster does not seem
to be running out of memory.
Any help would be much appreciated.
--------
Regards
Theo
From bouncefilter Sat Nov 13 16:26:22 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id QAA09093
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 16:26:01 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Val.DoCS.UU.SE (e99re41@Val.DoCS.UU.SE [130.238.9.94]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id WAA19120;
Sat, 13 Nov 1999 22:25:57 +0100
Received: from localhost (e99re41@localhost) by Val.DoCS.UU.SE (8.6.12/8.6.12)
with SMTP id WAA03486; Sat, 13 Nov 1999 22:25:56 +0100
X-Authentication-Warning: Val.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Sat, 13 Nov 1999 22:25:55 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Theo Kramer <theo@flame.co.za>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] My bits moved right off the end of the world...
In-Reply-To: <382DD561.4A6E05E7@flame.co.za>
Message-ID: <Pine.GSO.4.02A.9911132223590.606-100000@Val.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
I recall that this was due to a corrupted B-Tree index. Try dropping and
rebuilding that, if you have one.
I also recall that Bruce, this being his "favourite error message", wanted
to make it "show it more often", so perhaps it now comes up in different
situations as well. ;)
-Peter
On Sat, 13 Nov 1999, Theo Kramer wrote:
This message appeared from the backend when running vacuum
analyze on our live data. I remember seeing a posting
regarding this sometime back but no longer have this message.The version of postgres is 6.5.1 on RH6. There is more than
sufficient disk space left, and postmaster does not seem
to be running out of memory.Any help would be much appreciated.
--------
Regards
Theo************
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Nov 13 17:21:22 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA15062
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 17:20:38 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id RAA04771;
Sat, 13 Nov 1999 17:19:06 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911132219.RAA04771@candle.pha.pa.us>
Subject: Re: [HACKERS] My bits moved right off the end of the world...
In-Reply-To: <Pine.GSO.4.02A.9911132223590.606-100000@Val.DoCS.UU.SE> from
Peter Eisentraut at "Nov 13, 1999 10:25:55 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sat, 13 Nov 1999 17:19:06 -0500 (EST)
CC: Theo Kramer <theo@flame.co.za>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I recall that this was due to a corrupted B-Tree index. Try dropping and
rebuilding that, if you have one.I also recall that Bruce, this being his "favourite error message", wanted
to make it "show it more often", so perhaps it now comes up in different
situations as well. ;)
That's still on my TODO list. :-)
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Nov 13 17:22:22 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA15114
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 17:21:38 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA01877
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 17:21:07 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: Status of sql_help.h
Date: Sat, 13 Nov 1999 17:21:07 -0500
Message-ID: <1874.942531667@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
I see that src/bin/psql/sql_help.h is now generated automatically
from the SGML documentation. This is a Good Thing. But: since
sql_help.h is now a derived file, shouldn't it be removed from the
CVS repository, for the same reasons that we don't keep gram.c
and other derived files in CVS? If we leave it there, it'll generate
a lot of extra update traffic.
The only reason I can see for leaving it in CVS is that if we remove it,
people who pull sources from CVS would need Perl in order to build psql.
(People who download tarballs would *not*, since release_prep updates
sql_help.h along with the other derived files.) That's annoying, but
I think it may not be a fatal objection. Most hackers are probably
more likely to already have Perl than to already have bison or flex...
I thought about suggesting that create_help.pl be rewritten in some
"more portable" fashion such as an awk script. But really, if you
consider non-Unix platforms, Perl is more portable than awk or any
other likely alternative. (It might be worthwhile to remove the one
or two unnecessary Perl-5-isms in the script, so that it will run on
Perl 4 if that's what's available.)
Comments? Anyone feel that we really can't expect users of the CVS
repository to have Perl?
regards, tom lane
PS: "make distclean" should probably not remove sql_help.h, for the
same reasons that we don't remove gram.c --- it *is* a distributed
file, and a particular user might not have the tools to rebuild it.
This is true whether or not we leave it in CVS.
From bouncefilter Sat Nov 13 17:24:23 1999
Received: from mail1.radix.net (mail1.radix.net [207.192.128.31])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA15250
for <pgsql-hackers@hub.org>; Sat, 13 Nov 1999 17:23:29 -0500 (EST)
(envelope-from cobrien@saltmine.radix.net)
Received: from saltmine.radix.net (saltmine.radix.net [207.192.128.40])
by mail1.radix.net (8.9.3/8.9.3) with ESMTP id RAA00597
for <pgsql-hackers@hub.org>; Sat, 13 Nov 1999 17:23:18 -0500 (EST)
Received: (from cobrien@localhost)
by saltmine.radix.net (8.8.7/8.8.7) id RAA05987
for pgsql-hackers@hub.org; Sat, 13 Nov 1999 17:23:15 -0500 (EST)
From: "Cary O'Brien" <cobrien@Radix.Net>
Message-Id: <199911132223.RAA05987@saltmine.radix.net>
Subject: Compression in LO and other fields
To: pgsql-hackers@hub.org
Date: Sat, 13 Nov 1999 17:23:15 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL48 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Some observations about compression (sorry if this is obvious):
Compression won't work unless there is redundancy in the information
being compressed. In a normal [1]Whatever the heck that is. database, there may be a little
redundancy in each row. The real redundancy will be when you group
rows together. I.E. in it is quite likely that many rows will have
identical or similar values for some columns. It may be worth
considering compressing each storage block[2]My lack of understanding of PostgreSQL storage manager internals is showing., in the hopes that each
block will contain several rows, and that the rows will have some
similar (redundant) information. Then compression will work. Just
compressing one column of one row may work in some situations, but
in general, it won't.
Once a while ago we implemented a storage system where we grouped
records (about 1k in size) into blocks (about 16k in size) and
compressed each block individually. To get at a record you had to
decompress the block it was in, and skip to the desired offset. Even
though the system had to throw away a lot [3]Half a block on average. of data for each
retrieval, the system turned out to be be both economical of disk[4]Optical disk in this particular app.
storage and fast at retrieval. For this app we found that compression
rates increased as we got up to about 16 records, and then flattend
off. I.E. compressing 16 records used less space than compressing 4
groups of 4, but compressing 256 records together used as much space
as compressing 16 groups of 16.
The point?
I wish I understood the PostgreSQL backend storage algorithms better,
but it seems that the combination of a Tuneable block size [5]This is an option now, right? But is it compile time, or run-time? and is it postmaster-wide, per database? I *try* to read the pgsql-hackers-digest but there is just too much going on! and
an option to compress individual storage blocks [6]Can this work with the existing data file structure? might be worth
looking at.
-- cary
[1]: Whatever the heck that is.
[2]: My lack of understanding of PostgreSQL storage manager internals is showing.
internals is showing.
[3]: Half a block on average.
[4]: Optical disk in this particular app.
[5]: This is an option now, right? But is it compile time, or run-time? and is it postmaster-wide, per database? I *try* to read the pgsql-hackers-digest but there is just too much going on!
and is it postmaster-wide, per database? I *try* to read the pgsql-hackers-digest
but there is just too much going on!
[6]: Can this work with the existing data file structure?
From bouncefilter Sat Nov 13 20:18:24 1999
Received: from mailhub.southeast.net (root@mailhub.southeast.net
[207.98.192.83]) by hub.org (8.9.3/8.9.3) with ESMTP id UAA36341
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 20:17:54 -0500 (EST)
(envelope-from mtsinc@southeast.net)
Received: from southeast.net (mail.mousetech.com [216.199.14.19])
by mailhub.southeast.net (8.8.5/8.8.5) with ESMTP id UAA10484;
Sat, 13 Nov 1999 20:17:45 -0500 (EST)
Message-ID: <382E0926.2C3F536E@southeast.net>
Date: Sat, 13 Nov 1999 19:58:14 -0500
From: Tim Holloway <mtsinc@southeast.net>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Thread-safe queueing?
References: <431.942506061@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Tim Holloway <mtsinc@southeast.net> writes:
I need to create a cross-process producer/consumer data queue
(e.g. singly-linked list). That is - Processes A, B, and C add nodes
to a controlled list and process D removes them. Not sure if the
creation of the nodes would be best done by the producers or
consumers, but destruction would have to be done by the consumer, as
the producers don't wait for processing. For optimal results, the
consumer process should sleep until item(s) are added to its queue.Query: within the existing backend framework, what's the best way to
accomplish this?More context, please. What are you trying to accomplish? Is this
really a communication path between backends (and if so, what backend
code needs it?), or are you trying to set up a queue between SQL
clients? How much data might need to be in the queue at one time?regards, tom lane
This is for the logging subsystem I'm developing. The backends call pg_log(),
which is like elog(), except that the message is a resource ID + any parameters
in order to support locales and custom message formatting. These ID+parameter
packets are then pipelined down to the logging channels via the log engine to
be formatted and output according to rules in the configuration file.
I *think* that the log engine should be a distinct process. I'm not sure I can
trust the output not to come out sliced and diced if each backend can run the engine
directly -- and for that matter, I see problems if the engine is reconfigured on the
fly owing to the need for each backend to replicate the configuration process (among
other things). The basic singly-linked list component is all I need to handle the
FIFO, but obviously I need guards to preserve its integrity. As to the amount of data
involved, I sincerely hope the queue would stay pretty shallow!
I have the configuration parser and logging engine operational, so the last
significant hurdle is making sure that A) the data to be logged is
accessable/addressable by the engine, and B) that the process runs in the
proper sequence. A description of what it all will look like is now online at http://postgres.mousetech.com/index.html
(with apologies for the ugly formatting).
Thanks,
TIm Holloway
From bouncefilter Sat Nov 13 21:30:25 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA43683
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 21:29:57 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA02229;
Sat, 13 Nov 1999 21:28:55 -0500 (EST)
To: Tim Holloway <mtsinc@southeast.net>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Thread-safe queueing?
In-reply-to: Your message of Sat, 13 Nov 1999 19:58:14 -0500
<382E0926.2C3F536E@southeast.net>
Date: Sat, 13 Nov 1999 21:28:54 -0500
Message-ID: <2227.942546534@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Tim Holloway <mtsinc@southeast.net> writes:
Tom Lane wrote:
More context, please.
This is for the logging subsystem I'm developing. The backends call
pg_log(), which is like elog(), except that the message is a resource
ID + any parameters in order to support locales and custom message
formatting. These ID+parameter packets are then pipelined down to the
logging channels via the log engine to be formatted and output
according to rules in the configuration file.
OK. You probably want something roughly comparable to the shared-inval
message queue --- see include/storage/sinvaladt.h and
backend/storage/ipc/sinvaladt.c. That's more complex than your problem
in one way (the sinval queue must be read by all N backends, not just
one process) but simpler in another (we can shoehorn all SI messages
into a fixed-size structure; is that practical for log data?). Anyway,
a queue structure in shared memory protected by spinlocks is what you
want, and sinval is about the closest thing we have to that at the
moment.
I *think* that the log engine should be a distinct process.
Probably so, if you use a shared-memory queue. Shared memory is a
finite resource; AFAIK it's not practical to enlarge it on-the-fly.
So you will have to set a maximum queue size --- either a compile-time
constant, or at best a value chosen at postmaster start time. This
implies that there will be scenarios where backends are waiting for room
to be made in the log queue. If the queue emptier is a separate process
then those waits can't turn into deadlocks. (sinval works around the
memory-overflow problem with a special "reset" mechanism, but that
doesn't seem appropriate for logging.)
Alternatively, you could forget about a queue per se, and just allow
each backend to execute the sending of its own log messages, using
a spinlock in shared memory to prevent concurrent issuance of log
messages on channels where that's a problem. That might be the
simplest and most robust approach.
regards, tom lane
From bouncefilter Sat Nov 13 22:13:25 1999
Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA48061
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 22:12:38 -0500 (EST)
(envelope-from maillist@candle.pha.pa.us)
Received: (from maillist@localhost)
by candle.pha.pa.us (8.9.0/8.9.0) id WAA10351;
Sat, 13 Nov 1999 22:11:36 -0500 (EST)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Message-Id: <199911140311.WAA10351@candle.pha.pa.us>
Subject: Re: [HACKERS] Thread-safe queueing?
In-Reply-To: <2227.942546534@sss.pgh.pa.us> from Tom Lane at "Nov 13,
1999 09:28:54 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sat, 13 Nov 1999 22:11:36 -0500 (EST)
CC: Tim Holloway <mtsinc@southeast.net>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Alternatively, you could forget about a queue per se, and just allow
each backend to execute the sending of its own log messages, using
a spinlock in shared memory to prevent concurrent issuance of log
messages on channels where that's a problem. That might be the
simplest and most robust approach.
Hold on. Unix guarantees all write() calls are atomic, so no one gets
in between that write. Why not just collect the output into one buffer
in the backend, and blast the entire buffer in one write() to the log
file.
I don't think there is any way another backend could mess that up.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Nov 13 22:50:26 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA52408
for <pgsql-hackers@postgreSQL.org>;
Sat, 13 Nov 1999 22:49:49 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA02326;
Sat, 13 Nov 1999 22:48:13 -0500 (EST)
To: Bruce Momjian <maillist@candle.pha.pa.us>
cc: Tim Holloway <mtsinc@southeast.net>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Thread-safe queueing?
In-reply-to: Your message of Sat, 13 Nov 1999 22:11:36 -0500 (EST)
<199911140311.WAA10351@candle.pha.pa.us>
Date: Sat, 13 Nov 1999 22:48:13 -0500
Message-ID: <2324.942551293@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <maillist@candle.pha.pa.us> writes:
Alternatively, you could forget about a queue per se, and just allow
each backend to execute the sending of its own log messages, using
a spinlock in shared memory to prevent concurrent issuance of log
messages on channels where that's a problem. That might be the
simplest and most robust approach.
Hold on. Unix guarantees all write() calls are atomic, so no one gets
in between that write.
Actually, I didn't say that I *believed* there were any channel types
where such an interlock is essential ;-). I just said that spinlocking
is a solution if the problem comes up.
Tim mentioned on-the-fly reconfiguration of logging as an area that
might need interlocking, and I'm more prepared to believe that.
Still, we seem to be getting on just fine with each backend responding
independently to reconfiguration of the pg_options values. So I'd be
inclined to build it that way, and wait for evidence of a performance
problem before spending effort to make it smarter.
Which I guess is Bruce's point also...
regards, tom lane
From bouncefilter Sun Nov 14 01:17:28 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA74297
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 01:16:41 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame.flame.co.za [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id IAA31095
for <pgsql-hackers@postgreSQL.org>; Sun, 14 Nov 1999 08:19:22 +0200
Sender: theo@flame.flame.co.za
Message-ID: <382E546A.558777C9@flame.co.za>
Date: Sun, 14 Nov 1999 08:19:22 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] My bits moved right off the end of the world...
References: <Pine.GSO.4.02A.9911132223590.606-100000@Val.DoCS.UU.SE>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Peter Eisentraut wrote:
I recall that this was due to a corrupted B-Tree index. Try dropping and
rebuilding that, if you have one.
Thanks Peter, that did the trick.
Any chance of adding the following to the FAQ
4.24) What is the meaning of 'my bits moved right off the end of the world'
This message may appear in the backend log and may be due to a possibly
corrupt index.
It may be preceded (by several minutes) with a notice to the client such as
NOTICE: Index my_idx: NUMBER OF INDEX' TUPLES (78933) IS NOT THE SAME AS HEAP
(78931)
The message may occur when running a 'vacuum analyze' with the backend
terminating abnormally.
[Other explanations...]
The postmaster must be started without the '-S' option for this
notice to appear.
--------
Regards
Theo
From bouncefilter Sun Nov 14 03:30:29 1999
Received: from loopy.berkhirt.com (loopy.berkhirt.com [209.220.85.54])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA90110
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 03:29:37 -0500 (EST)
(envelope-from bhirt@loopy.berkhirt.com)
Received: (from bhirt@localhost)
by loopy.berkhirt.com (8.9.3/8.8.7) id CAA29789;
Sun, 14 Nov 1999 02:29:07 -0600
Date: Sun, 14 Nov 1999 02:29:06 -0600
From: Brian Hirt <bhirt@mobygames.com>
To: pgsql-hackers@postgreSQL.org
Cc: bhirt@loopy.berkhirt.com
Subject: pg_dump - rebuilding indexes
Message-ID: <19991114022906.A29291@loopy.berkhirt.com>
Reply-To: bhirt@mobygames.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.4us
X-PC-Gaming: http://www.mobygames.com/
Hi,
A few time in the past, my indexes have become corrupted somehow
and a vacuum analyze will cause the backend to dump core. I've
seen other people post similiar problems on hackers and admin. All
of the suggestions seem to be dumping the database and reloading it
to have the indexes rebuilt or vacuuming the tables one by one until
the system crashes and then drop the indexes for that table and
recreate them from your DDL scripts. Well, this happened to me again,
so I searched the list looking for any way to automatically rebuild the
indexes but didn't manage to find any. It got me thinking, pg_dump
already dumps index creates, all we need to do is modify it to dump
index drops and prevent all of the other schema and data from being
dumped.
I got into the code and quickly learned about the -c option (creates
drops statements) that wasn't talked about on my outdated manpage.
Doh! So now the problem is even easier -- I only have to suppress the
dumping of everying except indexes and turn on the -c flag. I added
an option called -r (rebuild indexes). It turns on the dropSchema,
schemaOnly and dataOnly flags which in essence causes pg_dump to
do nothing. An extra snippet of code checks to see if indexes should
be rebuilt and dumps the index creates. It's a real hack, but it
suites my needs.
Now, whenever I want to rebuild my indexes I can just type:
pg_dump -r mydatabase | psql mydatabase
If something else already exists -- oops maybe we could add it to the
faq. I actually would have liked to implement the code differently, but
the current code isn't very condusive to a more elegant solution and I din't
want to put much time into something that might be rejected by the source
code maintainers. If this is rejected, I only wasted 10 minutes. Ideally,
what I would like is a flag that allows you to specify the types to be
dumped. This way, it would be flexible enough to allow you to dump any
combination of types. If you only wanted to dump trigger schema you could.
If you wanted sequences and indexes, no problem. Something like:
pg_dump --dump-types "type trigger aggregate"
Anyway,
diff -u ./pg_dump.c ../../../../postgresql-6.5.3/src/bin/pg_dump/pg_dump.c
--- ./pg_dump.c Sun Nov 14 01:41:05 1999
+++ ../../../../postgresql-6.5.3/src/bin/pg_dump/pg_dump.c Thu Sep 23 14:13:49 1999
@@ -112,7 +112,6 @@
PGconn *g_conn; /* the database connection */
bool force_quotes; /* User wants to suppress double-quotes */
-bool rebuildIndexes; /* dump DDL for index rebuilds */
bool dumpData; /* dump data using proper insert strings */
bool attrNames; /* put attr names into insert strings */
bool schemaOnly;
@@ -543,7 +542,6 @@
g_verbose = false;
force_quotes = true;
- rebuildIndexes = false;
dropSchema = false;
strcpy(g_comment_start, "-- ");
@@ -554,9 +552,7 @@
progname = *argv;
- /* Get the arguments for the command line via getopts cycle through
- each option, setting the appropriate flags as necessary */
- while ((c = getopt(argc, argv, "acdDf:h:nNop:rst:uvxz")) != EOF)
+ while ((c = getopt(argc, argv, "acdDf:h:nNop:st:uvxz")) != EOF)
{
switch (c)
{
@@ -594,17 +590,6 @@
case 'p': /* server port */
pgport = optarg;
break;
- case 'r': /* rebuild indexes */
- rebuildIndexes = true; /* forces only indexes to be dumped */
- dropSchema = true; /* causes drop statements to be created */
-
- /* Setting data only to true, causes the dumpSchema() to dump
- schema to a NULL file handle, and setting schemaOnly to true
- prevents dumpClasses() from dumping the data -- it's a HACK */
- schemaOnly = true;
- dataOnly = true;
-
- break;
case 's': /* dump schema only */
schemaOnly = true;
break;
@@ -765,13 +750,8 @@
if (!schemaOnly)
dumpClasses(tblinfo, numTables, g_fout, tablename, oids);
-
- /* dump indexes and triggers at the end for performance */
- if (rebuildIndexes)
- {
- dumpSchemaIdx(g_fout, tablename, tblinfo, numTables);
- }
- else if (!dataOnly)
+ if (!dataOnly) /* dump indexes and triggers at the end
+ * for performance */
{
dumpSchemaIdx(g_fout, tablename, tblinfo, numTables);
dumpTriggers(g_fout, tablename, tblinfo, numTables);
--
The world's most ambitious and comprehensive PC game database project.
From bouncefilter Sun Nov 14 11:02:35 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA41863
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 11:01:59 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA28601;
Sun, 14 Nov 1999 10:52:33 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911141552.KAA28601@candle.pha.pa.us>
Subject: Re: [HACKERS] My bits moved right off the end of the world...
In-Reply-To: <382E546A.558777C9@flame.co.za> from Theo Kramer at "Nov 14, 1999
08:19:22 am"
To: Theo Kramer <theo@flame.co.za>
Date: Sun, 14 Nov 1999 10:52:33 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Peter Eisentraut wrote:
I recall that this was due to a corrupted B-Tree index. Try dropping and
rebuilding that, if you have one.Thanks Peter, that did the trick.
Any chance of adding the following to the FAQ
4.24) What is the meaning of 'my bits moved right off the end of the world'
With specific messages like this one, it is best to put the fix right in
the error message.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Nov 14 11:20:35 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA44117
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 11:20:20 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA29490;
Sun, 14 Nov 1999 11:19:02 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911141619.LAA29490@candle.pha.pa.us>
Subject: Re: [HACKERS] My bits moved right off the end of the world...
In-Reply-To: <199911141552.KAA28601@candle.pha.pa.us> from Bruce Momjian at
"Nov 14, 1999 10:52:33 am"
To: Bruce Momjian <pgman@candle.pha.pa.us>
Date: Sun, 14 Nov 1999 11:19:02 -0500 (EST)
CC: Theo Kramer <theo@flame.co.za>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Peter Eisentraut wrote:
I recall that this was due to a corrupted B-Tree index. Try dropping and
rebuilding that, if you have one.Thanks Peter, that did the trick.
Any chance of adding the following to the FAQ
4.24) What is the meaning of 'my bits moved right off the end of the world'
With specific messages like this one, it is best to put the fix right in
the error message.
With great pain, I have added an additional sentence to the error
message stating to try and recreate index.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Nov 14 12:26:36 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA50491
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 12:26:21 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA00558;
Sun, 14 Nov 1999 12:24:19 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911141724.MAA00558@candle.pha.pa.us>
Subject: Re: [HACKERS] My bits moved right off the end of the world...
In-Reply-To: <382E546A.558777C9@flame.co.za> from Theo Kramer at "Nov 14, 1999
08:19:22 am"
To: Theo Kramer <theo@flame.co.za>
Date: Sun, 14 Nov 1999 12:24:18 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Peter Eisentraut wrote:
I recall that this was due to a corrupted B-Tree index. Try dropping and
rebuilding that, if you have one.Thanks Peter, that did the trick.
Any chance of adding the following to the FAQ
4.24) What is the meaning of 'my bits moved right off the end of the world'
This message may appear in the backend log and may be due to a possibly
corrupt index.It may be preceded (by several minutes) with a notice to the client such as
NOTICE: Index my_idx: NUMBER OF INDEX' TUPLES (78933) IS NOT THE SAME AS HEAP
(78931)
I have added a mention when this message appears to try recreating the
index.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Nov 14 12:16:36 1999
Received: (from news@localhost) by hub.org (8.9.3/8.9.3) id MAA49533
for pgsql-hackers@postgresql.org; Sun, 14 Nov 1999 12:16:07 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: hub.org: news set sender to <news> using -f
From: "link2" <admin@link2casino.com>
X-Newsgroups: comp.databases.postgresql.hackers
Subject: Autocount
Date: Sun, 14 Nov 1999 13:17:31 -0500
Organization: Interpacket Group Inc.
Lines: 59
Message-ID: <80mqnq$2mhp$1@news.interpacket.net>
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0083_01BF2EA2.9B1CF890"
X-Trace: news.interpacket.net 942599738 88633 207.42.132.90 (14 Nov 1999
17:15:38 GMT)
X-Complaints-To: usenet@news.interpacket.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: pgsql-hackers@postgresql.org
This is a multi-part message in MIME format.
------=_NextPart_000_0083_01BF2EA2.9B1CF890
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all
I'm very new to SQL server I can do allot of things in access database =
but I'm moving to SQL. isen that grate?
What i m looking for is witch one of the datatype in table design view I =
can used for an autocount like in access?
Please reply to=20
kenneth@internetcasino.ag
Webmaster
webmaster@link2casino.com
http://www.link2casino.com
Auto
------=_NextPart_000_0083_01BF2EA2.9B1CF890
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff=20
onunload=3D"hotpick =3D =
window.open('http://www.link2casino.com/index.htm', 'ossponsor', =
'toolbar=3Dyes,location=3Dyes,directories=3Dyes,status=3Dyes,scrollbars=3D=
yes,menubar=3Dno,resizable=3Dyes')">
<DIV><FONT size=3D2>Hi all</FONT></DIV>
<DIV><FONT size=3D2>I'm very new to SQL server I can do allot of things =
in access=20
database but I'm moving to SQL. isen that grate?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>What i m looking for is witch one of the datatype in =
table=20
design view I can used for an autocount like in access?</FONT></DIV>
<DIV><FONT size=3D2><BR>Please reply to </FONT></DIV>
<DIV><FONT size=3D2><A=20
href=3D"mailto:kennth@internetcasino.ag">kenneth@internetcasino.ag</A></F=
ONT></DIV>
<DIV><FONT size=3D2><BR>Webmaster<BR><A=20
href=3D"mailto:webmaster@link2casino.com">webmaster@link2casino.com</A><B=
R><A=20
href=3D"http://www.link2casino.com">http://www.link2casino.com</A></FONT>=
</DIV>Auto</BODY></HTML>
------=_NextPart_000_0083_01BF2EA2.9B1CF890--
From bouncefilter Mon Nov 15 17:56:56 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA82354
for <pgsql-hackers@postgresql.org>;
Mon, 15 Nov 1999 17:55:58 -0500 (EST)
(envelope-from peter@peter-e.yi.org)
Received: from regulus.its.uu.se ([130.238.7.19]:62579 "EHLO peter-e.yi.org")
by merganser.its.uu.se with ESMTP id <S.sA6xt221581>;
Mon, 15 Nov 1999 23:55:53 +0100
Received: from peter (helo=localhost)
by peter-e.yi.org with local-esmtp (Exim 3.02 #2)
id 11n4Tq-0000Fg-00; Sun, 14 Nov 1999 19:34:26 +0100
Date: Sun, 14 Nov 1999 19:34:26 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Status of sql_help.h
In-Reply-To: <1874.942531667@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.20.9911141850340.797-100000@peter-e.yi.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: Peter Eisentraut <peter@peter-e.yi.org>
On 1999-11-13, Tom Lane mentioned:
sql_help.h is now a derived file, shouldn't it be removed from the
CVS repository, for the same reasons that we don't keep gram.c
You're the CVS guys. Whatever works.
I thought about suggesting that create_help.pl be rewritten in some
"more portable" fashion such as an awk script. But really, if you
If I'm supposed to maintain this (or do *anything* with it), it can't be
awk. No reason to make a step backwards to accomodate an undocumented
portability problem. I would argue that a lot more people are familiar
with Perl and can read that script than an awk alternative. We don't write
strict (-pedantic) ANSI C code either for the sake of portability.
other likely alternative. (It might be worthwhile to remove the one
or two unnecessary Perl-5-isms in the script, so that it will run on
Perl 4 if that's what's available.)
On a quick look I couldn't find a useful listing of things new in Perl 5
or some way to test for Perl 4 compatibility. Shortly, I don't know what a
Perl-5-ism is and I really don't feel like finding out either. However, if
someone is inclined to fix those things if it doesn't make it all ugly, be
my guest.
Comments? Anyone feel that we really can't expect users of the CVS
repository to have Perl?
If you don't have Perl, the question is really: Do you have CVS? Do you
have rlogin? Do you have networking support in your kernel? Do you have a
computer?
Seriously, I'd suggest that we wait for a documented problem before taking
unnecessary steps.
Hmm, interesting. From the GNU Makefile standards:
"The `configure' script and the Makefile rules for building and
installation should not use any utilities directly except these:
cat cmp cp diff echo egrep expr false grep install-info
ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true"
No awk there either.
PS: "make distclean" should probably not remove sql_help.h, for the
same reasons that we don't remove gram.c --- it *is* a distributed
file, and a particular user might not have the tools to rebuild it.
That was my bad. For some reason I had the idea that "distclean" stood for
"distinctly clean" (really clean). :-\ I'll fix that. Perhaps we ought to
decide on some standard targets. "maintainer-clean" would be the proper
one to use (in GNU, again). It also contains the note:
"... Since these files are normally included in the distribution, we don't
take care to make them easy to reconstruct. If you find you need to
unpack the full distribution again, don't blame us."
Well said.
-Peter
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sun Nov 14 13:48:37 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA58345
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 13:48:22 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA07221;
Sun, 14 Nov 1999 13:47:13 -0500 (EST)
To: Frans Van Elsacker <fve@atbib.be>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] union problem version 6.5.3
In-reply-to: Your message of Fri, 12 Nov 1999 18:58:59 -0500
<28156.942451139@sss.pgh.pa.us>
Date: Sun, 14 Nov 1999 13:47:13 -0500
Message-ID: <7219.942605233@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Hmm, the grammar has
CreateAsStmt: CREATE OptTemp TABLE relation_name OptCreateAs AS SubSelect
and SubSelect doesn't allow unions. This is overly restrictive,
As far as I can tell, it should work to just change the above line in
src/backend/parser/gram.y to
CreateAsStmt: CREATE OptTemp TABLE relation_name OptCreateAs AS SelectStmt
I am doing this in current sources right now. I have not tried it in
REL6_5, but if the problem is getting in your way then give it a try...
regards, tom lane
From bouncefilter Sun Nov 14 14:14:37 1999
Received: from sapphire.albourne.com (root@sapphire.albourne.com
[195.212.241.227]) by hub.org (8.9.3/8.9.3) with ESMTP id OAA61926
for <pgsql-hackers@postgresql.org>;
Sun, 14 Nov 1999 14:14:06 -0500 (EST)
(envelope-from a.joubert@albourne.com)
Received: from albourne.com (akamas.albourne.com [195.212.241.254])
by sapphire.albourne.com (8.9.3/8.9.3/Albourne/CYS/1.6X) with ESMTP id
VAA23310 for <pgsql-hackers@postgresql.org>;
Sun, 14 Nov 1999 21:17:45 +0200 (EET)
Sender: a.joubert@albourne.com
Message-ID: <382F0ACD.81BE2A56@albourne.com>
Date: Sun, 14 Nov 1999 21:17:33 +0200
From: Adriaan Joubert <a.joubert@albourne.com>
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.38 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: Help with SPI and oids
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I need to keep track of changes to a set of tables in a generic way.
To do this, I want to keep track of oid's. I'm writing the code using
the SPI interface, but I've hit the following problem: after I have
inserted a tuple into a table from the C routine, I cannot figure out
how to get hold of its oid. I had hope that there may be something in
SPI_tuptable, but there isn't. SPI_processed is 1, and the row is
inserted successfully. Surely there must be some way to get the oid of
the row that was just inserted.
I'd really appreciate any help on this one -- even digging aruond in the
backend code hasn't helped up to now.
Cheers!
Adriaan
From bouncefilter Sun Nov 14 14:24:37 1999
Received: from web2106.mail.yahoo.com (web2106.mail.yahoo.com [128.11.68.250])
by hub.org (8.9.3/8.9.3) with SMTP id OAA63594
for <pgsql-hackers@postgresql.org>;
Sun, 14 Nov 1999 14:24:21 -0500 (EST)
(envelope-from mascarim@yahoo.com)
Message-ID: <19991114192420.15160.rocketmail@web2106.mail.yahoo.com>
Received: from [206.246.185.100] by web2106.mail.yahoo.com;
Sun, 14 Nov 1999 11:24:20 PST
Date: Sun, 14 Nov 1999 11:24:20 -0800 (PST)
From: Mike Mascari <mascarim@yahoo.com>
Subject: Postmaster dies with FATAL 1: ReleaseLruFile: No opened files - no
one can be closed
To: tgl@sss.pgh.pa.us
Cc: pgsql-hackers@postgresql.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Hello Tom,
I was hoping you might have some insight on a problem we've encountered
with PostgreSQL 6.5.0 (RedHat 5.2) this morning, since you are the
"file descriptor" king, as it were :-) . The database is backing a website
used by a network of hospitals for materials management and this morning,
the postmaster died with the following appearing in the system log:
Nov 14 11:50:14 emptoris logger:
FATAL 1: ReleaseLruFile: No opened files - no one can be closed
This is the first time this has ever happened. I've had such good luck
with PostgreSQL that I didn't have the postmaster started by inittab.
The number of backends should have been very light today (Sunday) --
only a few ODBC users and an occassional HTTP user, so after the
postmaster exited, the log (I assume these are forked backend complaints)
shows:
Nov 14 11:55:03 emptoris logger:
pq_recvbuf: unexpected EOF on client connection
Nov 14 11:55:03 emptoris logger:
pq_recvbuf: unexpected EOF on client connection
Nov 14 11:55:04 emptoris logger:
pq_flush: send() failed: Broken pipe
Nov 14 11:55:04 emptoris logger:
FATAL: pq_endmessage failed: errno=32
From previous posts, I know you've done a cleanup with respect to
file descriptors, but all I see in the log after 6.5.0 is a 6.5.1 entry:
ACL file descriptor leak fix(Atsushi Ogawa)
Is this a rare occurence or something that might have been fixed between
6.5.0 and 6.5.3? Like I said, this is the first time this has happened and
otherwise has been very robust under much heavier loads -- so much so
that I didn't put the postmaster into inittab for respawning. Its
been working pretty much flawlessly in production for about a year.
Anyways, after starting the postmaster again, I vacuum analyzed the
database, accessed the HTTP application, etc. without problems.
Any info would be greatly appreciated,
Mike Mascari
(mascarim@yahoo.com)
=====
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
From bouncefilter Sun Nov 14 15:40:38 1999
Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA73309
for <pgsql-hackers@postgresql.org>;
Sun, 14 Nov 1999 15:40:10 -0500 (EST) (envelope-from oleg@sai.msu.su)
Received: from ra (ra [158.250.29.2])
by ra.sai.msu.su (8.9.1/8.9.1) with ESMTP id XAA21513;
Sun, 14 Nov 1999 23:40:06 +0300 (MSK)
Date: Sun, 14 Nov 1999 23:40:06 +0300 (MSK)
From: Oleg Bartunov <oleg@sai.msu.su>
X-Sender: megera@ra
To: pgsql-hackers@postgresql.org
cc: t-ishii@sra.co.jp
Subject: problem with MB ? 6.5.3 under freebsd-elf
Message-ID: <Pine.GSO.3.96.SK.991114232654.3910y-100000@ra>
Organization: Sternberg Astronomical Institute (Moscow University)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=koi8-r
Content-Transfer-Encoding: 8bit
Hi,
today I found a problem with MB on freebsd-elf running 6.5.3 -
I have compiled 6.5.3 with --enable-locale --with-mb=KOI8
and in psql I tried set client_encoding to 'WIN'
but result of simple query looks like 8-bit was stripped.
The same query works as expected under Linux.
Also, when I tried
select * from t1 where a ~* '���';
I got:
ERROR: Can't find right op '~*' for type 25
I'm outside of city and has access only to b/w terminal
without cut'n paste support ( old 286 + dialup ) and I can't
provide more information. Will do this tomorrow.
Oleg
PS. The same weird thing happens even if I
set client_encoding to 'KOI8' - native encoding !
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
From bouncefilter Sun Nov 14 18:13:39 1999
Received: from thelab.hub.org (nat198.58.mpoweredpc.net [142.177.198.58])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA92851;
Sun, 14 Nov 1999 18:13:16 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id TAA90257;
Sun, 14 Nov 1999 19:13:28 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Sun, 14 Nov 1999 19:13:27 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: pgsql-general@postgresql.org
cc: pgsql-hackers@postgresql.org
Subject: Looks like hell, but ...
Message-ID: <Pine.BSF.4.10.9911141908330.75865-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
http://www.pgsql.com/app-index ...
Its a start, at least. I have to add 'update' facilities for ppl to edit
records, and it *looks* like hell, but its a start...
I'm concentrating on apps first, and, eventually, its going to include
'Usage of' records...
All input has to be approved before it becomes live...and it will
eventually contain information similar to what FreshMeat provides
(dependancies, license, etc)...
Check it out, add content and watch it evolve...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Sun Nov 14 18:24:40 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA94691
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 18:24:25 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id SAA12270;
Sun, 14 Nov 1999 18:23:44 -0500 (EST)
To: Mike Mascari <mascarim@yahoo.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Postmaster dies with FATAL 1: ReleaseLruFile: No opened
files - no one can be closed
In-reply-to: Your message of Sun, 14 Nov 1999 11:24:20 -0800 (PST)
<19991114192420.15160.rocketmail@web2106.mail.yahoo.com>
Date: Sun, 14 Nov 1999 18:23:44 -0500
Message-ID: <12268.942621824@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Mike Mascari <mascarim@yahoo.com> writes:
FATAL 1: ReleaseLruFile: No opened files - no one can be closed
This is the first time this has ever happened.
I've never seen that either. Offhand I do not recall any post-6.5
changes that would affect it, so the problem (whatever it is) is
probably still there.
After eyeballing the code, it seems there are only two ways this
could happen:
1. the number of "allocated" (non-virtual) file descriptors grew to
exceed the number of files Postgres thinks it can have open;
2. something else was temporarily exhausting your kernel's file table
space, so that ENFILE was returned for many successive attempts to
open a file. (After each one, fd.c will close another file and try
again.)
#2 seems improbable on an unloaded system, and isn't real probable even
on a loaded one, since you'd have to assume that some other process
managed to suck up each filetable slot that fd.c released before fd.c
could re-acquire it. Once, yes, but several dozen times in a row?
So I'm guessing a leak of allocated file descriptors.
After grovelling through the calls to AllocateFile, I only see one
prospect for a leak: it looks to me like verify_password() neglects
to close the password file if an invalid user name is given. Do you
use a plain (non-encrypted) password file? If so, I'll bet you can
reproduce the crash by trying repeatedly to connect with a username
that's not in the password file. If that pans out, it's a simple fix:
add "FreeFile(pw_file);" near the bottom of verify_password() in
src/backend/libpq/password.c. Let me know if this guess is right...
regards, tom lane
From bouncefilter Sun Nov 14 18:38:40 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA96948
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 18:37:57 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id SAA12294
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 18:37:22 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: elog() executed by postmaster
Date: Sun, 14 Nov 1999 18:37:22 -0500
Message-ID: <12291.942622642@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
While chasing the apparent FD leakage reported by Mike Mascari,
I realized that there are probably code paths in which the postmaster
itself will invoke elog(ERROR) or elog(FATAL). This is fairly likely
anyplace that the postmaster uses routines also used by the backend.
Mascari's example shows that it *will* happen, in the current state of
the code, if the postmaster does enough failed password lookups.
That's a bug of course, but there will always be bugs. Trying to ensure
that the postmaster will never call elog() seems like a losing game;
instead we need to ensure that something acceptable will happen.
Right now, what will happen is a postmaster coredump (or worse,
undefined behavior) due to trying to longjmp through an uninitialized
jmp_buf to return to the never-yet-entered backend main loop. That
doesn't rate as acceptable in my book.
elog() should probably check for being in the postmaster and force
a postmaster shutdown if it gets elog(FATAL). Should elog(ERROR)
do the same, or do we want to try to add a return-to-main-loop
capability in the postmaster? I'm inclined to keep it simple and
just do an orderly shutdown in both cases. Any such code paths that
are out there are obviously not heavily exercised, so I doubt that
it's worth adding new code to try to recover from elog(ERROR).
Comments?
regards, tom lane
From bouncefilter Sun Nov 14 19:55:40 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA05601
for <pgsql-hackers@postgreSQL.org>;
Sun, 14 Nov 1999 19:55:03 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA07293;
Sun, 14 Nov 1999 19:48:17 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911150048.TAA07293@candle.pha.pa.us>
Subject: Re: [HACKERS] elog() executed by postmaster
In-Reply-To: <12291.942622642@sss.pgh.pa.us> from Tom Lane at "Nov 14,
1999 06:37:22 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 14 Nov 1999 19:48:17 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
elog() should probably check for being in the postmaster and force
a postmaster shutdown if it gets elog(FATAL). Should elog(ERROR)
do the same, or do we want to try to add a return-to-main-loop
capability in the postmaster? I'm inclined to keep it simple and
just do an orderly shutdown in both cases. Any such code paths that
are out there are obviously not heavily exercised, so I doubt that
it's worth adding new code to try to recover from elog(ERROR).
Agreed. Just try simple first.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Nov 15 12:13:52 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA27662
for <pgsql-hackers@postgresql.org>;
Mon, 15 Nov 1999 12:13:27 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.8.7/8.8.5) with ESMTP id MAA19195;
Mon, 15 Nov 1999 12:12:54 -0500
Message-ID: <38303F0F.90E320D@wgcr.org>
Date: Mon, 15 Nov 1999 12:12:47 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: The Hermit Hacker <scrappy@hub.org>
CC: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Looks like hell, but ...
References: <Pine.BSF.4.10.9911141908330.75865-100000@thelab.hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The Hermit Hacker wrote:
Check it out, add content and watch it evolve...
A good start, Marc. I added the interesting package called onShore
Timesheet -- looks like your entry form covers most of the bases.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Mon Nov 15 12:51:53 1999
Received: from thelab.hub.org (nat198.58.mpoweredpc.net [142.177.198.58])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA32678
for <pgsql-hackers@postgresql.org>;
Mon, 15 Nov 1999 12:50:55 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id NAA97214;
Mon, 15 Nov 1999 13:50:34 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Mon, 15 Nov 1999 13:50:33 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Lamar Owen <lamar.owen@wgcr.org>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Looks like hell, but ...
In-Reply-To: <38303F0F.90E320D@wgcr.org>
Message-ID: <Pine.BSF.4.10.9911151349390.75865-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 15 Nov 1999, Lamar Owen wrote:
The Hermit Hacker wrote:
Check it out, add content and watch it evolve...
A good start, Marc. I added the interesting package called onShore
Timesheet -- looks like your entry form covers most of the bases.
Thanks...I've been populating it with what I can readily find (through
freshmeat so far), but I definitely don't know everything that is out
there :)
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Mon Nov 15 13:16:53 1999
Received: from loopy.berkhirt.com (loopy.berkhirt.com [209.220.85.54])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA36443
for <pgsql-hackers@postgreSQL.org>;
Mon, 15 Nov 1999 13:16:13 -0500 (EST)
(envelope-from bhirt@loopy.berkhirt.com)
Received: (from bhirt@localhost)
by loopy.berkhirt.com (8.9.3/8.8.7) id MAA25428;
Mon, 15 Nov 1999 12:14:26 -0600
Date: Mon, 15 Nov 1999 12:14:26 -0600
From: Brian Hirt <bhirt@mobygames.com>
To: The Hermit Hacker <scrappy@hub.org>
Cc: Lamar Owen <lamar.owen@wgcr.org>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Looks like hell, but ...
Message-ID: <19991115121426.A25286@loopy.berkhirt.com>
Reply-To: bhirt@mobygames.com
References: <38303F0F.90E320D@wgcr.org>
<Pine.BSF.4.10.9911151349390.75865-100000@thelab.hub.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.4us
In-Reply-To: <Pine.BSF.4.10.9911151349390.75865-100000@thelab.hub.org>;
from The Hermit Hacker on Mon, Nov 15, 1999 at 01:50:33PM -0400
X-PC-Gaming: http://www.mobygames.com/
On Mon, Nov 15, 1999 at 01:50:33PM -0400, The Hermit Hacker wrote:
Thanks...I've been populating it with what I can readily find (through
freshmeat so far), but I definitely don't know everything that is out
there :)
I'm not sure if you worked on the user gallery also, but I like that as
well. I do have one suggestion and a comment. It would be nice if a
description of the project could be included. I'd like to browse through
some of the other project but clicking on each one and seeing a description
of the project would help decide which ones to look at.
My comment is that there appears to be no maintainer of the gallery. There
is a project name testing_shit. I counted at least 10 duplicate entries and
many that are obvously incomplete. Do you want any help with the gallery?
-brian
--
The world's most ambitious and comprehensive PC game database project.
From bouncefilter Mon Nov 15 14:10:53 1999
Received: from nile.purplefrog.com (inca.incanta.com [209.144.154.2] (may be
forged)) by hub.org (8.9.3/8.9.3) with ESMTP id OAA43476
for <pgsql-hackers@postgresql.org>;
Mon, 15 Nov 1999 14:10:34 -0500 (EST)
(envelope-from thoth@nile.purplefrog.com)
Received: from nile (localhost [127.0.0.1])
by nile.purplefrog.com (8.8.7/8.8.7) with ESMTP id OAA01316
for <pgsql-hackers@postgresql.org>; Mon, 15 Nov 1999 14:10:34 -0500
Message-Id: <199911151910.OAA01316@nile.purplefrog.com>
To: pgsql-hackers@postgresql.org
Subject: 6.5.1 -vs- null values for an int8
Date: Mon, 15 Nov 1999 14:10:34 -0500
From: Robert Forsman <thoth@nile.purplefrog.com>
Any clue why Postgresql version 6.5.1 can't handle null values for int8 in
a WHERE clause?
incanta=> create table t(v int8);
CREATE
incanta=> insert into t(v) values(0);
INSERT 101737 1
incanta=> insert into t(v) values(1);
INSERT 101738 1
incanta=> insert into t(v) values(-1);
INSERT 101739 1
incanta=> select * from t where v>=0;
v
-
0
1
(2 rows)
incanta=> insert into t(v) values (null);
INSERT 101740 1
incanta=> select * from t;
v
--
0
1
-1
(4 rows)
incanta=> select * from t where v>=0;
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
We have lost the connection to the backend, so further processing is impossible. Terminating.
From bouncefilter Mon Nov 15 14:27:57 1999
Received: from thelab.hub.org (nat198.58.mpoweredpc.net [142.177.198.58])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA45692
for <pgsql-hackers@postgreSQL.org>;
Mon, 15 Nov 1999 14:27:41 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id PAA97842;
Mon, 15 Nov 1999 15:26:57 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Mon, 15 Nov 1999 15:26:56 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Brian Hirt <bhirt@mobygames.com>
cc: Lamar Owen <lamar.owen@wgcr.org>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Looks like hell, but ...
In-Reply-To: <19991115121426.A25286@loopy.berkhirt.com>
Message-ID: <Pine.BSF.4.10.9911151524190.75865-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 15 Nov 1999, Brian Hirt wrote:
On Mon, Nov 15, 1999 at 01:50:33PM -0400, The Hermit Hacker wrote:
Thanks...I've been populating it with what I can readily find (through
freshmeat so far), but I definitely don't know everything that is out
there :)I'm not sure if you worked on the user gallery also, but I like that as
well. I do have one suggestion and a comment. It would be nice if a
description of the project could be included. I'd like to browse through
some of the other project but clicking on each one and seeing a description
of the project would help decide which ones to look at.My comment is that there appears to be no maintainer of the gallery. There
is a project name testing_shit. I counted at least 10 duplicate entries and
many that are obvously incomplete. Do you want any help with the gallery?
Now that I have what looks like a nice format (technically, not visually)
for the apps, I'm going to redo the user gallery itself also...assuming
nothing comes up later tonight, will hopefully have most of it converted
then...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Mon Nov 15 18:22:56 1999
Received: from web2103.mail.yahoo.com (web2103.mail.yahoo.com [128.11.68.247])
by hub.org (8.9.3/8.9.3) with SMTP id SAA85962
for <pgsql-hackers@postgresql.org>;
Mon, 15 Nov 1999 18:22:22 -0500 (EST)
(envelope-from mascarim@yahoo.com)
Message-ID: <19991115232221.5713.rocketmail@web2103.mail.yahoo.com>
Received: from [24.26.131.45] by web2103.mail.yahoo.com;
Mon, 15 Nov 1999 15:22:21 PST
Date: Mon, 15 Nov 1999 15:22:21 -0800 (PST)
From: Mike Mascari <mascarim@yahoo.com>
Subject: Re: [HACKERS] Postmaster dies with FATAL 1: ReleaseLruFile: No opened
files - no one can be closed
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
Mike Mascari <mascarim@yahoo.com> writes:
FATAL 1: ReleaseLruFile: No opened files - no one can be closed
This is the first time this has ever happened.
I've never seen that either. Offhand I do not recall any post-6.5
changes that would affect it, so the problem (whatever it is) is
probably still there.After eyeballing the code, it seems there are only two ways this
could happen:1. the number of "allocated" (non-virtual) file descriptors grew to
exceed the number of files Postgres thinks it can have open;2. something else was temporarily exhausting your kernel's file table
space, so that ENFILE was returned for many successive attempts to
open a file. (After each one, fd.c will close another file and try
again.)#2 seems improbable on an unloaded system, and isn't real probable even
on a loaded one, since you'd have to assume that some other process
managed to suck up each filetable slot that fd.c released before fd.c
could re-acquire it. Once, yes, but several dozen times in a row?
Thanks for the response, Tom. When looking at the system log,
the kernel was logging messages regarding IPX network name collisions
which apprently can happen when there are autoconfigured Win95 boxes
on the same subnet. These messages were flooding the log at a rate of
one every second or two...Even though #2 seems improbable, and just
glancing at the IPX kernel code didn't point to how that may have
caused a continual consumption of file descriptors, I'm willing to
blame the kernel on this (and me for using autoprimary and autointerface
options).
Thanks again,
Mike Mascari
(mascarim@yahoo.com)
=====
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
From bouncefilter Mon Nov 15 18:31:19 1999
Received: (from news@localhost) by hub.org (8.9.3/8.9.3) id SAA87371
for pgsql-hackers@postgresql.org; Mon, 15 Nov 1999 18:30:45 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: hub.org: news set sender to <news> using -f
From: Speedy Fast <speedyfast26@hotmail.com>
X-Newsgroups: comp.databases.postgresql.hackers
Subject: shell accounts that offer postgresql?
Message-ID: <15cwOKV3giCHNpAfUybGmz+T+CRY@4ax.com>
X-Newsreader: Forte Agent 1.6/32.525
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 9
Date: Mon, 15 Nov 1999 23:30:38 GMT
X-Complaints-To: abuse@home.net
X-Trace: news2.rdc1.on.home.com 942708638 24.112.54.253 (Mon,
15 Nov 1999 15:30:38 PST)
Organization: @Home Network Canada
To: pgsql-hackers@postgresql.org
Are there any web hosting services that offer postgresql database
access (cgi would be nice too)?
==============================================================
Here's some for the killfiles
@aol.com crush@home.com fredsanfordrules@aol.commedian
@webtv.com
From bouncefilter Mon Nov 15 20:03:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA02621
for <pgsql-hackers@postgreSQL.org>;
Mon, 15 Nov 1999 20:03:28 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id UAA19907;
Mon, 15 Nov 1999 20:02:55 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Status of sql_help.h
In-reply-to: Your message of Sun, 14 Nov 1999 19:34:26 +0100 (CET)
<Pine.LNX.4.20.9911141850340.797-100000@peter-e.yi.org>
Date: Mon, 15 Nov 1999 20:02:55 -0500
Message-ID: <19905.942714175@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
"The `configure' script and the Makefile rules for building and
installation should not use any utilities directly except these:
cat cmp cp diff echo egrep expr false grep install-info
ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true"
No awk there either.
Do I need to point out that Perl isn't there either? But this GNU rule
is irrelevant, because it applies to tools needed to build a standard
*distribution* of a package. Maintainer tools can include other things.
Using perl to generate sql_help.h seems perfectly appropriate to me,
as I said before.
What I wanted to find out was whether there were a lot of people using
the CVS server who don't have Perl and would object to installing it.
That's what will determine whether we can remove sql_help.h from the CVS
archive (as opposed to distributed tarballs).
PS: "make distclean" should probably not remove sql_help.h, for the
same reasons that we don't remove gram.c --- it *is* a distributed
file, and a particular user might not have the tools to rebuild it.
That was my bad. For some reason I had the idea that "distclean" stood for
"distinctly clean" (really clean). :-\ I'll fix that. Perhaps we ought to
decide on some standard targets. "maintainer-clean" would be the proper
one to use (in GNU, again).
No, it wouldn't be. We use distclean precisely as specified in the GNU
coding standards:
`distclean'
Delete all files from the current directory that are created by
configuring or building the program. If you have unpacked the
source and built the program without creating any other files,
`make distclean' should leave only the files that were in the
distribution.
sql_help.h will now be in the distribution, therefore distclean
shouldn't remove it.
regards, tom lane
From bouncefilter Mon Nov 15 20:26:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA05708
for <pgsql-hackers@postgreSQL.org>;
Mon, 15 Nov 1999 20:26:47 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id UAA20092;
Mon, 15 Nov 1999 20:26:10 -0500 (EST)
To: Mike Mascari <mascarim@yahoo.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Postmaster dies with FATAL 1: ReleaseLruFile: No opened
files - no one can be closed
In-reply-to: Your message of Mon, 15 Nov 1999 15:22:21 -0800 (PST)
<19991115232221.5713.rocketmail@web2103.mail.yahoo.com>
Date: Mon, 15 Nov 1999 20:26:10 -0500
Message-ID: <20090.942715570@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Mike Mascari <mascarim@yahoo.com> writes:
Thanks for the response, Tom. When looking at the system log,
the kernel was logging messages regarding IPX network name collisions
which apprently can happen when there are autoconfigured Win95 boxes
on the same subnet. These messages were flooding the log at a rate of
one every second or two...Even though #2 seems improbable, and just
glancing at the IPX kernel code didn't point to how that may have
caused a continual consumption of file descriptors, I'm willing to
blame the kernel on this (and me for using autoprimary and autointerface
options).
That doesn't strike me as a bulletproof explanation. fd.c has a tight
loop that close()s an FD and then tries to open() the file it wants,
repeat until success or an error other than ENFILE/EMFILE. If the
scenario really is that it got ENFILE every time until it was down to
zero FDs, there'd have to be something sucking up each freed FD within
microseconds of its being freed. Repeatedly. Forty or fifty (or more)
times in a row. I don't think a once-a-second Win95 lossage will do
that. And if you were down to zero free FDs system-wide, Postgres
wouldn't be the only thing having troubles!
I take it you don't use Postgres password authentication at all? If you
do, the other theory looks a lot more viable to me... I haven't had time
to try to reproduce a crash yet, but I'm pretty sure there's one there.
regards, tom lane
From bouncefilter Mon Nov 15 21:45:58 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA14363
for <hackers@postgresql.org>; Mon, 15 Nov 1999 21:45:02 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id CAA14991;
Tue, 16 Nov 1999 02:52:10 GMT
Sender: lockhart@hub.org
Message-ID: <3830C6DA.5CC933CB@alumni.caltech.edu>
Date: Tue, 16 Nov 1999 02:52:10 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Brian Waters <jbw@InnovaSystems.com>
CC: Postgres Hackers List <hackers@postgresql.org>
Subject: Re: Postgresql Docs....
References: <199911152245.RAA12751@innsys.InnovaSystems.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I notice that the postgresql docs say that postgresql is a public domain
program, while they really carry a Berkley copyright. You might want to
correct this for the next release.
http://www.bbin.com/pd/Ooh. I guess I'm not familiar with the fine points here. Our
Berkeley-style license allows use, modification, sale, gift, theft,
etc. of the software with only one provision: that the copyright
notice remain intact. Clearly, this copyright notice is designed to
protect UCB from rabid lawyers once the software is no longer under
UCB's control, and this copyright allows any and all of the above
uses, and any other use also.
So what about this would not be considered public domain software?Something can not be both Copyrighted and in the public domain.
Hmm. I've taken this on-list, just in case someone else has a comment.
But in the absence of alternate information, I'll just assume that we
are not public domain software. But I sure still have the feeling that
we are getting gypped by the legaleze.
Thanks for the heads-up...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Mon Nov 15 22:08:58 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id WAA17405
for <hackers@postgreSQL.org>; Mon, 15 Nov 1999 22:08:14 -0500 (EST)
(envelope-from vev@michvhf.com)
Received: (qmail 346 invoked by uid 1001); 16 Nov 1999 03:08:12 -0000
Message-ID: <XFMail.991115220812.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <3830C6DA.5CC933CB@alumni.caltech.edu>
Date: Mon, 15 Nov 1999 22:08:12 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Subject: RE: [HACKERS] Re: Postgresql Docs....
Cc: Postgres Hackers List <hackers@postgreSQL.org>,
Brian Waters <jbw@InnovaSystems.com>
On 16-Nov-99 Thomas Lockhart wrote:
I notice that the postgresql docs say that postgresql is a public domain
program, while they really carry a Berkley copyright. You might want to
correct this for the next release.
http://www.bbin.com/pd/Ooh. I guess I'm not familiar with the fine points here. Our
Berkeley-style license allows use, modification, sale, gift, theft,
etc. of the software with only one provision: that the copyright
notice remain intact. Clearly, this copyright notice is designed to
protect UCB from rabid lawyers once the software is no longer under
UCB's control, and this copyright allows any and all of the above
uses, and any other use also.
So what about this would not be considered public domain software?Something can not be both Copyrighted and in the public domain.
Hmm. I've taken this on-list, just in case someone else has a comment.
But in the absence of alternate information, I'll just assume that we
are not public domain software. But I sure still have the feeling that
we are getting gypped by the legaleze.
IIRC, All copyright notices must be kept intact. Software in the public
domain carries no protection whatsoever. PD software can be taken and
renamed to whatever by the person that renamed it and claimed to be their
own property. This happened to the WinVN project at least once (it's a
PD Windows newsreader). At least one commercial project came directly
from the WinVN sources - which are in the public domain.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null
# include <std/disclaimers.h> Have you seen http://www.pop4.net?
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Mon Nov 15 14:45:54 1999
Received: from adamastor.med.up.pt (root@mail.med.up.pt [193.136.35.3])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA51941
for <pgsql-hackers@postgresql.org>;
Mon, 15 Nov 1999 14:45:43 -0500 (EST) (envelope-from const@med.up.pt)
Received: from pegasus (pegasus.med.up.pt [193.136.35.44])
by adamastor.med.up.pt (8.8.7/8.8.7) with SMTP id UAA27444
for <pgsql-hackers@postgresql.org>; Mon, 15 Nov 1999 20:06:13 GMT
Message-Id: <3.0.6.32.19991115193604.02cc9e80@mail.med.up.pt>
X-Sender: const@mail.med.up.pt
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Mon, 15 Nov 1999 19:36:04 -0800
To: pgsql-hackers@postgresql.org
From: Constantino Martins <const@med.up.pt>
Subject:
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Dear Sir
Can you help me with a problem I have:
When more than 30 process query my Postgres data base, then my postmaster
create zombies process.
Like this:
USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND
postgres 4139 0.1 0.0 0 0 ? Z 18:38 0:01 (postmaster
<zombie>)
postgres 4140 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4141 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4142 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4143 0.1 0.0 0 0 ? Z 18:38 0:01 (postmaster
<zombie>)
postgres 4146 0.1 0.0 0 0 ? Z 18:38 0:02 (postmaster
<zombie>)
postgres 4150 0.1 0.0 0 0 ? Z 18:38 0:02 (postmaster
<zombie>)
postgres 4152 0.1 0.0 0 0 ? Z 18:38 0:02 (postmaster
<zombie>)
postgres 4159 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4170 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4174 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4175 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4177 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4178 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4179 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4194 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4195 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4197 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4199 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4200 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4201 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4202 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4203 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4204 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4205 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4206 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4209 0.0 0.0 0 0 ? Z 18:38 0:00 (postmaster
<zombie>)
postgres 4597 0.0 0.9 1148 608 p4 S 18:52 0:00 bash
postgres 11356 0.0 1.3 4816 824 ? S Nov 11 0:08
/usr/local/pgsql/bin/postmaster -B 256 -i -D /usr/local/pgsql/data
root 1 0.0 0.3 828 192 ? S Nov 9 0:05 init [3]Half a block on average.
root 2 0.0 0.0 0 0 ? SW Nov 9 0:00 (kflushd)
root 3 0.0 0.0 0 0 ? SW< Nov 9 0:00 (kswapd)
I have a server with 64 MB.
Can you help me ?
thanks
sorry for my English
Atentamente e com os melhores cumprimentos
Constantino Martins
From bouncefilter Mon Nov 15 23:03:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA24505
for <hackers@postgreSQL.org>; Mon, 15 Nov 1999 23:02:39 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA20679;
Mon, 15 Nov 1999 23:00:56 -0500 (EST)
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Brian Waters <jbw@InnovaSystems.com>,
Postgres Hackers List <hackers@postgresql.org>
Subject: Re: [HACKERS] Re: Postgresql Docs....
In-reply-to: Your message of Tue, 16 Nov 1999 02:52:10 +0000
<3830C6DA.5CC933CB@alumni.caltech.edu>
Date: Mon, 15 Nov 1999 23:00:55 -0500
Message-ID: <20677.942724855@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
I notice that the postgresql docs say that postgresql is a public domain
program, while they really carry a Berkley copyright. You might want to
correct this for the next release.
So what about this would not be considered public domain software?
Something can not be both Copyrighted and in the public domain.
Hmm. I've taken this on-list, just in case someone else has a comment.
But in the absence of alternate information, I'll just assume that we
are not public domain software. But I sure still have the feeling that
we are getting gypped by the legaleze.
IANAL, but I've paid considerable attention to these issues over the
past ten years. My understanding is that "public domain" means
specifically that there is *no* copyright or any other intellectual-
property restriction on the software. In particular, anything that
has either a BSD- or GPL-style license is most certainly not public
domain.
I'd suggest replacing all uses of the phrase "public domain" with
"open source" or "freely available" or some other term that hasn't
got such a clearly-inapplicable legal meaning.
regards, tom lane
From bouncefilter Mon Nov 15 23:40:00 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA30043
for <pgsql-hackers@postgreSQL.org>;
Mon, 15 Nov 1999 23:39:18 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA02308;
Mon, 15 Nov 1999 23:37:56 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911160437.XAA02308@candle.pha.pa.us>
Subject: Unique indexes on system tables
In-Reply-To: <000501bf1a97$b925a860$2801007e@cadzone.tpf.co.jp> from Hiroshi
Inoue at "Oct 20, 1999 10:09:13 am"
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Date: Mon, 15 Nov 1999 23:37:56 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Hiroshi, there are two things I want to do for 7.0.
First, I want to make more of the system indexes unique. Are you aware
of any reasons not to do that? I see you have done some of them
already. I talked to Tom Lane, and he thinks that it will not cause
problems because unique insertions/updates wait for transactions to
commit before doing a conflicting change to the index, right?
Second, I want to add more system indexes to match all caches. Anything
that could cause problems there?
Are you working on any of this?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Nov 16 00:23:00 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA38616
for <pgsql-hackers@postgreSQL.org>;
Tue, 16 Nov 1999 00:22:00 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id OAA00059; Tue, 16 Nov 1999 14:21:08 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Bruce Momjian" <pgman@candle.pha.pa.us>
Cc: "PostgreSQL-development" <pgsql-hackers@postgreSQL.org>
Subject: RE: Unique indexes on system tables
Date: Tue, 16 Nov 1999 14:25:37 +0900
Message-ID: <000001bf2ff3$0391abe0$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <199911160437.XAA02308@candle.pha.pa.us>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: Tuesday, November 16, 1999 1:38 PM
To: Hiroshi Inoue
Cc: PostgreSQL-development
Subject: Unique indexes on system tablesHiroshi, there are two things I want to do for 7.0.
First, I want to make more of the system indexes unique. Are you aware
of any reasons not to do that?
No.
It should be done to guarantee the uniqueness of system tuples.
I see you have done some of them
already. I talked to Tom Lane, and he thinks that it will not cause
problems because unique insertions/updates wait for transactions to
commit before doing a conflicting change to the index, right?
Yes.
Second, I want to add more system indexes to match all caches. Anything
that could cause problems there?
I am only afraid of index corruption.
The more we have system indexes,the more index corruption would happen.
How could we recover from the state ?
Tom suggested rebuilding indexes in vacuum.
According to Jan,there was a utility called reindexdb.
WAL by Vadim may be able to recover indexes completely in case of crash.
Are you working on any of this?
No.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Tue Nov 16 03:44:09 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA64126
for <pgsql-hackers@postgreSQL.org>;
Tue, 16 Nov 1999 03:43:14 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from tpf.co.jp ([126.0.1.56] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with ESMTP
id RAA00171; Tue, 16 Nov 1999 17:41:32 +0900
Message-ID: <383118B2.AAC9E730@tpf.co.jp>
Date: Tue, 16 Nov 1999 17:41:22 +0900
From: inoue <Inoue@tpf.co.jp>
X-Mailer: Mozilla 4.51 [ja] (Win98; I)
X-Accept-Language: ja
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: t-ishii@sra.co.jp, Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
References: <25684.942387283@sss.pgh.pa.us>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
LO is a dead end. What we really want to do is eliminate tuple-size
restrictions and then have large ordinary fields (probably of type
bytea) in regular tuples. I'd suggest working on compression in that
context, say as a new data type called "bytez" or something like that.It sounds ideal but I remember that Vadim said inserting a 2GB record
is not good idea since it will be written into the log too. If it's a
necessary limitation from the point of view of WAL, we have to accept
it, I think.LO won't make that any better: the data still goes into a table.
You'd have 2GB worth of WAL entries either way.The only thing LO would do for you is divide the data into block-sized
tuples, so there would be a bunch of little WAL entries instead of one
big one. But that'd probably be easy to duplicate too. If we implement
big tuples by chaining together disk-block-sized segments, which seems
like the most likely approach, couldn't WAL log each segment as a
separate log entry? If so, there's almost no difference between LO and
inline field for logging purposes.
I don't know LO well.
But seems LO allows partial update.
Big tuples
If so,isn't it a significant difference ?
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Tue Nov 16 03:48:10 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA64791
for <pgsql-hackers@postgreSQL.org>;
Tue, 16 Nov 1999 03:47:35 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from tpf.co.jp ([126.0.1.56] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with ESMTP
id RAA00176; Tue, 16 Nov 1999 17:45:53 +0900
Message-ID: <383119B6.952A06F3@tpf.co.jp>
Date: Tue, 16 Nov 1999 17:45:43 +0900
From: inoue <Inoue@tpf.co.jp>
X-Mailer: Mozilla 4.51 [ja] (Win98; I)
X-Accept-Language: ja
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>, t-ishii@sra.co.jp,
Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] compression in LO and other fields
References: <25684.942387283@sss.pgh.pa.us> <383118B2.AAC9E730@tpf.co.jp>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Sorry,
I sent a mail by mistake.
Ignore my previous mail.
inoue wrote:
Tom Lane wrote:
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
LO is a dead end. What we really want to do is eliminate tuple-size
restrictions and then have large ordinary fields (probably of type
bytea) in regular tuples. I'd suggest working on compression in that
context, say as a new data type called "bytez" or something like that.It sounds ideal but I remember that Vadim said inserting a 2GB record
is not good idea since it will be written into the log too. If it's a
necessary limitation from the point of view of WAL, we have to accept
it, I think.LO won't make that any better: the data still goes into a table.
You'd have 2GB worth of WAL entries either way.The only thing LO would do for you is divide the data into block-sized
tuples, so there would be a bunch of little WAL entries instead of one
big one. But that'd probably be easy to duplicate too. If we implement
big tuples by chaining together disk-block-sized segments, which seems
like the most likely approach, couldn't WAL log each segment as a
separate log entry? If so, there's almost no difference between LO and
inline field for logging purposes.I don't know LO well.
But seems LO allows partial update.
Big tuples
If so,isn't it a significant difference ?Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Tue Nov 16 11:29:15 1999
Received: from genisys.gtv.ca (h-207-228-97-106.gen.cadvision.com
[207.228.97.106]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA48853
for <pgsql-hackers@postgreSQL.org>;
Tue, 16 Nov 1999 11:28:57 -0500 (EST) (envelope-from aaron@gtv.ca)
Received: from stilborne (h-207-228-97-110.gen.cadvision.com [207.228.97.110])
by genisys.gtv.ca (8.9.3/8.8.7) with SMTP id JAA25932
for <pgsql-hackers@postgreSQL.org>; Tue, 16 Nov 1999 09:29:19 -0700
From: "Aaron J. Seigo" <aaron@gtv.ca>
To: pgsql-hackers@postgreSQL.org
Subject: replication
Date: Tue, 16 Nov 1999 09:26:50 -0700
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <16514.942357396@sss.pgh.pa.us> <382BA0FB.82D96E3C@flame.co.za>
In-Reply-To: <382BA0FB.82D96E3C@flame.co.za>
MIME-Version: 1.0
Message-Id: <99111609271703.18220@stilborne>
Content-Transfer-Encoding: 8bit
hi...
is anyone working on replication services in pgsql?
--
Aaron J. Seigo
Sys Admin
From bouncefilter Tue Nov 16 18:51:20 1999
Received: (from news@localhost) by hub.org (8.9.3/8.9.3) id SAA14651
for pgsql-hackers@postgresql.org; Tue, 16 Nov 1999 18:51:10 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: hub.org: news set sender to <news> using -f
Message-ID: <3831EC53.D5B285F3@iserv.net>
From: Tyson Oswald <tysono@iserv.net>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
X-Newsgroups: comp.databases.postgresql.hackers
Subject: Slow access
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 63
X-Trace: typ11.nn.bcandid.com 942796267 204.157.27.218 (Tue,
16 Nov 1999 18:51:07 EST)
Organization: bCandid - Powering the world's discussions - http://bCandid.com
Date: Tue, 16 Nov 1999 18:44:19 -0500
To: pgsql-hackers@postgresql.org
Hello,
Not sure is this is the place for this but, I have two object
created a table (customers) and a view cust which joins customers and
cust runs pretty slow when select count(*) from cust. I think it may be
an index issue, can anyone help? there are about 1200 records in
customers and it takes about 30 seconds to count(*). Also how to I
create a foreign key constraint?
Tyson Oswald
Create table Customers
(
id serial,
Name varchar(25),
UID varchar(7),
Ext char(4),
fkMailcode int4,
fkContext int4,
fkServer int4,
fkAdmin int4
);
drop index idx_Customers_fkAdmin;
drop index idx_Customers_fkMailcode;
drop index idx_Customers_fkServer;
drop index idx_Customers_fkContext;
Create index idx_Customers_fkAdmin on Customers(fkadmin);
Create index idx_Customers_fkMailcode on Customers(fkMailcode);
Create index idx_Customers_fkContext on Customers(fkContext);
Create index idx_Customers_fkServer on Customers(fkServer);
Create table Codes
(
id serial,
description varchar(50),
type varchar(5),
typecode varchar(5)
);
create view cust as
select
c.name,
c.ext,
c.uid,
tmail.description as mail,
tcontext.description as context,
tserver.description as server,
admins.name as admin,
c.id
from
customers c,
codes tmail,
codes tserver,
codes tcontext,
admins
where
c.fkadmin=admins.id
and c.fkmailcode = tmail.id
and c.fkcontext = tcontext.id
and c.fkserver = tserver.id;
From bouncefilter Wed Nov 17 00:13:25 1999
Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu
[128.42.12.154])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA63364
for <pgsql-hackers@postgresql.org>;
Wed, 17 Nov 1999 00:13:17 -0500 (EST)
(envelope-from reedstrm@wallace.ece.rice.edu)
Received: by wallace.ece.rice.edu via sendmail from stdin
id <m11nxP8-000LECC@wallace.ece.rice.edu> (Debian Smail3.2.0.102)
for pgsql-hackers@postgresql.org; Tue, 16 Nov 1999 23:13:14 -0600 (CST)
Date: Tue, 16 Nov 1999 23:13:14 -0600
From: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
To: Christopher Petrilli <petrilli@digicool.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: PostgreSQL install
Message-ID: <19991116231314.A1880@wallace.ece.rice.edu>
References: <19991116223509.A1664@wallace.ece.rice.edu>
<B4579DEF.615E%petrilli@digicool.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.3i
In-Reply-To: <B4579DEF.615E%petrilli@digicool.com>;
from Christopher Petrilli on Tue, Nov 16, 1999 at 11:49:03PM -0500
Hey Hackers -
I wouldn't normally forward an install problem from general to the
hackers list, but Chris is the database guy at Digital Creations, the
company behind Zope, the really cool web app. building tool, that Sybase
recently endorsed as their offical web frontend. Any of you FreeBSD
types recognize the problem?
Ross
On Tue, Nov 16, 1999 at 11:49:03PM -0500, Christopher Petrilli wrote:
On 11/16/99 11:35 PM, Ross J. Reedstrom at reedstrm@wallace.ece.rice.edu
wrote:Chris -
Did I see you post to postgresql-general, looking for help with an install
on one of the BSDs? I seem to have had a snafu with my email clients, and
lost a few emails today (Mutt doesn't lock files properly...) so I can't
find the exact mail. If you haven't resolved the build/install problem,
let me know: a number of the core developers run various BSD flavors
(www.postgresql.org is FreeBSD, for example) so this should be easily
resolvable, although I run linux, myself.Yeah, basically it looks like:
./configure
make
make install
instaldb
I seem to remember from your other post that you did get this last command
right: initdb
However, it is critical that initdb be run as the postgres user, rather
than as root. Other than that, I don't know. I'll forward your message
to the hackers list.
Ah, one last thought: how do you set up access to shared libraries
on FreeBSD? the make install will have dropped several libs in
/usr/local/pgsql/lib that the executables need access to.
Dosn't create the PG_VERSION files, nor the pg_user tables correctly... I
tried it on 3 different FreeBSD3.3 machines each downloaded seperately...
bizarre.
And as I recall, this is the pgsql-6.5.3 tar ball.
Chris
--
| Christopher Petrilli Python Powered Digital Creations, Inc.
| petrilli@digicool.com http://www.digicool.com
From bouncefilter Wed Nov 17 00:27:24 1999
Received: from gandalf.digicool.com (digitalcreations05.erols.com
[216.164.72.5]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA66269
for <pgsql-hackers@postgresql.org>;
Wed, 17 Nov 1999 00:27:21 -0500 (EST)
(envelope-from petrilli@digicool.com)
Received: from [24.6.104.179] (cj479042-a.alex1.va.home.com [24.6.104.179]) by
gandalf.digicool.com with SMTP (Microsoft Exchange Internet
Mail Service Version 5.5.1960.3)
id WSNC13H4; Wed, 17 Nov 1999 00:37:20 -0500
User-Agent: Microsoft Outlook Express Macintosh Edition - 5.0 (1513)
Date: Wed, 17 Nov 1999 00:27:03 -0500
Subject: Re: PostgreSQL install
From: Christopher Petrilli <petrilli@digicool.com>
To: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
CC: <pgsql-hackers@postgresql.org>
Message-ID: <B457A6D7.616B%petrilli@digicool.com>
In-Reply-To: <19991116231314.A1880@wallace.ece.rice.edu>
Mime-version: 1.0
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
On 11/17/99 12:13 AM, Ross J. Reedstrom at reedstrm@wallace.ece.rice.edu
wrote:
Hey Hackers -
I wouldn't normally forward an install problem from general to the
hackers list, but Chris is the database guy at Digital Creations, the
company behind Zope, the really cool web app. building tool, that Sybase
recently endorsed as their offical web frontend. Any of you FreeBSD
types recognize the problem?
Flattry flattery.... we're jus evaluating options for support in the
future, no commitments, of course, but we've had some people ask, and so we
feel the need to understand it better. I've only used Postgres (under
Stonebraker) and Illustra.
On Tue, Nov 16, 1999 at 11:49:03PM -0500, Christopher Petrilli wrote:
On 11/16/99 11:35 PM, Ross J. Reedstrom at reedstrm@wallace.ece.rice.edu
wrote:Chris -
Did I see you post to postgresql-general, looking for help with an install
on one of the BSDs? I seem to have had a snafu with my email clients, and
lost a few emails today (Mutt doesn't lock files properly...) so I can't
find the exact mail. If you haven't resolved the build/install problem,
let me know: a number of the core developers run various BSD flavors
(www.postgresql.org is FreeBSD, for example) so this should be easily
resolvable, although I run linux, myself.Yeah, basically it looks like:
./configure
make
make install
instaldbI seem to remember from your other post that you did get this last command
right: initdb
Yeah, that part was from memory :-)
However, it is critical that initdb be run as the postgres user, rather
than as root. Other than that, I don't know. I'll forward your message
to the hackers list.
Yup, run as uid 'postgres'.
Ah, one last thought: how do you set up access to shared libraries
on FreeBSD? the make install will have dropped several libs in
/usr/local/pgsql/lib that the executables need access to.
I put LD_LIBRARY_PATH to be correct. This is in the startup for the user,
so it should always be correct.
Dosn't create the PG_VERSION files, nor the pg_user tables correctly... I
tried it on 3 different FreeBSD3.3 machines each downloaded seperately...
bizarre.And as I recall, this is the pgsql-6.5.3 tar ball.
Yup, off the main FTP site... just ./configure and go with it...
Chris
--
| Christopher Petrilli Python Powered Digital Creations, Inc.
| petrilli@digicool.com http://www.digicool.com
From bouncefilter Wed Nov 17 00:41:24 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA68119
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 00:41:09 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id AAA24549;
Wed, 17 Nov 1999 00:39:57 -0500 (EST)
To: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
cc: Christopher Petrilli <petrilli@digicool.com>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: PostgreSQL install
In-reply-to: Your message of Tue, 16 Nov 1999 23:13:14 -0600
<19991116231314.A1880@wallace.ece.rice.edu>
Date: Wed, 17 Nov 1999 00:39:56 -0500
Message-ID: <24547.942817196@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu> writes:
Yeah, basically it looks like:
./configure
make
make install
instaldb
I seem to remember from your other post that you did get this last command
right: initdb
Two other thoughts: (1) is initdb in your path, and is the *right
version* the first one in your path (I've been burnt by that on
upgrades). (2) I think that initdb requires USER, PGLIB, PGDATA
env variables to be set properly for reliable operation; also PATH
had better find the new version of postgres, psql, etc before any
older versions.
If that doesn't strike gold, a copy of the failing initdb session's
printout would be useful.
regards, tom lane
From bouncefilter Wed Nov 17 05:16:27 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id FAA05853
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 05:15:54 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11o20C-0003kIC; Wed, 17 Nov 99 11:07 MET
Message-Id: <m11o20C-0003kIC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: regression tests
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Wed, 17 Nov 1999 11:07:48 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
I know that it's the new psql output format why all the
regression tests currently fail. But I think we are in this
state for a little too long now. With the latest CVS I got
this near the end of the suite after the plpgsql test:
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
Server process (pid 12207) exited with status 139 at Wed Nov 17 10:57:36 1999
Terminating any active server processes...
Server processes were terminated at Wed Nov 17 10:57:36 1999
Reinitializing shared memory and semaphores
DEBUG: Data Base System is starting up at Wed Nov 17 10:57:36 1999
This indicates that someone made changes that really broke
something and since he wasn't able to get any useful results
from a regression run, he just didn't do it.
I see a little problem with checking if the output is still
O.K. too. It seems that psql now buffers all the query
result messages until a SELECT is done. So if the regression
input contains only INSERT/UPDATE/DELETE statements, all the
responses are at the end, not after each statement.
It's really a mess. How should someone check if a system
catalog change is O.K. in this situation? I intend to do so
soon!
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 06:07:29 1999
Received: from px.com.br ([200.253.250.2])
by hub.org (8.9.3/8.9.3) with SMTP id GAA12108
for <pgsql-hackers@postgresql.org>;
Wed, 17 Nov 1999 06:06:41 -0500 (EST)
(envelope-from rcoelho@px.com.br)
Received: from [200.253.250.3] by px.com.br (AIX 4.1/UCB 5.64/4.03)
id AA15984; Wed, 17 Nov 1999 07:03:09 -0400
Message-Id: <002401bf30e3$c1a6b260$03fafdc8@px.com.br>
From: "Ricardo Coelho" <rcoelho@px.com.br>
To: <pgsql-hackers@postgresql.org>
Subject: select MIN/MAX when no row selected
Date: Wed, 17 Nov 1999 08:08:51 -0200
Organization:
Mime-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2314.1300
Hi All,
I think I had read this question with count(*) before.....
PgSql returns one row with a null field when we use select MIN or MAX on a
table, but the result should be "no rows selected".
I didn't try with C function, but I got the same result with psql.
So, I'm sending a Java example to Peter.
try {
rs=stmt.executeQuery("select min(field1) from tab where
field1>maxValueOfField1");
if (rs.next()) {
System.out.println("I found a row !!!!");
theResult=rs.getString(1);
if (theResult==null)
System.out.println("Min of field1 is NULL !!!!");
}
} catch (.............
maxValueofField1 = select max(field1) from tab;
Is it correct ?
I'm using PgSql 6.5.2, RHLinux/Intel 6.0
Thanks,
Ricardo Coelho.
From bouncefilter Wed Nov 17 06:08:29 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA12166
for <hackers@postgreSQL.org>; Wed, 17 Nov 1999 06:07:52 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Lodjur.DoCS.UU.SE (e99re41@Lodjur.DoCS.UU.SE [130.238.9.178])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA10768;
Wed, 17 Nov 1999 12:07:47 +0100
Received: from localhost (e99re41@localhost) by Lodjur.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id MAA29954;
Wed, 17 Nov 1999 12:07:46 +0100
X-Authentication-Warning: Lodjur.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Wed, 17 Nov 1999 12:07:45 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Brian Waters <jbw@InnovaSystems.com>,
Postgres Hackers List <hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: Postgresql Docs....
In-Reply-To: <3830C6DA.5CC933CB@alumni.caltech.edu>
Message-ID: <Pine.GSO.4.02A.9911171205190.29920-100000@Lodjur.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 16 Nov 1999, Thomas Lockhart wrote:
So what about this would not be considered public domain software?
Something can not be both Copyrighted and in the public domain.
Hmm. I've taken this on-list, just in case someone else has a comment.
But in the absence of alternate information, I'll just assume that we
are not public domain software. But I sure still have the feeling that
we are getting gypped by the legaleze.
How about "free software" or "freely available"? As in "free to do
whatever you want", not Free(tm) as in FSF. IMHO, "open source" sounds to
buzzword-compliant these days.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Wed Nov 17 06:12:28 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA12763
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 06:11:44 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Lodjur.DoCS.UU.SE (e99re41@Lodjur.DoCS.UU.SE [130.238.9.178])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA11068;
Wed, 17 Nov 1999 12:11:41 +0100
Received: from localhost (e99re41@localhost) by Lodjur.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id MAA29958;
Wed, 17 Nov 1999 12:11:39 +0100
X-Authentication-Warning: Lodjur.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Wed, 17 Nov 1999 12:11:39 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Hiroshi Inoue <Inoue@tpf.co.jp>
cc: Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] RE: Unique indexes on system tables
In-Reply-To: <000001bf2ff3$0391abe0$2801007e@cadzone.tpf.co.jp>
Message-ID: <Pine.GSO.4.02A.9911171209050.29920-100000@Lodjur.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 16 Nov 1999, Hiroshi Inoue wrote:
I am only afraid of index corruption.
The more we have system indexes,the more index corruption would happen.
Just a concerned user question: Why does index corruption seem to happen
so often or is a genuine concern? Wouldn't the next thing be table
corruption? Or are indices optimized for speed rather than correctness
because they don't contain important data?
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Wed Nov 17 06:22:28 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA14377
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 06:22:15 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Lodjur.DoCS.UU.SE (e99re41@Lodjur.DoCS.UU.SE [130.238.9.178])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA11660;
Wed, 17 Nov 1999 12:22:13 +0100
Received: from localhost (e99re41@localhost) by Lodjur.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id MAA29962;
Wed, 17 Nov 1999 12:22:12 +0100
X-Authentication-Warning: Lodjur.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Wed, 17 Nov 1999 12:22:11 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] regression tests
In-Reply-To: <m11o20C-0003kIC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.GSO.4.02A.9911171215150.29920-100000@Lodjur.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 17 Nov 1999, Jan Wieck wrote:
I know that it's the new psql output format why all the
regression tests currently fail. But I think we are in this
state for a little too long now. With the latest CVS I got
As I mentioned before: use the old psql for regression tests and/or just
run the regression tests once with the old one and once with the new one
and make those results the new reference. (Maybe I'm oversimplifying here,
though.)
Once again this thought also: How about running the regression tests on a
single user postgres backend directly? That way you don't rely on some
obscure frontend and some client library which might change soon, too.
Also you have more control over internals. Finally, you could easily run
the regression tests on an uninstalled build. Think ./configure; make;
make check; make install. Or am I way out there now?
I see a little problem with checking if the output is still
O.K. too. It seems that psql now buffers all the query
result messages until a SELECT is done. So if the regression
input contains only INSERT/UPDATE/DELETE statements, all the
responses are at the end, not after each statement.
Huh? psql doesn't buffer anything. Could you please elaborate on this
and/or give me an example? I never heard of that one and I thought Bruce
was a really thorough tester . . .
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Wed Nov 17 06:55:28 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id GAA18210
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 06:54:42 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11o3Xh-0003kIC; Wed, 17 Nov 99 12:46 MET
Message-Id: <m11o3Xh-0003kIC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] regression tests
To: peter_e@gmx.net
Date: Wed, 17 Nov 1999 12:46:29 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.GSO.4.02A.9911171215150.29920-100000@Lodjur.DoCS.UU.SE>
from "Peter Eisentraut" at Nov 17, 99 12:22:11 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter Eisentraut wrote:
Once again this thought also: How about running the regression tests on a
single user postgres backend directly? That way you don't rely on some
obscure frontend and some client library which might change soon, too.
Also you have more control over internals. Finally, you could easily run
the regression tests on an uninstalled build. Think ./configure; make;
make check; make install. Or am I way out there now?
That should have been done BEFORE messing up anything. This
hasn't been done, so I think it's the job of those who change
output formats, to provide new expected regression results
too. This hasn't been done too, and that's bad.
I see a little problem with checking if the output is still
O.K. too. It seems that psql now buffers all the query
result messages until a SELECT is done. So if the regression
input contains only INSERT/UPDATE/DELETE statements, all the
responses are at the end, not after each statement.Huh? psql doesn't buffer anything. Could you please elaborate on this
and/or give me an example? I never heard of that one and I thought Bruce
was a really thorough tester . . .
As I see, the result messages aren't in the (old) expected
outputs at all. But they are now. From the boolean test:
CREATE TABLE BOOLTBL1 (f1 bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('t'::bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('True'::bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('true'::bool);
-- BOOLTBL1 should be full of true's at this point
SELECT '' AS t_3, BOOLTBL1.*;
CREATE
INSERT 18633 1
INSERT 18634 1
INSERT 18635 1
t_3 | f1
-----+----
| t
| t
| t
(3 rows)
As you can see, the CREATE and INSERT responses are printed
after the SELECT statement, just before it's own output.
Again, if someone changes things that change output, he has
to provide new expected results for the regression suite. If
the changes to psql are still a work in progress, it should
have been done on separated sources until at least the output
format is stable.
What actually happened isn't good practice (IMHO). Ask all
other developers to work around some temporary misbehaviour
that makes the entire backend development a blind flight. And
the fatal abnormal backend termination at the end of the
regression show's what this lazyness can end in. ISTM someone
has broken something and didn't notice. Thus, at least that
other one didn't do it with your mentioned workaround.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 07:48:29 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id HAA24072
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 07:47:49 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11o4N4-0003kIC; Wed, 17 Nov 99 13:39 MET
Message-Id: <m11o4N4-0003kIC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] RE: Unique indexes on system tables
To: peter_e@gmx.net
Date: Wed, 17 Nov 1999 13:39:34 +0100 (MET)
Cc: Inoue@tpf.co.jp, pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.GSO.4.02A.9911171209050.29920-100000@Lodjur.DoCS.UU.SE>
from "Peter Eisentraut" at Nov 17, 99 12:11:39 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
On Tue, 16 Nov 1999, Hiroshi Inoue wrote:
I am only afraid of index corruption.
The more we have system indexes,the more index corruption would happen.Just a concerned user question: Why does index corruption seem to happen
so often or is a genuine concern? Wouldn't the next thing be table
corruption? Or are indices optimized for speed rather than correctness
because they don't contain important data?
There are more complicated concurrency issues on indices than
for regular tables. That's where the corrupt indices but not
tables come from.
For a user index, this isn't very critical, because a
drop/create index sequence will recover to consistent data.
For system catalog indices, this is a desaster, because you
cannot drop and recreate indices on system tables. At least
we need to tackle this problem by reincarnating reindexdb.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 07:57:31 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id HAA25306
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 07:56:44 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11o4Vr-0003kIC; Wed, 17 Nov 99 13:48 MET
Message-Id: <m11o4Vr-0003kIC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] regression tests
To: wieck@debis.com
Date: Wed, 17 Nov 1999 13:48:39 +0100 (MET)
Cc: pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <m11o20C-0003kIC@orion.SAPserv.Hamburg.dsh.de> from "Jan Wieck"
at Nov 17, 99 11:07:48 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
I wrote:
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
Server process (pid 12207) exited with status 139 at Wed Nov 17 10:57:36 1999
Terminating any active server processes...
Server processes were terminated at Wed Nov 17 10:57:36 1999
Reinitializing shared memory and semaphores
DEBUG: Data Base System is starting up at Wed Nov 17 10:57:36 1999
I took Peter Eisentraut's advice and did it with the old pslq
(thanks for the hint).
This problem (as expected) remains and happens in the temp
test. The two notices occur on creating the temp table and
the index on it. After that, the database connection get's
lost on the attempt to drop the temp table.
Since the postmaster is doing recovery then, the numeric test
hasn't been run. All other tests are still O.K.
The question is, who did something that could cause this
error?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 08:34:29 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id IAA29431
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 08:33:40 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Uggla.DoCS.UU.SE (e99re41@Uggla.DoCS.UU.SE [130.238.9.156]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id OAA19306;
Wed, 17 Nov 1999 14:33:38 +0100
Received: from localhost (e99re41@localhost) by Uggla.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id OAA18789;
Wed, 17 Nov 1999 14:33:37 +0100
X-Authentication-Warning: Uggla.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Wed, 17 Nov 1999 14:33:37 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] regression tests
In-Reply-To: <m11o3Xh-0003kIC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.GSO.4.02A.9911171427070.18751-100000@Uggla.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 17 Nov 1999, Jan Wieck wrote:
That should have been done BEFORE messing up anything. This
hasn't been done, so I think it's the job of those who change
output formats, to provide new expected regression results
too. This hasn't been done too, and that's bad.
I explicitly informed everyone that this would happen a long time before I
finalized psql. Nobody seemed to care a lot. Now, weeks after the fact
some people start wondering that perhaps they want to run regression tests
once in a while. I'm not the regression test maintainer, nor do I have
knowledge of how to remake them, so all I can do is inform everyone and
cooperate on anything that's necessary. But silence is implicit approval.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Wed Nov 17 10:08:30 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA41201
for <hackers@postgreSQL.org>; Wed, 17 Nov 1999 10:07:55 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.8.7/8.8.5) with ESMTP id KAA21672;
Wed, 17 Nov 1999 10:07:27 -0500
Message-ID: <3832C4A9.BEDCD413@wgcr.org>
Date: Wed, 17 Nov 1999 10:07:21 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Eisentraut <peter_e@gmx.net>
CC: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Brian Waters <jbw@InnovaSystems.com>,
Postgres Hackers List <hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: Postgresql Docs....
References: <Pine.GSO.4.02A.9911171205190.29920-100000@Lodjur.DoCS.UU.SE>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Peter Eisentraut wrote:
On Tue, 16 Nov 1999, Thomas Lockhart wrote:
So what about this would not be considered public domain software?
Something can not be both Copyrighted and in the public domain.
Hmm. I've taken this on-list, just in case someone else has a comment.
But in the absence of alternate information, I'll just assume that we
are not public domain software. But I sure still have the feeling that
we are getting gypped by the legaleze.How about "free software" or "freely available"? As in "free to do
whatever you want", not Free(tm) as in FSF. IMHO, "open source" sounds to
buzzword-compliant these days.
How about simply "BSD licensed?"
--
Lamar Owen
WGCR Internet Radio
From bouncefilter Wed Nov 17 11:01:31 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA47855
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 11:00:49 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA10335;
Wed, 17 Nov 1999 10:52:40 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911171552.KAA10335@candle.pha.pa.us>
Subject: Re: [HACKERS] regression tests
In-Reply-To: <m11o4Vr-0003kIC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Nov 17, 1999 01:48:39 pm"
To: Jan Wieck <wieck@debis.com>
Date: Wed, 17 Nov 1999 10:52:40 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I took Peter Eisentraut's advice and did it with the old pslq
(thanks for the hint).This problem (as expected) remains and happens in the temp
test. The two notices occur on creating the temp table and
the index on it. After that, the database connection get's
lost on the attempt to drop the temp table.Since the postmaster is doing recovery then, the numeric test
hasn't been run. All other tests are still O.K.The question is, who did something that could cause this
error?
I am sure it was me changing the temp behavior. I will look at it.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Nov 17 11:06:31 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA48495
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 11:05:40 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA11548;
Wed, 17 Nov 1999 11:04:42 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911171604.LAA11548@candle.pha.pa.us>
Subject: Re: [HACKERS] regression tests
In-Reply-To: From "(env:" "pgman)" at "Nov 17, 1999 10:52:40 am"
To: pgman@candle.pha.pa.us
Date: Wed, 17 Nov 1999 11:04:42 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I took Peter Eisentraut's advice and did it with the old pslq
(thanks for the hint).This problem (as expected) remains and happens in the temp
test. The two notices occur on creating the temp table and
the index on it. After that, the database connection get's
lost on the attempt to drop the temp table.Since the postmaster is doing recovery then, the numeric test
hasn't been run. All other tests are still O.K.The question is, who did something that could cause this
error?I am sure it was me changing the temp behavior. I will look at it.
Jan, I can't reproduce the temp regression failure here. I did make
changes yesterday morning to this. I assume you have an updated cvs,
right?
Anyway to make the default numeric regression test run faster. It seems
to take quite a while compared to the others.
We certainly need someone to update the regression tests to match the
new format so people can continue running regression tests before
applying patches.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Nov 17 11:26:32 1999
Received: from genisys.gtv.ca (h-207-228-97-106.gen.cadvision.com
[207.228.97.106]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA51172
for <hackers@postgresql.org>; Wed, 17 Nov 1999 11:25:58 -0500 (EST)
(envelope-from aaron@gtv.ca)
Received: from stilborne (h-207-228-97-110.gen.cadvision.com [207.228.97.110])
by genisys.gtv.ca (8.9.3/8.8.7) with SMTP id JAA28453;
Wed, 17 Nov 1999 09:26:00 -0700
From: "Aaron J. Seigo" <aaron@gtv.ca>
To: Lamar Owen <lamar.owen@wgcr.org>
Subject: Re: [HACKERS] Re: Postgresql Docs....
Date: Wed, 17 Nov 1999 09:10:12 -0700
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <Pine.GSO.4.02A.9911171205190.29920-100000@Lodjur.DoCS.UU.SE>
<3832C4A9.BEDCD413@wgcr.org>
In-Reply-To: <3832C4A9.BEDCD413@wgcr.org>
Cc: Postgres Hackers List <hackers@postgresql.org>
MIME-Version: 1.0
Message-Id: <99111709235700.23706@stilborne>
Content-Transfer-Encoding: 8bit
hi...
Hmm. I've taken this on-list, just in case someone else has a comment.
But in the absence of alternate information, I'll just assume that we
are not public domain software. But I sure still have the feeling that
we are getting gypped by the legaleze.How about "free software" or "freely available"? As in "free to do
whatever you want", not Free(tm) as in FSF. IMHO, "open source" sounds to
buzzword-compliant these days.How about simply "BSD licensed?"
traditional "BSD Liscences" have that silly advertising
clause.. which postgres does as well, unfortunately... quite honestly, i find
that irritating and antiquated. *shrug* not like the regents are exactly doing
anything important w/postgres now, right? and for all the shouting of "its
TRULY free", there are string attatched...
anyways... as long as a lisence protects what needs to be protected, all is
good. instead of arguing silly semantics (BSD/XFree/Public
Domain/GPL/blahblahblah) we should be looking more importantly at which rights
we want to secure and which we don't really care about.
BSD/XFree style liscences are good when a permisiveness is desired (like apache
and how it help keep HTTP on track) and bad when you aren't trying to enforce
certain standards but endevouring to keep a software available to others...
fortunately, postgres isn't a trivial piece of software, which serves as a
protection. but it isn't so complex that it couldn't be taken on by another
entity. in fact, a compay could easily come along and swoop up the core 4
programmers with terrific job offers and that would pretty much be that =)
lets hope people's scruples and dedications are in the place We would like them
to be...
public domain would be horrid. BSD/XFree style is fine, though probably more
permissive than needed (and perhaps even desired). the GPL is
probably a little too demanding for this type of software though...
it would be interesting to see it settle somewhere in between. e.g. if you want
to extend it, GREAT! if you distribute it gratis, you have to make it available
to everyone... perhaps require source code be available for the current
release (not distributed, but available)... and if someone wants to _sell_ it
as a closed package, fine! but require they give something back to the postgres
development team.
--
Aaron J. Seigo
Sys Admin
From bouncefilter Wed Nov 17 11:54:32 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA54461
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 11:53:39 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA26002;
Wed, 17 Nov 1999 11:51:24 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] regression tests
In-reply-to: Your message of Wed, 17 Nov 1999 11:04:42 -0500 (EST)
<199911171604.LAA11548@candle.pha.pa.us>
Date: Wed, 17 Nov 1999 11:51:24 -0500
Message-ID: <26000.942857484@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We certainly need someone to update the regression tests to match the
new format so people can continue running regression tests before
applying patches.
I've been using old psql (per Peter's suggestion) to run regression
tests. I have not pulled CVS since Saturday but things seemed OK then.
If there is a breakage, it's recent.
I thought we were putting off committing a new set of regress test
expected outputs until the dust settles in the new psql. Isn't Peter
still tweaking the output format? Not much point in generating new
expected files until everyone agrees the format is frozen.
Of course there's a bit of a catch-22 situation here: since I am not
using the new psql, I'm not contributing any feedback on it. The same
is probably true of some other developers... when we do finally adopt
new psql (after regress test update) there may be a bunch of belated
requests for changes...
regards, tom lane
From bouncefilter Wed Nov 17 12:56:32 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA66294
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 12:56:02 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA15385;
Wed, 17 Nov 1999 12:54:03 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911171754.MAA15385@candle.pha.pa.us>
Subject: Re: [HACKERS] regression tests
In-Reply-To: <26000.942857484@sss.pgh.pa.us> from Tom Lane at "Nov 17,
1999 11:51:24 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Wed, 17 Nov 1999 12:54:03 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We certainly need someone to update the regression tests to match the
new format so people can continue running regression tests before
applying patches.I've been using old psql (per Peter's suggestion) to run regression
tests. I have not pulled CVS since Saturday but things seemed OK then.
If there is a breakage, it's recent.I thought we were putting off committing a new set of regress test
expected outputs until the dust settles in the new psql. Isn't Peter
still tweaking the output format? Not much point in generating new
expected files until everyone agrees the format is frozen.Of course there's a bit of a catch-22 situation here: since I am not
using the new psql, I'm not contributing any feedback on it. The same
is probably true of some other developers... when we do finally adopt
new psql (after regress test update) there may be a bunch of belated
requests for changes...
Yes, I am waiting to see if anyone changes the format before updating
all the queries in my book.
Is everyone OK with the new format? Do you like it more or less than
the old one? Please someone weight in on one side or the other so we
can conclude this. People have been very quiet on this issue.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Nov 17 13:03:32 1999
Received: from www2.hapenney.com ([207.22.245.171])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA67145
for <hackers@postgreSQL.org>; Wed, 17 Nov 1999 13:02:39 -0500 (EST)
(envelope-from evan@4-am.com)
Received: from 4-am.com ([216.178.132.153])
by www2.hapenney.com (8.9.3/8.8.7) with ESMTP id MAA13972
for <hackers@postgreSQL.org>; Wed, 17 Nov 1999 12:02:21 -0600
Sender: evan@hapenney.com
Message-ID: <3832EDA3.92AE9AF7@4-am.com>
Date: Wed, 17 Nov 1999 12:02:12 -0600
From: Evan Simpson <evan@4-am.com>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Postgres Hackers List <hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: Postgresql Docs....
References: <Pine.GSO.4.02A.9911171205190.29920-100000@Lodjur.DoCS.UU.SE>
<3832C4A9.BEDCD413@wgcr.org> <99111709235700.23706@stilborne>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
One half-decent newspeak alternative I've seen to "free software" and "open
source" is "Wide-Open Source" (WOS). It seems designed to imply that your licence
is "open source, and then some", such as BSD-style without the advertising clause
and meaningless reference to Berkeley.
"Aaron J. Seigo" wrote:
How about "free software" or "freely available"? As in "free to do
whatever you want", not Free(tm) as in FSF. IMHO, "open source" sounds to
buzzword-compliant these days.How about simply "BSD licensed?"
traditional "BSD Liscences" have that silly advertising
clause.. which postgres does as well, unfortunately... quite honestly, i find
that irritating and antiquated. *shrug* not like the regents are exactly doing
anything important w/postgres now, right? and for all the shouting of "its
TRULY free", there are string attatched...
Cheers,
Evan @ 4-am
From bouncefilter Wed Nov 17 13:51:33 1999
Received: from portal1.visa.com (portal1.visa.com [198.80.42.2])
by hub.org (8.9.3/8.9.3) with SMTP id NAA73452
for <pgsql-hackers@postgresql.org>;
Wed, 17 Nov 1999 13:51:15 -0500 (EST)
(envelope-from knarayan@visa.com)
Received: by portal1.visa.com id KAA07097
(InterLock SMTP Gateway 4.2 for pgsql-hackers@postgresql.org);
Wed, 17 Nov 1999 10:51:13 -0800
Received: by portal1.visa.com (Protected-side Proxy Mail Agent-1);
Wed, 17 Nov 1999 10:51:13 -0800
Message-Id: <E3940A45EE1CD21196100001FA444AE702B0D18E@sw720x019.visa.com>
From: "Narayanan, Kannan" <knarayan@visa.com>
To: "'pgsql-hackers@postgresql.org'" <pgsql-hackers@postgresql.org>
Subject: FW: How to select the millisecond/microsecond parts of the dateti
me column
Date: Wed, 17 Nov 1999 10:51:12 -0800
Importance: high
X-Priority: 1
Mime-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
-----Original Message-----
From: Narayanan, Kannan
Sent: Wednesday, November 17, 1999 10:47 AM
To: 'pgsql-questions@postgresql.org'
Subject: How to select the millisecond/microsecond parts of the
datetime column
Importance: HighHello,
Product version: Postgres 6.5.3
SELECT DATETIME('MILLISECOND', 'NOW'::DATETIME) always returns 0(ZERO) and
so does 'MICROSECOND'. However a reading of the manuals indicate that the
database supports much higher precision values. How do I retrieve the
additional precision values (beyond seconds) when I use the datetime
field? This is a requirement for a conversion project that I am working
on. Could someone help please.Thanks
Kannan
From bouncefilter Wed Nov 17 14:07:33 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id OAA75194
for <hackers@postgresql.org>; Wed, 17 Nov 1999 14:07:18 -0500 (EST)
(envelope-from vev@michvhf.com)
Received: (qmail 5111 invoked by uid 1001); 17 Nov 1999 19:07:21 -0000
Message-ID: <XFMail.991117140721.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
Resent-Date: Wed, 17 Nov 1999 09:49:20 -0800 (PST)
Resent-Message-Id: <19991117174920.10322.rocketmail@web2103.mail.yahoo.com>
Resent-From: =?iso-8859-1?q?nitin=20thakkar?= <nitinthakkar@yahoo.com>
Resent-To: webmaster@postgresql.org
Date: Wed, 17 Nov 1999 14:07:21 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: hackers@postgresql.org
Subject: FW: Query
This was sent to webmaster@postgresql.org. Anyone have an answer
to it? I'm not familiar with oracle so I don't know what he's
talking about.
Vince.
-----FW: <19991117174920.10322.rocketmail@web2103.mail.yahoo.com>-----
From: =?iso-8859-1?q?nitin=20thakkar?= <nitinthakkar@yahoo.com>
To: webmaster@postgresql.org
Subject: Query
Hi,
I am PostGRESql user and have a query :
DOES POSTGRESQL SUPPORT DATABASE LINK AS IN ORACLE 8.0
Regards
Nitin
=====
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
--------------End of forwarded message-------------------------
From bouncefilter Wed Nov 17 14:36:33 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id OAA79167
for <hackers@postgreSQL.org>; Wed, 17 Nov 1999 14:36:26 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11oAkV-0003kGC; Wed, 17 Nov 99 20:28 MET
Message-Id: <m11oAkV-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] FW: Query
To: vev@michvhf.com (Vince Vielhaber)
Date: Wed, 17 Nov 1999 20:28:11 +0100 (MET)
Cc: hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <XFMail.991117140721.vev@michvhf.com> from "Vince Vielhaber" at
Nov 17, 99 02:07:21 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
This was sent to webmaster@postgresql.org. Anyone have an answer
to it? I'm not familiar with oracle so I don't know what he's
talking about.Vince.
I am PostGRESql user and have a query :
DOES POSTGRESQL SUPPORT DATABASE LINK AS IN ORACLE 8.0
AFAIK it means to show up a virtual relation, that is a
relation in another database. So if you query your local
relation, your backend connects to the other database and
virtually shares this relation.
No, PostgreSQL does not support this.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 14:46:37 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id OAA80569
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 14:45:45 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11oAtY-0003kGC; Wed, 17 Nov 99 20:37 MET
Message-Id: <m11oAtY-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] regression tests
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Wed, 17 Nov 1999 20:37:32 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199911171552.KAA10335@candle.pha.pa.us> from "Bruce Momjian" at
Nov 17, 99 10:52:40 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
The question is, who did something that could cause this
error?I am sure it was me changing the temp behavior. I will look at it.
Running the queries in question in gdb shows:
backend> CREATE TABLE temptest(col int);
backend> CREATE INDEX i_temptest ON temptest(col);
backend> CREATE TEMP TABLE temptest(col int);
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
backend> CREATE INDEX i_temptest ON temptest(col);
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
backend> DROP INDEX i_temptest;
backend> DROP TABLE temptest;
Program received signal SIGSEGV, Segmentation fault.
0x806b47d in heap_openr (relationName=0x81c4e90 "temptest", lockmode=7)
at heapam.c:569
569 if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
(gdb) print *r
$2 = {rd_fd = 65536, rd_nblocks = 184, rd_refcnt = 38017,
rd_myxactonly = 16 '\020', rd_isnailed = 8 '\b', rd_isnoname = 0 '\000',
rd_unlinked = 0 '\000', rd_am = 0xb8, rd_rel = 0x2, rd_id = 2,
rd_lockInfo = {lockRelId = {relId = 403, dbId = 131072}}, rd_att = 0xb8,
rd_rules = 0x8109480, rd_istrat = 0x0, rd_support = 0xb8, trigdesc = 0x2}
The problem at this point is that r->rd_rel is 0x2, causing
the SIGSEGV. But I assume the real problem occured earlier
where the notice's came from. The relation descriptor must
have gotten messed up somehow during the CREATE TEMP TABLE.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 15:17:34 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA84117
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 15:16:32 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
PAA26856;
Wed, 17 Nov 1999 15:15:54 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911172015.PAA26856@candle.pha.pa.us>
Subject: Re: [HACKERS] regression tests
In-Reply-To: <m11oAtY-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Nov 17, 1999 08:37:32 pm"
To: Jan Wieck <wieck@debis.com>
Date: Wed, 17 Nov 1999 15:15:54 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
The question is, who did something that could cause this
error?I am sure it was me changing the temp behavior. I will look at it.
Running the queries in question in gdb shows:
backend> CREATE TABLE temptest(col int);
backend> CREATE INDEX i_temptest ON temptest(col);
backend> CREATE TEMP TABLE temptest(col int);
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
backend> CREATE INDEX i_temptest ON temptest(col);
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
backend> DROP INDEX i_temptest;
backend> DROP TABLE temptest;
Let me try some tests now. I have an idea.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Nov 17 15:23:34 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA84890
for <hackers@postgresql.org>; Wed, 17 Nov 1999 15:23:18 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.8.7/8.8.5) with ESMTP id PAA22148;
Wed, 17 Nov 1999 15:23:03 -0500
Message-ID: <38330E9E.517B3CA1@wgcr.org>
Date: Wed, 17 Nov 1999 15:22:54 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: "Aaron J. Seigo" <aaron@gtv.ca>
CC: Postgres Hackers List <hackers@postgresql.org>
Subject: Re: [HACKERS] Re: Postgresql Docs....
References: <Pine.GSO.4.02A.9911171205190.29920-100000@Lodjur.DoCS.UU.SE>
<3832C4A9.BEDCD413@wgcr.org> <99111709235700.23706@stilborne>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
"Aaron J. Seigo" wrote:
How about simply "BSD licensed?"
traditional "BSD Liscences" have that silly advertising
clause.. which postgres does as well, unfortunately... quite honestly, i find
that irritating and antiquated. *shrug* not like the regents are exactly doing
anything important w/postgres now, right? and for all the shouting of "its
TRULY free", there are string attatched...
There are always strings attached. The BSD license has the fewest
strings short of fully public domain.
Domain/GPL/blahblahblah) we should be looking more importantly at which rights
we want to secure and which we don't really care about.
That has already been done -- PostgreSQL still has Berkeley code in it,
and therefore HAS TO BE BSD licensed -- if the license terms are to be
changed (which is not likely to happen), Berkeley code will have to be
eradicated -- which is also not likely to happen.
[snip]
The point is this: the license is not changing (unless ALL contributors
past and present agree to it). I just stated the fact of what license
it is.
There is really no use in discussing what license to put PostgreSQL
under, as it is already under one. That means that there is absolutely
no obligation on anyone who uses the software to give back to the
community -- in fact, if they want to take PostgreSQL, rename it, and
sell it, they are free to do so -- and they don't have to give anything
back. In fact, the original Postgres had this very thing happen -- the
commercial database Illustra was the result, and that got swallowed by
Informix. PostgreSQL lives -- Illustra is dead. Long live PostgreSQL!
--
Lamar Owen
WGCR Internet Radio
From bouncefilter Wed Nov 17 15:57:34 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA90232
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 15:56:43 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
PAA01829;
Wed, 17 Nov 1999 15:56:23 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911172056.PAA01829@candle.pha.pa.us>
Subject: Re: [HACKERS] regression tests
In-Reply-To: <m11oAtY-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Nov 17, 1999 08:37:32 pm"
To: Jan Wieck <wieck@debis.com>
Date: Wed, 17 Nov 1999 15:56:23 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
The question is, who did something that could cause this
error?I am sure it was me changing the temp behavior. I will look at it.
Running the queries in question in gdb shows:
backend> CREATE TABLE temptest(col int);
backend> CREATE INDEX i_temptest ON temptest(col);
backend> CREATE TEMP TABLE temptest(col int);
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
backend> CREATE INDEX i_temptest ON temptest(col);
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
backend> DROP INDEX i_temptest;
backend> DROP TABLE temptest;
Sorry. I see it now. Let me fix it.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Nov 17 17:47:35 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id RAA11951
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 17:46:38 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11oDim-0003kGC; Wed, 17 Nov 99 23:38 MET
Message-Id: <m11oDim-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: LZ compressing data type
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Wed, 17 Nov 1999 23:38:36 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
I just committed some changes that require an initdb.
New are the discussed, simple LZ compressor, placed into
/utils/adt/pg_compress.c, and a new lztext data type based on
it. You'll find a fairly detailed description of the
compression algorithm in the comments at the top of
pg_lzcompress.c.
Not very surprisingly to me it turns out, that the compressor
does a very good job on rule action strings. I used the 48
rules that can be found in pg_rewrite after the regression
test. The original string sizes range from 820 to 4615 and
the compression rates from 35-76% with an average of 60%. The
4615 size rule action has been coded into a 1126
octet_length.
For the lztext type, there are conversion functions to/from
text and the length() and octet_length() functions available.
Length() returns the same as length on text would. While
octet_length returns the compressed size without VARHDRSZ.
The type does not support MULTIBYTE or CYR_ENCODE up to now.
It shouldn't be too hard to add it and after that, we might
add another lzbpchar type too. The latter is really
interesting, because an empty char(200) (thus containing 200
spaces) could result in an octet_length of 12 instead of 204
- that's a compression rate of 94.1%! It actually wouldn't,
because the compressors default is to start only if the input
is at least 256 bytes, but there is a mechanism so a lzbpchar
type could force this behaviour.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 18:51:36 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA20216
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 18:51:10 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
SAA17886;
Wed, 17 Nov 1999 18:50:44 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911172350.SAA17886@candle.pha.pa.us>
Subject: Re: [HACKERS] regression tests
In-Reply-To: <199911172056.PAA01829@candle.pha.pa.us> from Bruce Momjian at
"Nov 17, 1999 03:56:23 pm"
To: Bruce Momjian <pgman@candle.pha.pa.us>
Date: Wed, 17 Nov 1999 18:50:44 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
The question is, who did something that could cause this
error?I am sure it was me changing the temp behavior. I will look at it.
Running the queries in question in gdb shows:
backend> CREATE TABLE temptest(col int);
backend> CREATE INDEX i_temptest ON temptest(col);
backend> CREATE TEMP TABLE temptest(col int);
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
backend> CREATE INDEX i_temptest ON temptest(col);
NOTICE: trying to delete a reldesc that does not exist.
NOTICE: trying to delete a reldesc that does not exist.
backend> DROP INDEX i_temptest;
backend> DROP TABLE temptest;Sorry. I see it now. Let me fix it.
OK, fixed. Seems there was some confusion in the cache over whether
tables where indexed by logical or phsical names in the hash table to
clear out the cache. Fixed now. Sorry.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Nov 17 18:53:36 1999
Received: from argh.demon.co.uk (IDENT:grim@argh.demon.co.uk [193.237.6.55])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA20391
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 18:53:26 -0500 (EST)
(envelope-from grim@argh.demon.co.uk)
Received: (from grim@localhost) by argh.demon.co.uk (8.9.3/8.9.3) id XAA00481;
Wed, 17 Nov 1999 23:54:07 GMT
From: Michael Simms <grim@argh.demon.co.uk>
Message-Id: <199911172354.XAA00481@argh.demon.co.uk>
Subject: Re: [HACKERS] LZ compressing data type
To: wieck@debis.com
Date: Wed, 17 Nov 1999 23:54:07 +0000 (GMT)
Cc: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
In-Reply-To: <m11oDim-0003kGC@orion.SAPserv.Hamburg.dsh.de> from "Jan Wieck"
at Nov 17, 1999 11:38:36 PM
X-Mailer: ELM [version 2.5 PL0pre8]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I just committed some changes that require an initdb.
New are the discussed, simple LZ compressor, placed into
/utils/adt/pg_compress.c, and a new lztext data type based on
it. You'll find a fairly detailed description of the
compression algorithm in the comments at the top of
pg_lzcompress.c.
One question.
You say this is an LZ algorythm. Is this the same as LZW, as in the
same kind that gifs use. If so, are we sure that this algorythm is not
covered by the Unisys patent? Their patent is on the algorythm for
compression not on gifs themselves.
If it is, you are liable for a $5,000 fee to use it throughout your
site, or a per-licence fee if you are distributing (thay are worked out
on a per case basis but typical licences are $5 per unit sold from what
I am told).
I came across this problem with a gif manipulation program that *I
WROTE FROM SCRATCH* and had to switch to using the libungif
compression routines.
Just thought Id mention this, in case it has been overlooked.
~Michael
From bouncefilter Wed Nov 17 19:29:36 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id TAA24536
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 19:28:50 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11oFJd-0003kGC; Thu, 18 Nov 99 01:20 MET
Message-Id: <m11oFJd-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LZ compressing data type
To: grim@argh.demon.co.uk (Michael Simms)
Date: Thu, 18 Nov 1999 01:20:45 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199911172354.XAA00481@argh.demon.co.uk> from "Michael Simms" at
Nov 17, 99 11:54:07 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
I just committed some changes that require an initdb.
New are the discussed, simple LZ compressor, placed into
/utils/adt/pg_compress.c, and a new lztext data type based on
it. You'll find a fairly detailed description of the
compression algorithm in the comments at the top of
pg_lzcompress.c.One question.
You say this is an LZ algorythm. Is this the same as LZW, as in the
same kind that gifs use. If so, are we sure that this algorythm is not
covered by the Unisys patent? Their patent is on the algorythm for
compression not on gifs themselves.If it is, you are liable for a $5,000 fee to use it throughout your
site, or a per-licence fee if you are distributing (thay are worked out
on a per case basis but typical licences are $5 per unit sold from what
I am told).
It't an SLZ algorithm, not LZW. There are FLZ and LZ77 out
too (and I don't know how many other subtypes). At least, LZ
is a family of compression algorithms where LZW is just a
member of them.
I've written the entire code from scatch, inspired by an
article from Adisak Pochanayon dated back in 1993. If they
have a license on this algorithm, they have one on code that
can be coded from scatch in 20 hours after reading
information that's claimed to be free on the internet,
congrats.
This is M$ practice, I never thought that there's more than
one company out doing this kind of business.
But thanks for the info.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 19:53:20 1999
Received: from hotzsun.jpl.nasa.gov (root@hotzsun.jpl.nasa.gov
[137.78.84.131])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA27512
for <hackers@postgreSQL.org>; Wed, 17 Nov 1999 19:52:36 -0500 (EST)
(envelope-from hotz@jpl.nasa.gov)
Received: from [137.78.84.130] (hotzmac [137.78.84.130])
by hotzsun.jpl.nasa.gov (8.9.3/8.9.3) with ESMTP id QAA06093;
Wed, 17 Nov 1999 16:52:13 -0800 (PST)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: hotzmail@hotzsun.jpl.nasa.gov
Message-Id: <v04020a0bb458fd4780ee@[137.78.84.130]>
In-Reply-To: <38330E9E.517B3CA1@wgcr.org>
References: <Pine.GSO.4.02A.9911171205190.29920-100000@Lodjur.DoCS.UU.SE>
<3832C4A9.BEDCD413@wgcr.org> <99111709235700.23706@stilborne>
Date: Wed, 17 Nov 1999 16:51:25 -0800
To: Lamar Owen <lamar.owen@wgcr.org>, "Aaron J. Seigo" <aaron@gtv.ca>
From: "Henry B. Hotz" <hotz@jpl.nasa.gov>
Subject: Re: [HACKERS] Re: Postgresql Docs....
Cc: Postgres Hackers List <hackers@postgreSQL.org>
At 12:22 PM -0800 11/17/99, Lamar Owen wrote:
There is really no use in discussing what license to put PostgreSQL
under, as it is already under one. That means that there is absolutely
no obligation on anyone who uses the software to give back to the
community -- in fact, if they want to take PostgreSQL, rename it, and
sell it, they are free to do so -- and they don't have to give anything
back. In fact, the original Postgres had this very thing happen -- the
Well there is *one* thing they have to give back: credit. They have to
reproduce the copyright notice.
Signature failed Preliminary Design Review.
Feasibility of a new signature is currently being evaluated.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu
From bouncefilter Wed Nov 17 21:32:38 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id VAA37655
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 21:31:45 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11oHEb-0003kGC; Thu, 18 Nov 99 03:23 MET
Message-Id: <m11oHEb-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LZ compressing data type
To: wieck@debis.com
Date: Thu, 18 Nov 1999 03:23:41 +0100 (MET)
Cc: grim@argh.demon.co.uk, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <m11oFJd-0003kGC@orion.SAPserv.Hamburg.dsh.de> from "Jan Wieck"
at Nov 18, 99 01:20:45 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
If it is, you are liable for a $5,000 fee to use it throughout your
site, or a per-licence fee if you are distributing (thay are worked out
on a per case basis but typical licences are $5 per unit sold from what
I am told).It't an SLZ algorithm, not LZW. There are FLZ and LZ77 out
too (and I don't know how many other subtypes). At least, LZ
is a family of compression algorithms where LZW is just a
member of them.[...]
But thanks for the info.
From the very beginning of US patent No. 4,558,302 (the thing
behind Unisys's LZW):
The compressor searches the input stream to determine the
longest match to a stored string. Each stored string
comprises a prefix string and an extension character
where the extension character is the last character in
the string and the prefix string comprises all but the
extension character. Each string has a code signal
associated therewith and a string is stored in the string
table by, at least implicitly, storing the code signal
for the string, the code signal for the string prefix and
the extension character.
The format my code stores is different to this definition.
It only stores offset/length pairs or literal bytes, signaled
by a bit in a control unit. So there is no prefix string
and/or extension character at all.
If someone might state that storing TAG's and LITERAL chars
is still equivalent to PREFIX and EXTension character, I say
that my code possibly output's sequences of immediately
following TAG's, that aren't neccessarily PREFIX'es. One TAG
could code a sequence of characters, not previously occured
in any other TAG, without any intermediate LITERAL character
occured.
And my code forgets AUTOMATICALLY about too far behind
occurences of matching strings for speed AND compression rate
improvement.
Thus I think my implementation is not related to this patent.
When reading patent #4,558,302 I really remembered the
question, if anyone could ever have a patent on rectangle
front lights for cars. The definition is so general, that I
cannot think that gzip, bzip or any other existing
compression tool doesn't use it's METHOD. If such a GENERAL
patent is possible at all, car manufacturers all over the
world would have to pay millions of dollars license fee's
just to sell cars with rectangular lights.
I don't see any relationship between my code and what Unisys
has a patent for. If they see, I might be blind - or they see
a horizon from inside a black hole. If they need to, I'll
enlighten them.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Nov 17 22:26:38 1999
Received: from acheron.rime.com.au (root@[139.130.54.222])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA42953
for <pgsql-hackers@postgreSQL.org>;
Wed, 17 Nov 1999 22:26:28 -0500 (EST)
(envelope-from pjw@rhyme.com.au)
Received: from oberon (Oberon.rime.com.au [203.8.195.100])
by acheron.rime.com.au (8.9.3/8.9.3) with SMTP id OAA29765;
Thu, 18 Nov 1999 14:25:14 +1100
Message-Id: <3.0.5.32.19991118142605.00c63a70@mail.rhyme.com.au>
X-Sender: pjw@mail.rhyme.com.au
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Thu, 18 Nov 1999 14:26:05 +1100
To: wieck@debis.com (Jan Wieck), wieck@debis.com
From: Philip Warner <pjw@rhyme.com.au>
Subject: Re: [HACKERS] LZ compressing data type
Cc: grim@argh.demon.co.uk, pgsql-hackers@postgreSQL.org
In-Reply-To: <m11oHEb-0003kGC@orion.SAPserv.Hamburg.dsh.de>
References: <m11oFJd-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 03:23 18/11/99 +0100, Jan Wieck wrote:
From the very beginning of US patent No. 4,558,302 (the thing
behind Unisys's LZW):
The other thing to remember is that there are a very large number of
countries in which this patent does not apply because it was not even
applied for until after the alogorithm was made public. In the first
publication of the LZW algorithm, there was no patent notice, but I think
the US patent had been applied for.
For US-based distribution sites, however, you may find the threat of legal
action from a large company is enough to make it less desirable to
distribute.
FWIW, I think Unisys patented the LZW algorithm only.
It's probably a bit late to ask, but how difficult would it be to
generalize your code to use the compressor/encryption library of choice?
zlib and pgp spring to mind. This would kill three birds with one stone.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: +61-03-5367 7422 | _________ \
Fax: +61-03-5367 7430 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
From bouncefilter Wed Nov 17 23:30:39 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA50371
for <pgsql-hackers@postgresql.org>;
Wed, 17 Nov 1999 23:29:47 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA27482;
Wed, 17 Nov 1999 23:28:23 -0500 (EST)
To: Philip Warner <pjw@rhyme.com.au>
cc: wieck@debis.com (Jan Wieck), grim@argh.demon.co.uk,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] LZ compressing data type
In-reply-to: Your message of Thu, 18 Nov 1999 14:26:05 +1100
<3.0.5.32.19991118142605.00c63a70@mail.rhyme.com.au>
Date: Wed, 17 Nov 1999 23:28:23 -0500
Message-ID: <27480.942899303@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Philip Warner <pjw@rhyme.com.au> writes:
FWIW, I think Unisys patented the LZW algorithm only.
More specifically, Unisys patented Terry Welch's variant of the LZ78
class of algorithms. Jan's code falls in the substantially different
LZ77 class. There could be problematic patents out there, but Unisys'
is certainly not one.
(If you don't know the difference between LZ77 and LZ78, see the
comp.compression FAQ ... but don't raise alarms about compression
patents if you don't know even that much about the field, eh?)
regards, tom lane
From bouncefilter Wed Nov 17 23:50:40 1999
Received: from acheron.rime.com.au (root@albatr.lnk.telstra.net
[139.130.54.222]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA53571
for <pgsql-hackers@postgresql.org>;
Wed, 17 Nov 1999 23:50:17 -0500 (EST)
(envelope-from pjw@rhyme.com.au)
Received: from oberon (Oberon.rime.com.au [203.8.195.100])
by acheron.rime.com.au (8.9.3/8.9.3) with SMTP id PAA30364;
Thu, 18 Nov 1999 15:49:19 +1100
Message-Id: <3.0.5.32.19991118155010.00cdfc30@mail.rhyme.com.au>
X-Sender: pjw@mail.rhyme.com.au
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Thu, 18 Nov 1999 15:50:10 +1100
To: Tom Lane <tgl@sss.pgh.pa.us>
From: Philip Warner <pjw@rhyme.com.au>
Subject: Re: [HACKERS] LZ compressing data type
Cc: wieck@debis.com (Jan Wieck), grim@argh.demon.co.uk,
pgsql-hackers@postgresql.org
In-Reply-To: <27480.942899303@sss.pgh.pa.us>
References: <Your message of Thu, 18 Nov 1999 14:26:05 +1100
<3.0.5.32.19991118142605.00c63a70@mail.rhyme.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 23:28 17/11/99 -0500, Tom Lane wrote:
Philip Warner <pjw@rhyme.com.au> writes:
FWIW, I think Unisys patented the LZW algorithm only.
More specifically, Unisys patented Terry Welch's variant of the LZ78
class of algorithms.
Hence the 'W' in LZW, no?
Jan's code falls in the substantially different
LZ77 class. There could be problematic patents out there, but Unisys'
is certainly not one.
Is this a legal opinion, or a personal one?
(If you don't know the difference between LZ77 and LZ78, see the
comp.compression FAQ ... but don't raise alarms about compression
patents if you don't know even that much about the field, eh?)
1. I did not raise the alarm, I just responded to it.
2. Since Unisys have moved to block code that does not even use LZW
compression, but happens to be compatible with most GIF decompressors, I
think your comment is misinformed, eh? (See the GD graphics library)
The fear is not whether one wins court cases, but whether you can afford to
fight them.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: +61-03-5367 7422 | _________ \
Fax: +61-03-5367 7430 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
From bouncefilter Thu Nov 18 00:43:40 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA63912
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 00:43:25 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id AAA27644;
Thu, 18 Nov 1999 00:40:45 -0500 (EST)
To: Philip Warner <pjw@rhyme.com.au>
cc: wieck@debis.com (Jan Wieck), grim@argh.demon.co.uk,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LZ compressing data type
In-reply-to: Your message of Thu, 18 Nov 1999 15:50:10 +1100
<3.0.5.32.19991118155010.00cdfc30@mail.rhyme.com.au>
Date: Thu, 18 Nov 1999 00:40:45 -0500
Message-ID: <27642.942903645@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Philip Warner <pjw@rhyme.com.au> writes:
At 23:28 17/11/99 -0500, Tom Lane wrote:
Jan's code falls in the substantially different
LZ77 class. There could be problematic patents out there, but Unisys'
is certainly not one.
Is this a legal opinion, or a personal one?
I'm not a lawyer, but I believe I qualify as an expert witness when
it comes to compression questions. It is not a matter of opinion
whether Jan's code is LZ77 or LZ78, nor is it a matter of opinion
which class Unisys has claims on a small piece of.
The fear is not whether one wins court cases, but whether you can afford to
fight them.
There are patents related to databases. Shall we therefore shut down
Postgres development and run screaming for the hills? If we let
ourselves be intimidated by irrelevant patents, the Microsofts and
Unisyses will win without a fight.
regards, tom lane
From bouncefilter Thu Nov 18 05:10:09 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA00627
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 05:09:51 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <W08AKVXK>; Thu, 18 Nov 1999 12:08:17 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C26B@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'Vince Vielhaber'" <vev@michvhf.com>, hackers@postgreSQL.org
Subject: RE: [HACKERS] FW: Query
Date: Thu, 18 Nov 1999 11:56:25 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
No, we don't support anything like this. This is the ability to create a
link in one database that points to a table in another database, so that it
can be accessed as if local. The other database can be a separate instance
(a concept which PG doesn't really have), or even on another machine.
MikeA
-----Original Message-----
From: Vince Vielhaber [mailto:vev@michvhf.com]
Sent: Wednesday, November 17, 1999 9:07 PM
To: hackers@postgreSQL.org
Subject: [HACKERS] FW: QueryThis was sent to webmaster@postgresql.org. Anyone have an answer
to it? I'm not familiar with oracle so I don't know what he's
talking about.Vince.
-----FW:
<19991117174920.10322.rocketmail@web2103.mail.yahoo.com>-----
From: =?iso-8859-1?q?nitin=20thakkar?= <nitinthakkar@yahoo.com>
To: webmaster@postgresql.org
Subject: QueryHi,
I am PostGRESql user and have a query :
DOES POSTGRESQL SUPPORT DATABASE LINK AS IN ORACLE 8.0
Regards
Nitin=====
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com--------------End of forwarded message-------------------------
************
From bouncefilter Thu Nov 18 07:22:10 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id HAA15233
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 07:22:04 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11oQRW-0003kGC; Thu, 18 Nov 99 13:13 MET
Message-Id: <m11oQRW-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LZ compressing data type
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Thu, 18 Nov 1999 13:13:38 +0100 (MET)
Cc: pjw@rhyme.com.au, wieck@debis.com, grim@argh.demon.co.uk,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <27642.942903645@sss.pgh.pa.us> from "Tom Lane" at Nov 18,
99 00:40:45 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
There are patents related to databases. Shall we therefore shut down
Postgres development and run screaming for the hills? If we let
ourselves be intimidated by irrelevant patents, the Microsofts and
Unisyses will win without a fight.
It's definitely a LZ77 coder, and this technique is used in
many other compressors too (lha, arj, zlib, gzip, ...). So I
don't think we have to fear anything.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Nov 18 09:06:11 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id JAA74452
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 09:05:34 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11oS48-0003kGC; Thu, 18 Nov 99 14:57 MET
Message-Id: <m11oS48-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: rules use lztext - initdb required
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Thu, 18 Nov 1999 14:57:36 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
I just committed a little change to pg_rewrite.h and related
sources. Needs a new clean compile and initdb. Attributes
ev_qual and ev_action are now of type lztext (formerly text).
This one is impressive:
create table t1 (
typname name ,
typowner int4 ,
typlen int2 ,
typprtlen int2 ,
typbyval bool ,
typtype char ,
.
. (totally 54 attributes of various types)
.
atthasdef bool
);
CREATE
create view v1 as select * from t1;
CREATE 148540 1
select rulename, length(ev_action), octet_length(ev_action),
(100 - octet_length(ev_action) * 100 / length(ev_action))::text || '%'
as ratio
from pg_rewrite;
rulename |length|octet_length|ratio
--------------+------+------------+-----
_RETpg_user | 2683| 794|71%
_RETpg_rules | 2562| 934|64%
_RETpg_views | 3740| 1043|73%
_RETpg_tables | 4615| 1126|76%
_RETpg_indexes| 2639| 854|68%
_RETv1 | 14121| 1910|87%
(6 rows)
That means, the rule action string of the view v1 has an
original length of 14121 bytes and is stored in pg_rewrite in
1910 bytes only.
This should give us some room for complicated views/rules.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Nov 18 10:19:12 1999
Received: from px.com.br ([200.253.250.2])
by hub.org (8.9.3/8.9.3) with SMTP id KAA83325
for <pgsql-hackers@postgresql.org>;
Thu, 18 Nov 1999 10:19:04 -0500 (EST)
(envelope-from rcoelho@px.com.br)
Received: from [200.253.250.3] by px.com.br (AIX 4.1/UCB 5.64/4.03)
id AA15296; Thu, 18 Nov 1999 11:15:42 -0400
Message-Id: <006d01bf31d0$330b4b40$03fafdc8@px.com.br>
From: "Ricardo Coelho" <rcoelho@px.com.br>
To: <pgsql-hackers@postgresql.org>
Subject: Change your own password
Date: Thu, 18 Nov 1999 12:21:24 -0200
Organization:
Mime-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2314.1300
Hi,
Does anybody know how a user could change your own password ? (without
pg_shadow access, of course).
I would like to transfer this task to each one.
I don't remember. Trusted languages overlaps security restrictions, isn't it
?
If I build a C function chgpwd(username,oldpassword,newpassword), it will
work ?
Thanks,
Ricardo Coelho.
From bouncefilter Thu Nov 18 10:21:12 1999
Received: from biology.nmsu.edu (biology.NMSU.Edu [128.123.5.72])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA83716
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 10:20:25 -0500 (EST)
(envelope-from brook@biology.nmsu.edu)
Received: (from brook@localhost) by biology.nmsu.edu (8.8.8/8.8.8) id
IAA19229;
Thu, 18 Nov 1999 08:20:19 -0700 (MST)
Date: Thu, 18 Nov 1999 08:20:19 -0700 (MST)
Message-Id: <199911181520.IAA19229@biology.nmsu.edu>
X-Authentication-Warning: biology.nmsu.edu: brook set sender to
brook@biology.nmsu.edu using -f
From: Brook Milligan <brook@biology.nmsu.edu>
To: wieck@debis.com
CC: pgsql-hackers@postgreSQL.org
In-reply-to: <m11oS48-0003kGC@orion.SAPserv.Hamburg.dsh.de> (wieck@debis.com)
Subject: Re: [HACKERS] rules use lztext - initdb required
References: <m11oS48-0003kGC@orion.SAPserv.Hamburg.dsh.de>
That means, the rule action string of the view v1 has an
original length of 14121 bytes and is stored in pg_rewrite in
1910 bytes only.
This should give us some room for complicated views/rules.
This is great! One of my major frustrations has been designing a
great set of tables/views and then running out of space for the
rules.
Thanks for putting this together.
Cheers,
Brook
From bouncefilter Thu Nov 18 16:21:16 1999
Received: from mail.enterprise.net (mail.enterprise.net [194.72.192.18])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA36489
for <pgsql-hackers@postgresql.org>;
Thu, 18 Nov 1999 16:20:48 -0500 (EST) (envelope-from olly@lfix.co.uk)
Received: from linda.lfix.co.uk (root@max01-068.enterprise.net
[194.72.195.68])
by mail.enterprise.net (8.8.5/8.8.5) with ESMTP id VAA05407
for <pgsql-hackers@postgresql.org>; Thu, 18 Nov 1999 21:20:43 GMT
Received: from lfix.co.uk (olly@localhost [127.0.0.1])
by linda.lfix.co.uk (8.9.3/8.9.3/Debian 8.9.3-6) with ESMTP id VAA22284
for <pgsql-hackers@postgresql.org>; Thu, 18 Nov 1999 21:19:33 GMT
Message-Id: <199911182119.VAA22284@linda.lfix.co.uk>
X-Authentication-Warning: linda.lfix.co.uk: Host olly@localhost [127.0.0.1]
claimed to be lfix.co.uk
X-Mailer: exmh version 2.1.1 10/15/1999 (debian)
To: pgsql-hackers@postgresql.org
Subject: Createdb problem report
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0
Date: Thu, 18 Nov 1999 21:19:33 +0000
From: "Oliver Elphick" <olly@lfix.co.uk>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id QAA36525
The attached report is still correct as of 6.5.3; but will having a
database name that has to be quoted cause problems anywhere that SQL
queries are constructed to do internal operations?
The SQL command `CREATE DATABASE "www-data"' works correctly.
------- Forwarded Message
Date: Thu, 18 Nov 1999 20:39:51 +0100
From: Eric Gentilini <eric.gentilini@eleve.emn.fr>
To: olly@lfix.co.uk
Subject: [POSTGRESQL] Does createdb belong to postgresql ?
hi !
I fixed a _very_ little bug in createdb and destroydb that prevents the
creation of postgresql users whose name contains special characters, and
especially '-', useful when accessing a database through a CGI script, whose
user is 'www-data' by default.
But I don't know if this prog is debian specific or if it belongs to
postrgesql.
Can you help me ?
thx !
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Eric Gentilini
Your email address : eric.gentilini@eleve.emn.fr
System Configuration
- ---------------------
Architecture (example: Intel Pentium) : Intel Pentium&PentiumII
Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.13 ELF
PostgreSQL version (example: PostgreSQL-6.5.2): PostgreSQL-6.5.2
Compiler used (example: gcc 2.8.0) : not compiled by me
Please enter a FULL description of your problem:
- ------------------------------------------------
I don't know if it is really a bug or if it is intentionnal, but
I found out that createdb and destroydb prevented the
creation/destruction of postgresql users whose
name contained special characters, and
especially '-', useful when accessing a database through a CGI script, whose
user is 'www-data' by default.
(In this case, createdb is executed by createuser)
The query aborts with the message "ERROR: parser: parse error at or near "-""
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
- ----------------------------------------------------------------------
for instance : createdb www-data
If you know how this problem might be fixed, list the solution below:
- ---------------------------------------------------------------------
The simplest solution I found is to modify the scripts createdb and destroydb.
createdb : replace line 114 with :
psql $PASSWDOPT -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "create
database \"$dbname\" $location $encoding" template1
^^^ ^^^
destroydb : replace line 78 with :
psql -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "drop database \"$dbname\"" template
1
^^^ ^^^
Eric (Yam) Gentilini
Linux ��� Nantes sur http://www.linux-nantes.fr.eu.org
------- End of Forwarded Message
--
Vote against SPAM: http://www.politik-digital.de/spam/
========================================
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"A Song for the sabbath day. It is a good thing to
give thanks unto the LORD, and to sing praises unto
thy name, O most High." Psalms 92:1
From bouncefilter Thu Nov 18 16:48:18 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA40568
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 16:47:03 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
QAA12254;
Thu, 18 Nov 1999 16:46:30 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911182146.QAA12254@candle.pha.pa.us>
Subject: Re: [HACKERS] Createdb problem report
In-Reply-To: <199911182119.VAA22284@linda.lfix.co.uk> from Oliver Elphick at
"Nov 18, 1999 09:19:33 pm"
To: Oliver Elphick <olly@lfix.co.uk>
Date: Thu, 18 Nov 1999 16:46:30 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Applied. Will appear in 7.0
[Charset iso-8859-1 unsupported, filtering to ASCII...]
The attached report is still correct as of 6.5.3; but will having a
database name that has to be quoted cause problems anywhere that SQL
queries are constructed to do internal operations?The SQL command `CREATE DATABASE "www-data"' works correctly.
------- Forwarded Message
Date: Thu, 18 Nov 1999 20:39:51 +0100
From: Eric Gentilini <eric.gentilini@eleve.emn.fr>
To: olly@lfix.co.uk
Subject: [POSTGRESQL] Does createdb belong to postgresql ?hi !
I fixed a _very_ little bug in createdb and destroydb that prevents the
creation of postgresql users whose name contains special characters, and
especially '-', useful when accessing a database through a CGI script, whose
user is 'www-data' by default.But I don't know if this prog is debian specific or if it belongs to
postrgesql.Can you help me ?
thx !============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================Your name : Eric Gentilini
Your email address : eric.gentilini@eleve.emn.frSystem Configuration
- ---------------------
Architecture (example: Intel Pentium) : Intel Pentium&PentiumIIOperating System (example: Linux 2.0.26 ELF) : Linux 2.2.13 ELF
PostgreSQL version (example: PostgreSQL-6.5.2): PostgreSQL-6.5.2
Compiler used (example: gcc 2.8.0) : not compiled by me
Please enter a FULL description of your problem:
- ------------------------------------------------
I don't know if it is really a bug or if it is intentionnal, but
I found out that createdb and destroydb prevented the
creation/destruction of postgresql users whose
name contained special characters, and
especially '-', useful when accessing a database through a CGI script, whose
user is 'www-data' by default.
(In this case, createdb is executed by createuser)
The query aborts with the message "ERROR: parser: parse error at or near "-""Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
- ----------------------------------------------------------------------
for instance : createdb www-dataIf you know how this problem might be fixed, list the solution below:
- ---------------------------------------------------------------------
The simplest solution I found is to modify the scripts createdb and destroydb.
createdb : replace line 114 with :
psql $PASSWDOPT -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "create
database \"$dbname\" $location $encoding" template1
^^^ ^^^
destroydb : replace line 78 with :
psql -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "drop database \"$dbname\"" template
1
^^^ ^^^Eric (Yam) Gentilini
Linux _ Nantes sur http://www.linux-nantes.fr.eu.org
------- End of Forwarded Message
--
Vote against SPAM: http://www.politik-digital.de/spam/
========================================
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"A Song for the sabbath day. It is a good thing to
give thanks unto the LORD, and to sing praises unto
thy name, O most High." Psalms 92:1************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 17:26:17 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA49551
for <hackers@postgresql.org>; Thu, 18 Nov 1999 17:25:43 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:61690 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sB5nQ174483>; Thu, 18 Nov 1999 23:25:32 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11oa3y-0000Cs-00
for hackers@postgresql.org; Thu, 18 Nov 1999 23:29:58 +0100
Date: Thu, 18 Nov 1999 23:29:58 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: hackers@postgresql.org
Subject: psql & regress tests
Message-ID: <Pine.LNX.4.20.9911182327450.714-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
Okay, here is my semiofficial take on the situation:
* Use the psql from the 6.5.* distro to do regression tests until further
notice.
* Although the output format in the current psql is not under intensive
development anymore, I am not sure if I can guarantee a "freeze" soon.
Once in a while I find some sort of flaw in really strange query results;
the aim of the output is to be visually pleasing, not to provide an exact
match so something. Having said that, I do not expect any major changes to
take place anymore though.
* The other problem is *what* is actually printed, as opposed to the
peculiarities of the table format. This is still somewhat confusing even
to me and I am still fixing things so they make sense at the end.
Example:
***OLD
QUERY: CREATE TABLE BOOLTBL1 (f1 bool);
QUERY: INSERT INTO BOOLTBL1 (f1) VALUES ('t'::bool);
QUERY: INSERT INTO BOOLTBL1 (f1) VALUES ('True'::bool);
QUERY: INSERT INTO BOOLTBL1 (f1) VALUES ('true'::bool);
QUERY: SELECT '' AS t_3, BOOLTBL1.*;
t_3|f1
---+--
|t
|t
|t
(3 rows)
***CURRENT
CREATE TABLE BOOLTBL1 (f1 bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('t'::bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('True'::bool);
INSERT INTO BOOLTBL1 (f1) VALUES ('true'::bool);
-- BOOLTBL1 should be full of true's at this point
SELECT '' AS t_3, BOOLTBL1.*;
t_3 | f1
-----+----
| t
| t
| t
(3 rows)
(In fact, it's so current, it's not even in CVS yet, thanks to some
problems pointed out by Jan.)
Yes, there actually is a reasoning behind all of this, I'm just not sure
right now what it was ;). If someone is interested, I can bore you with
the details.
* Since no one has picked up on my idea to run the tests directly on the
backend, I will keep reiterating this idea until someone shuts me up
:*) The idea would be to have a target "check" in the top level makefile
like this (conceptually):
check: all
mkdir ./regress
initdb -l . -d ./regress
for i in test1 test2 test3 ...; do
postgres -D ./regress -E template1 \
< $(srcdir)/test/regress/sql/$i.sql \
& output-$i.out
done
for i in test1 test2 test3 ...; do
cmp output-$i.out expected-$i.out
if [ $? == 1]; then
echo "Test $i failed."
else
echo "Test $i passed."
rm -f output-$i.out
fi
done
rm -rf ./regress
Then you can do
./configure
make
make check
make install
Or am I missing something here? Of course this change would require some
work, but I'm just getting at the concept here.
Finally, I'd like to apologize for the extra trouble some must have had. I
can only offer to cooperate on anything that needs to be done.
-Peter
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Nov 18 18:01:17 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA56758
for <hackers@postgresql.org>; Thu, 18 Nov 1999 18:00:51 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
RAA16165;
Thu, 18 Nov 1999 17:41:36 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911182241.RAA16165@candle.pha.pa.us>
Subject: Re: [HACKERS] psql & regress tests
In-Reply-To: <Pine.LNX.4.20.9911182327450.714-100000@localhost.localdomain>
from Peter Eisentraut at "Nov 18, 1999 11:29:58 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Thu, 18 Nov 1999 17:41:36 -0500 (EST)
CC: hackers@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
* Since no one has picked up on my idea to run the tests directly on the
backend, I will keep reiterating this idea until someone shuts me up
:*) The idea would be to have a target "check" in the top level makefile
like this (conceptually):
Running the backend standalone does not use locking with other backends,
so it is dangerous.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Nov 19 20:33:38 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA05102
for <pgsql-hackers@postgresql.org>;
Fri, 19 Nov 1999 20:33:24 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64148 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sBTdB168336>; Sat, 20 Nov 1999 02:33:01 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11oaer-0000D7-00; Fri, 19 Nov 1999 00:08:05 +0100
Date: Fri, 19 Nov 1999 00:08:05 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Oliver Elphick <olly@lfix.co.uk>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Createdb problem report
In-Reply-To: <199911182146.QAA12254@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.20.9911190004060.714-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
The cleanup on the scripts I recently did contained that, too. I think
it's on hold now because I'm going to fix up the create user SQL statement
to allow picking your user id first. Or was there any other reason?
Anyway, just letting you know that this problem has been recognized.
-Peter
On 1999-11-18, Bruce Momjian mentioned:
Applied. Will appear in 7.0
I fixed a _very_ little bug in createdb and destroydb that prevents the
creation of postgresql users whose name contains special characters, and
especially '-', useful when accessing a database through a CGI script, whose
user is 'www-data' by default.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Nov 18 18:14:19 1999
Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu
[128.42.12.154])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA63079
for <hackers@postgresql.org>; Thu, 18 Nov 1999 18:13:34 -0500 (EST)
(envelope-from reedstrm@wallace.ece.rice.edu)
Received: by wallace.ece.rice.edu via sendmail from stdin
id <m11oak9-000LECC@wallace.ece.rice.edu> (Debian Smail3.2.0.102)
for hackers@postgresql.org; Thu, 18 Nov 1999 17:13:33 -0600 (CST)
Date: Thu, 18 Nov 1999 17:13:33 -0600
From: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
To: hackers@postgresql.org
Subject: Re: [HACKERS] psql & regress tests
Message-ID: <19991118171333.A18543@wallace.ece.rice.edu>
References: <Pine.LNX.4.20.9911182327450.714-100000@localhost.localdomain>
<199911182241.RAA16165@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.3i
In-Reply-To: <199911182241.RAA16165@candle.pha.pa.us>;
from Bruce Momjian on Thu, Nov 18, 1999 at 05:41:36PM -0500
On Thu, Nov 18, 1999 at 05:41:36PM -0500, Bruce Momjian wrote:
* Since no one has picked up on my idea to run the tests directly on the
backend, I will keep reiterating this idea until someone shuts me up
:*) The idea would be to have a target "check" in the top level makefile
like this (conceptually):Running the backend standalone does not use locking with other backends,
so it is dangerous.
Bruce, how dos this apply to Peter's suggestion? We're talking about
_regression_ tests. Things to do after changing the code. Do you often
recompile, and run regression tests against a db with a (now out of date)
postmaster running against it? Do other developers? I'd have thought a
complete shutdown/restart is part of the cycle anyway. has to be if an
initdb is in there of course. Checking to make sure a postmaster isn't
running could be added to Peter's script, just to be sure.
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
From bouncefilter Thu Nov 18 18:37:18 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA81894
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 18:36:34 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
SAA18215;
Thu, 18 Nov 1999 18:35:15 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911182335.SAA18215@candle.pha.pa.us>
Subject: Re: [HACKERS] psql & regress tests
In-Reply-To: <19991118171333.A18543@wallace.ece.rice.edu> from "Ross J.
Reedstrom" at "Nov 18, 1999 05:13:33 pm"
To: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
Date: Thu, 18 Nov 1999 18:35:15 -0500 (EST)
CC: hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Thu, Nov 18, 1999 at 05:41:36PM -0500, Bruce Momjian wrote:
* Since no one has picked up on my idea to run the tests directly on the
backend, I will keep reiterating this idea until someone shuts me up
:*) The idea would be to have a target "check" in the top level makefile
like this (conceptually):Running the backend standalone does not use locking with other backends,
so it is dangerous.Bruce, how dos this apply to Peter's suggestion? We're talking about
_regression_ tests. Things to do after changing the code. Do you often
recompile, and run regression tests against a db with a (now out of date)
postmaster running against it? Do other developers? I'd have thought a
complete shutdown/restart is part of the cycle anyway. has to be if an
initdb is in there of course. Checking to make sure a postmaster isn't
running could be added to Peter's script, just to be sure.
Regression tests are often run by end-users as part of the install. I
can imagine someone seeing a problem and running the regression tests
while having running backends to see if everything is still working.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 18:58:18 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA84595
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 18:57:47 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11obJH-0003kGC; Fri, 19 Nov 99 00:49 MET
Message-Id: <m11obJH-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] psql & regress tests
To: reedstrm@wallace.ece.rice.edu (Ross J. Reedstrom)
Date: Fri, 19 Nov 1999 00:49:51 +0100 (MET)
Cc: hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <19991118171333.A18543@wallace.ece.rice.edu> from "Ross J.
Reedstrom" at Nov 18, 99 05:13:33 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
On Thu, Nov 18, 1999 at 05:41:36PM -0500, Bruce Momjian wrote:
* Since no one has picked up on my idea to run the tests directly on the
backend, I will keep reiterating this idea until someone shuts me up
:*) The idea would be to have a target "check" in the top level makefile
like this (conceptually):Running the backend standalone does not use locking with other backends,
so it is dangerous.Bruce, how dos this apply to Peter's suggestion? We're talking about
_regression_ tests. Things to do after changing the code. Do you often
recompile, and run regression tests against a db with a (now out of date)
postmaster running against it? Do other developers? I'd have thought a
complete shutdown/restart is part of the cycle anyway. has to be if an
initdb is in there of course. Checking to make sure a postmaster isn't
running could be added to Peter's script, just to be sure.
I'm actually doing some tests if the 'make check' would be
possible. I.e. doing a complete install with POSTGRESDIR
below the regress dir, running initdb with the libdir and
datadir pointing into there too, then starting new postmaster
on a different port in background etc., etc., etc..
That would make it possible to do a complete check without
doing a regular install at all.
Will give some results soon.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Nov 18 19:19:18 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA87051
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 19:18:18 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id TAA00320;
Thu, 18 Nov 1999 19:17:23 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Peter Eisentraut <peter_e@gmx.net>, hackers@postgreSQL.org
Subject: Re: [HACKERS] psql & regress tests
In-reply-to: Your message of Thu, 18 Nov 1999 17:41:36 -0500 (EST)
<199911182241.RAA16165@candle.pha.pa.us>
Date: Thu, 18 Nov 1999 19:17:23 -0500
Message-ID: <318.942970643@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
* Since no one has picked up on my idea to run the tests directly on the
backend, I will keep reiterating this idea until someone shuts me up
Running the backend standalone does not use locking with other backends,
so it is dangerous.
It wouldn't be particularly "dangerous" if we assume that no one else is
accessing the regression database. What it *would* be is less useful at
catching problems. Standalone mode wouldn't test the cross-backend
interlocking code at all.
Admittedly, running a bunch of tests serially isn't a strong stress test
of cross-backend behavior, but it's not as content-free a check as you
might think. On my machine, at least, the old backend is still around
doing shutdown for the first half-second or so while the next one is
running.
What I'd really like to see is some deliberate parallelism in some of
the regress tests...
regards, tom lane
From bouncefilter Thu Nov 18 19:31:19 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA89183
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 19:30:46 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id TAA19161
for pgsql-hackers@postgreSQL.org; Thu, 18 Nov 1999 19:22:48 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190022.TAA19161@candle.pha.pa.us>
Subject: pg version date file
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Thu, 18 Nov 1999 19:22:48 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Where is that file that makes an initdb required? We are supposed to
change that file when an initdb is needed.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 20:06:19 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id UAA93892
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 20:05:42 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11ocMk-0003kGC; Fri, 19 Nov 99 01:57 MET
Message-Id: <m11ocMk-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] psql & regress tests
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Fri, 19 Nov 1999 01:57:30 +0100 (MET)
Cc: pgman@candle.pha.pa.us, peter_e@gmx.net, hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <318.942970643@sss.pgh.pa.us> from "Tom Lane" at Nov 18,
99 07:17:23 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
Admittedly, running a bunch of tests serially isn't a strong stress test
of cross-backend behavior, but it's not as content-free a check as you
might think. On my machine, at least, the old backend is still around
doing shutdown for the first half-second or so while the next one is
running.What I'd really like to see is some deliberate parallelism in some of
the regress tests...
It's amusing how often we two have the same wishes or ideas.
The run_check.sh script, I'm actually hacking on, would be a
replacement for the regress.sh, started off from the 'make
check'. And from the first try I added syntax to the
sql/tests file to run either groups of tests parallel
intermixed with single tests sequentially.
The new syntax will look like this:
parallel group1
test boolean
test char
test name
endparallel
test varchar
test text
test strings
parallel group2
test int2
test int4
test int8
endparallel
.
.
.
The above will run boolean, char and name parallel. After all
three terminated, it will check their output and continue to
run varchar, text and strings sequentially, followed by the
next parallel group.
To test real concurrency we might need to split up some or
create new tests, where the same tables are accessed
concurrently. But that wouldn't be hard to do I think.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Nov 18 20:04:19 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA93505
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 20:03:33 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA19713;
Thu, 18 Nov 1999 19:58:40 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190058.TAA19713@candle.pha.pa.us>
Subject: Re: [HACKERS] psql & regress tests
In-Reply-To: <318.942970643@sss.pgh.pa.us> from Tom Lane at "Nov 18,
1999 07:17:23 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 18 Nov 1999 19:58:40 -0500 (EST)
CC: Peter Eisentraut <peter_e@gmx.net>, hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
* Since no one has picked up on my idea to run the tests directly on the
backend, I will keep reiterating this idea until someone shuts me upRunning the backend standalone does not use locking with other backends,
so it is dangerous.It wouldn't be particularly "dangerous" if we assume that no one else is
accessing the regression database. What it *would* be is less useful at
catching problems. Standalone mode wouldn't test the cross-backend
interlocking code at all.
Any modifications to shared pg_ tables would be a problem. Also, pg_log
and pg_variable locking is not happening in there either, is it?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 20:13:19 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA94730
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 20:13:07 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id UAA20026
for pgsql-hackers@postgreSQL.org; Thu, 18 Nov 1999 20:12:18 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190112.UAA20026@candle.pha.pa.us>
Subject: Getting OID in psql of recent insert
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Thu, 18 Nov 1999 20:12:18 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
In writing the book, I see the serious limitation that there is no way
in psql to access the most recently inserted oid. Without it, there
seems to be no way to use the oid value as a foreign key in another
table.
Should I add a function to return the most recently assigned oid to the
backend, or is there a better way?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 20:11:19 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA94485
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 20:10:27 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id KAA01196 for <pgsql-hackers@postgreSQL.org>;
Fri, 19 Nov 1999 10:10:25 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "pgsql-hackers" <pgsql-hackers@postgreSQL.org>
Subject: Hash Join is very slooow in some cases
Date: Fri, 19 Nov 1999 10:14:56 +0900
Message-ID: <000201bf322b$7df2a620$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
Hi all,
We are converting Oracle system to PostgreSQL.
But some queries takes very looong time.
I have tried variously and made a typical example
in PostgreSQL 6.5.2 .
It's already known ?
select count(*) from a,b where a.id1=b.id1;
returns immeidaitely and EXPLAIN shows
Aggregate (cost=3380.24 rows=24929 width=8)
-> Hash Join (cost=3380.24 rows=24929 width=8)
-> Seq Scan on a (cost=1551.41 rows=27558 width=4)
-> Hash (cost=604.21 rows=8885 width=4)
-> Seq Scan on b (cost=604.21 rows=8885 width=4)
But
select count(*) from a,b where a.id1=b.id1 and a.id2=b.id2;
takes very looong time.
EXPLAIN shows
Aggregate (cost=3382.24 rows=8195 width=12)
-> Hash Join (cost=3382.24 rows=8195 width=12)
-> Seq Scan on a (cost=1551.41 rows=27558 width=6)
-> Hash (cost=604.21 rows=8885 width=6)
-> Seq Scan on b (cost=604.21 rows=8885 width=6)
Query plans are almost same.
Why is there a such difference ?
I examined an output by EXPLAIN VERBOSE and found that
the 1st query uses id1 as its hashkey and 2nd query uses id2
as its hashkey.
So I tried the following query.
select count(*) from a,b where a.id2=b.id2 and a.id1=b.id1;
This returns immediately as I expected.
id1-s are type int4 and their disbursions are 0.00010181/
0.000203409.
id2-s are type int2 and their disbursions are 0.523526/
0.328712 .
Is id2 suitable for a hashkey ?
I can't try it in current now,sorry.
But seems the following code in createplan.c is unchanged.
/* Now the righthand op of the sole hashclause is the inner hash key. */
innerhashkey = get_rightop(lfirst(hashclauses));
Comments ?
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Thu Nov 18 20:59:19 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA00364
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 20:58:34 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id UAA00544;
Thu, 18 Nov 1999 20:57:50 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Peter Eisentraut <peter_e@gmx.net>, hackers@postgreSQL.org
Subject: Re: [HACKERS] psql & regress tests
In-reply-to: Your message of Thu, 18 Nov 1999 19:58:40 -0500 (EST)
<199911190058.TAA19713@candle.pha.pa.us>
Date: Thu, 18 Nov 1999 20:57:50 -0500
Message-ID: <542.942976670@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
It wouldn't be particularly "dangerous" if we assume that no one else is
accessing the regression database. What it *would* be is less useful at
catching problems. Standalone mode wouldn't test the cross-backend
interlocking code at all.
Any modifications to shared pg_ tables would be a problem. Also, pg_log
and pg_variable locking is not happening in there either, is it?
Good point --- it wouldn't be just that database, but the whole
installation (data directory) that would have to be unused. You really
wouldn't dare even have a postmaster running, at least not in the same
data directory. But that could be made safe by using a nonstandard
location for the data directory for regression.
However, this is all beside the main point: we want the regress tests
to run in an environment as close as possible to the way Postgres is
normally used. The more we hack up a special regress-test environment,
the less the tests reflect reality.
Aside from the cross-backend synchronization issue, I forgot to point
out a really obvious benefit: doing it the current way allows the regress
tests to help check the backend's frontend communication code, and
libpq, and psql itself. We'd need some other way of testing all that
code if we switched to a standalone-backend regression test set.
What I *would* like to see is more support for running regress tests on
a not-yet-installed build, so people can test a fresh build before they
blow away their working installation. This requires doing an initdb
into a temporary directory, starting a postmaster therein (using a
nonstandard port number), and running the tests there. This is doable
by hand, of course, but it's tedious and error-prone even for an expert;
I think it's out of the question for a novice installer. We ought to
offer a canned script to do it that way.
regards, tom lane
From bouncefilter Thu Nov 18 21:33:20 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id VAA04417
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 21:32:44 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11odj9-0003kGC; Fri, 19 Nov 99 03:24 MET
Message-Id: <m11odj9-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] psql & regress tests
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Fri, 19 Nov 1999 03:24:43 +0100 (MET)
Cc: pgman@candle.pha.pa.us, peter_e@gmx.net, hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <542.942976670@sss.pgh.pa.us> from "Tom Lane" at Nov 18,
99 08:57:50 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Any modifications to shared pg_ tables would be a problem. Also, pg_log
and pg_variable locking is not happening in there either, is it?Good point --- it wouldn't be just that database, but the whole
installation (data directory) that would have to be unused. You really
wouldn't dare even have a postmaster running, at least not in the same
data directory. But that could be made safe by using a nonstandard
location for the data directory for regression.However, this is all beside the main point: we want the regress tests
to run in an environment as close as possible to the way Postgres is
normally used. The more we hack up a special regress-test environment,
the less the tests reflect reality.
My new script actually does a
make POSTGRESDIR=somewhere_else install
PATH="somewhere_else/bin:$PATH"
Then it initializes a database below there and starts a
postmaster with the resulting data directory, listening on
port 65432.
So I think it's very close to a real live setup, while
another "production" running installation isn't affected at
all.
Aside from the cross-backend synchronization issue, I forgot to point
out a really obvious benefit: doing it the current way allows the regress
tests to help check the backend's frontend communication code, and
libpq, and psql itself. We'd need some other way of testing all that
code if we switched to a standalone-backend regression test set.What I *would* like to see is more support for running regress tests on
a not-yet-installed build, so people can test a fresh build before they
blow away their working installation. This requires doing an initdb
into a temporary directory, starting a postmaster therein (using a
nonstandard port number), and running the tests there. This is doable
by hand, of course, but it's tedious and error-prone even for an expert;
I think it's out of the question for a novice installer. We ought to
offer a canned script to do it that way.
Right, right, right - I'm on it.
The ugly detail, I'm currently running into, is that there
already seems to be a concurrency problem I discovered with
my testing. Occationally I get this into the postmaster log
for parallel executing tests:
ERROR: Bad boolean external representation 'XXX'
FATAL 1: SearchSysCache: recursive use of cache 10
FATAL 2: elog: error in postmaster or backend startup, giving up!
pq_flush: send() failed: Broken pipe
Server process (pid 9791) exited with status 512 at Fri Nov 19 03:17:09 1999
Terminating any active server processes...
It happens during the first parallel group of 11 tests. Not
allways, so it's timing critical. Outch.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Nov 18 22:04:20 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA08006
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 22:03:25 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA21649;
Thu, 18 Nov 1999 21:42:17 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190242.VAA21649@candle.pha.pa.us>
Subject: Re: [HACKERS] psql & regress tests
In-Reply-To: <m11odj9-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Nov 19, 1999 03:24:43 am"
To: Jan Wieck <wieck@debis.com>
Date: Thu, 18 Nov 1999 21:42:17 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, peter_e@gmx.net, hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
ERROR: Bad boolean external representation 'XXX'
FATAL 1: SearchSysCache: recursive use of cache 10
FATAL 2: elog: error in postmaster or backend startup, giving up!
pq_flush: send() failed: Broken pipe
Server process (pid 9791) exited with status 512 at Fri Nov 19 03:17:09 1999
Terminating any active server processes...It happens during the first parallel group of 11 tests. Not
allways, so it's timing critical. Outch.
Now that we know numeric is working, can we make the test run faster in
the default mode?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 22:26:20 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA10672
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 22:25:42 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA00716;
Thu, 18 Nov 1999 22:24:52 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] pg version date file
In-reply-to: Your message of Thu, 18 Nov 1999 19:22:48 -0500 (EST)
<199911190022.TAA19161@candle.pha.pa.us>
Date: Thu, 18 Nov 1999 22:24:52 -0500
Message-ID: <714.942981892@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Where is that file that makes an initdb required? We are supposed to
change that file when an initdb is needed.
src/include/catalog/catversion.h.
I put it there on the theory that include/catalog/*.h changes would
be the most common reason for wanting to bump the serial number.
But maybe it belongs somewhere else...
regards, tom lane
From bouncefilter Thu Nov 18 22:27:20 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA10725
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 22:26:54 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id WAA22622
for pgsql-hackers@postgreSQL.org; Thu, 18 Nov 1999 22:26:01 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190326.WAA22622@candle.pha.pa.us>
Subject: Primary key requires SERIAL
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Thu, 18 Nov 1999 22:26:01 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
We currently only allow the words PRIMARY KEY on a SERIAL column. Is
there a reason we don't allow PRIMARY KEY on an integer field? Seems it
should be allowed.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 22:29:20 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA10877
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 22:28:38 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA00739;
Thu, 18 Nov 1999 22:28:06 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] psql & regress tests
In-reply-to: Your message of Fri, 19 Nov 1999 00:49:51 +0100 (MET)
<m11obJH-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Thu, 18 Nov 1999 22:28:05 -0500
Message-ID: <737.942982085@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
I'm actually doing some tests if the 'make check' would be
possible. I.e. doing a complete install with POSTGRESDIR
below the regress dir, running initdb with the libdir and
datadir pointing into there too, then starting new postmaster
on a different port in background etc., etc., etc..
That would make it possible to do a complete check without
doing a regular install at all.
Sounds great! I was just griping elsewhere in this thread that we
needed that.
It's amusing how often we two have the same wishes or ideas.
Well, they're so obviously the Right Thing ;-)
regards, tom lane
From bouncefilter Thu Nov 18 22:34:20 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA11629
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 22:33:55 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA22967;
Thu, 18 Nov 1999 22:31:15 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190331.WAA22967@candle.pha.pa.us>
Subject: Re: [HACKERS] pg version date file
In-Reply-To: <714.942981892@sss.pgh.pa.us> from Tom Lane at "Nov 18,
1999 10:24:52 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 18 Nov 1999 22:31:15 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Where is that file that makes an initdb required? We are supposed to
change that file when an initdb is needed.src/include/catalog/catversion.h.
I put it there on the theory that include/catalog/*.h changes would
be the most common reason for wanting to bump the serial number.
But maybe it belongs somewhere else...
I just couldn't find it. I looked in include only because version.h.in
was there.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 22:44:20 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA13290
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 22:43:24 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id WAA23334
for pgsql-hackers@postgreSQL.org; Thu, 18 Nov 1999 22:43:15 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190343.WAA23334@candle.pha.pa.us>
Subject: 7.0 status request
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Thu, 18 Nov 1999 22:43:15 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Here are the major open issues for 7.0 that I remember:
Foreign Keys - Jan
WAL - Vadim
Function args - Tom
System indcxes - Bruce
Outer joins and new multi-query parse tree are questionable items for
7.0.
Is this currect?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 22:47:20 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA13736
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 22:46:20 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA00764;
Thu, 18 Nov 1999 22:45:15 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Getting OID in psql of recent insert
In-reply-to: Your message of Thu, 18 Nov 1999 20:12:18 -0500 (EST)
<199911190112.UAA20026@candle.pha.pa.us>
Date: Thu, 18 Nov 1999 22:45:14 -0500
Message-ID: <762.942983114@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
In writing the book, I see the serious limitation that there is no way
in psql to access the most recently inserted oid. Without it, there
seems to be no way to use the oid value as a foreign key in another
table.
Should I add a function to return the most recently assigned oid to the
backend, or is there a better way?
I'm not sure why, but a backend-side function seems like the wrong way
to approach it. I guess I'm worried that the state would be too
volatile on the backend side. (Example: if you use the hypothetical
lastoid() function in an SQL query that causes triggers or rules to
be invoked behind your back, those triggers/rules could do new inserts.
Will lastoid() still return the "right" value by the time it gets
executed?)
It'd certainly be easy enough for psql to save off the OID anytime it
gets an "INSERT nnn" command response. The missing link is to invent
a way for a psql script to access that value and insert it into
subsequent SQL commands.
If you want to attack this, I'd suggest thinking a little larger than
just the last-OID problem. I'd like to be able to save off both
insertion OIDs and values extracted by SELECTs into named variables
of some sort, and then insert those values into as many later commands
as I want. Right now there's no way to do any such thing in a psql
script; you have to move up a level of difficulty into ecpg or pgtcl
or even C code if your application needs this. Plain psql scripts
would become substantially more powerful if psql had a capability
like this.
OTOH: we shouldn't ask psql to do everything under the sun. I'd
certainly think that it'd be unreasonable to try to do conditional
evaluation or looping in psql scripts, for instance. Maybe the right
answer is to teach people a little bit about using honest-to-goodness
scripting languages when their applications reach this level of
complexity. How much daylight is there between needing script
variables and needing control flow, do you think?
regards, tom lane
PS: not relevant to your main point, but to your example: I think it's
a real bad idea to teach people to use OIDs as foreign keys. That'll
create all kinds of trouble when it comes time to dump/reload their
database. Better to tell them to use SERIAL columns as keys. Not so
incidentally, we have currval() already...
From bouncefilter Thu Nov 18 22:52:20 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA14489
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 22:51:56 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA00791;
Thu, 18 Nov 1999 22:51:20 -0500 (EST)
To: "Hiroshi Inoue" <Inoue@tpf.co.jp>
cc: "pgsql-hackers" <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Hash Join is very slooow in some cases
In-reply-to: Your message of Fri, 19 Nov 1999 10:14:56 +0900
<000201bf322b$7df2a620$2801007e@cadzone.tpf.co.jp>
Date: Thu, 18 Nov 1999 22:51:20 -0500
Message-ID: <789.942983480@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
select count(*) from a,b where a.id1=b.id1;
returns immeidaitely ...
But
select count(*) from a,b where a.id1=b.id1 and a.id2=b.id2;
takes very looong time.
I examined an output by EXPLAIN VERBOSE and found that
the 1st query uses id1 as its hashkey and 2nd query uses id2
as its hashkey.
Yes, and since id2 has terrible disbursion, most of the hashtable
entries end up in a small number of hash buckets, resulting in
an unexpectedly large number of comparisons done for each outer
tuple. I've seen this effect before.
I have a TODO item to make the optimizer pay attention to disbursion
when estimating the cost of a hashjoin. That would cause it to make
the right choice of key in this example. Not done yet though :-(.
Feel free to jump in if you need it today...
regards, tom lane
From bouncefilter Thu Nov 18 23:08:21 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA17209
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 23:08:04 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA00842;
Thu, 18 Nov 1999 23:06:58 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] pg version date file
In-reply-to: Your message of Thu, 18 Nov 1999 22:31:15 -0500 (EST)
<199911190331.WAA22967@candle.pha.pa.us>
Date: Thu, 18 Nov 1999 23:06:58 -0500
Message-ID: <840.942984418@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
src/include/catalog/catversion.h.
I put it there on the theory that include/catalog/*.h changes would
be the most common reason for wanting to bump the serial number.
But maybe it belongs somewhere else...
I just couldn't find it. I looked in include only because version.h.in
was there.
You could certainly make a case for moving it to src/include. If
you want to do that, I won't object.
regards, tom lane
From bouncefilter Thu Nov 18 23:16:21 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA18504
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 23:15:38 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA00900;
Thu, 18 Nov 1999 23:14:35 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Primary key requires SERIAL
In-reply-to: Your message of Thu, 18 Nov 1999 22:26:01 -0500 (EST)
<199911190326.WAA22622@candle.pha.pa.us>
Date: Thu, 18 Nov 1999 23:14:35 -0500
Message-ID: <898.942984875@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We currently only allow the words PRIMARY KEY on a SERIAL column.
Say what? There are ColConstraintElem and ConstraintElem productions
for PRIMARY KEY ... are they broken?
regards, tom lane
From bouncefilter Thu Nov 18 23:17:21 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA18610
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 23:16:27 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA24427;
Thu, 18 Nov 1999 23:16:13 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190416.XAA24427@candle.pha.pa.us>
Subject: Re: [HACKERS] Getting OID in psql of recent insert
In-Reply-To: <762.942983114@sss.pgh.pa.us> from Tom Lane at "Nov 18,
1999 10:45:14 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 18 Nov 1999 23:16:13 -0500 (EST)
CC: "PostgreSQL-development"@candle.pha.pa.us, pgsql-hackers@postgreSQL.org,
peter_e@gmx.net
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
If you want to attack this, I'd suggest thinking a little larger than
just the last-OID problem. I'd like to be able to save off both
insertion OIDs and values extracted by SELECTs into named variables
of some sort, and then insert those values into as many later commands
as I want. Right now there's no way to do any such thing in a psql
script; you have to move up a level of difficulty into ecpg or pgtcl
or even C code if your application needs this. Plain psql scripts
would become substantially more powerful if psql had a capability
like this.
Yes, I understand. The new psql has the ability to have variables, so
this seems like a natural use for this:
testdb=> \set foo bar
Maybe we could have:
testdb=> \set foo lastoid
testdb=> \echo "foo is now ${foo}."
Seems those variables are not available in queries, though.
OTOH: we shouldn't ask psql to do everything under the sun. I'd
certainly think that it'd be unreasonable to try to do conditional
evaluation or looping in psql scripts, for instance. Maybe the right
answer is to teach people a little bit about using honest-to-goodness
scripting languages when their applications reach this level of
complexity. How much daylight is there between needing script
variables and needing control flow, do you think?
I think I agree, but a powerful psql interface is very important for any
database.
PS: not relevant to your main point, but to your example: I think it's
a real bad idea to teach people to use OIDs as foreign keys. That'll
create all kinds of trouble when it comes time to dump/reload their
database. Better to tell them to use SERIAL columns as keys. Not so
incidentally, we have currval() already...
OK, I am dealing with this in the book. What are oids good for then?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 23:17:21 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA18625
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 23:16:43 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA24436;
Thu, 18 Nov 1999 23:16:30 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190416.XAA24436@candle.pha.pa.us>
Subject: Re: [HACKERS] pg version date file
In-Reply-To: <840.942984418@sss.pgh.pa.us> from Tom Lane at "Nov 18,
1999 11:06:58 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 18 Nov 1999 23:16:30 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
src/include/catalog/catversion.h.
I put it there on the theory that include/catalog/*.h changes would
be the most common reason for wanting to bump the serial number.
But maybe it belongs somewhere else...I just couldn't find it. I looked in include only because version.h.in
was there.You could certainly make a case for moving it to src/include. If
you want to do that, I won't object.
No, seems fine there.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 23:20:22 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA18948
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 23:19:36 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA24590;
Thu, 18 Nov 1999 23:19:23 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190419.XAA24590@candle.pha.pa.us>
Subject: Re: [HACKERS] Primary key requires SERIAL
In-Reply-To: <898.942984875@sss.pgh.pa.us> from Tom Lane at "Nov 18,
1999 11:14:35 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 18 Nov 1999 23:19:23 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We currently only allow the words PRIMARY KEY on a SERIAL column.
Say what? There are ColConstraintElem and ConstraintElem productions
for PRIMARY KEY ... are they broken?regards, tom lane
Oh, I see it now. The grammer seems to only support it in SERIAL, but I
see it works now. I guess i am surprised SERIAL PRIMARY creates the
index and sequence, while INTEGER PRIMARY only creates the index.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 23:35:22 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id XAA22006
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 23:35:13 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11ofdb-0003kGC; Fri, 19 Nov 99 05:27 MET
Message-Id: <m11ofdb-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] psql & regress tests
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Fri, 19 Nov 1999 05:27:07 +0100 (MET)
Cc: wieck@debis.com, tgl@sss.pgh.pa.us, peter_e@gmx.net,
hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199911190242.VAA21649@candle.pha.pa.us> from "Bruce Momjian" at
Nov 18, 99 09:42:17 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
ERROR: Bad boolean external representation 'XXX'
FATAL 1: SearchSysCache: recursive use of cache 10
FATAL 2: elog: error in postmaster or backend startup, giving up!
pq_flush: send() failed: Broken pipe
Server process (pid 9791) exited with status 512 at Fri Nov 19 03:17:09 1999
Terminating any active server processes...It happens during the first parallel group of 11 tests. Not
allways, so it's timing critical. Outch.
Hmmm,
the first FATAL is emitted from catcache.c in line 988. I
think that the cache->busy lives in shared memory and isn't
protected against concurrent usage, as it should be. Cache
#10 is RELNAME. That really makes sense, because most of the
tests I'm running parallel now issue CREATE TABLE commands
first.
Now that we know numeric is working, can we make the test run faster in
the default mode?
It is already down to 100 digits after the decimal point. I
don't want to lower it too much, but maybe 30 or 50 are
enough too - no?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Nov 18 23:47:22 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA23596
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 23:46:32 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id UAA14632;
Thu, 18 Nov 1999 20:46:05 -0800 (PST)
Message-Id: <3.0.1.32.19991118203420.00f1a9a0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 18 Nov 1999 20:34:20 -0800
To: Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Primary key requires SERIAL
In-Reply-To: <199911190326.WAA22622@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 10:26 PM 11/18/99 -0500, Bruce Momjian wrote:
We currently only allow the words PRIMARY KEY on a SERIAL column. Is
there a reason we don't allow PRIMARY KEY on an integer field? Seems it
should be allowed.
Presumably the only reason to disallow this is to make life difficult
for those of us who want to port Oracle-based applications.
Given that Oracle represents a huge slice of the established market,
and given that in the past Postgres has been an "Oracle-friendly" db in
terms of dialectical support (nextval and currval on sequences being
germane to the subject at hand) one can only presume that the Postgres
development group wants to make porting of Oracle-ish systems difficult.
Why?
"Currently" must mean the 7.0-in-work because 6.5.1 supports primary
key on integer just fine.
Why support "serial" and not support "primary key on integer" when
Oracle rules the roost, not Sybase?
If your statement's true, this is a horrible shift in direction for
the PostgreSQL project.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Nov 18 23:37:22 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA22174
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 23:37:17 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA25069;
Thu, 18 Nov 1999 23:36:58 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190436.XAA25069@candle.pha.pa.us>
Subject: Re: [HACKERS] psql & regress tests
In-Reply-To: <m11ofdb-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Nov 19, 1999 05:27:07 am"
To: Jan Wieck <wieck@debis.com>
Date: Thu, 18 Nov 1999 23:36:58 -0500 (EST)
CC: tgl@sss.pgh.pa.us, peter_e@gmx.net, hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Now that we know numeric is working, can we make the test run faster in
the default mode?It is already down to 100 digits after the decimal point. I
don't want to lower it too much, but maybe 30 or 50 are
enough too - no?
It is just taking longer than most other tests. Seems 30 would be fine.
They can always run the bigtest.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Nov 18 23:47:22 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA23591
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 23:46:31 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id UAA14646;
Thu, 18 Nov 1999 20:46:07 -0800 (PST)
Message-Id: <3.0.1.32.19991118204353.00f1e7a0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 18 Nov 1999 20:43:53 -0800
To: Bruce Momjian <pgman@candle.pha.pa.us>, Tom Lane <tgl@sss.pgh.pa.us>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Primary key requires SERIAL
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
In-Reply-To: <199911190419.XAA24590@candle.pha.pa.us>
References: <898.942984875@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 11:19 PM 11/18/99 -0500, Bruce Momjian wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We currently only allow the words PRIMARY KEY on a SERIAL column.
Say what? There are ColConstraintElem and ConstraintElem productions
for PRIMARY KEY ... are they broken?regards, tom lane
Oh, I see it now. The grammer seems to only support it in SERIAL, but I
see it works now. I guess i am surprised SERIAL PRIMARY creates the
index and sequence, while INTEGER PRIMARY only creates the index.
Oops, I guess I blew it by responding to a post by Bruce assuming he
was right.
Postgres supports a quasi-serial type by creating an index and
sequence (while Sybase supports it more transparently)
Postgres REALLY supports sequences much like Oracle (and others?
I don't know, my DB knowledge is very sketchy). In Oracle, if
you define a primary key of type integer and want to sequence
it, you define a sequence and use "sequence_name.nextval" and
"sequence_name.currval". This is very much like "nextval" and
"currval" in Postgres, and I presume no accident.
And in Oracle you create the sequence by hand - just like you do
in Postgres.
Personally, I think maintaining an "Oracle-ish" framework is wise,
for the simple selfish reason that I'm interested in porting
Oracle-dependent SQL to Postgres.
If being "Oracle-ish" is still a goal (it was once a goal of at
least some of the implementors, it's obvious) then generating
the sequence just makes porting more difficult.
Actually, I think the inclusion of "serial" as a more integrated
type and leaving primary key stuff alone for existing types is
what makes sense. You could provide a higher level of Sybase
portability without messing up us Oracle-derived folk.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Nov 18 23:49:22 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA23794
for <hackers@postgreSQL.org>; Thu, 18 Nov 1999 23:48:33 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA01016;
Thu, 18 Nov 1999 23:48:00 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] psql & regress tests
In-reply-to: Your message of Fri, 19 Nov 1999 03:24:43 +0100 (MET)
<m11odj9-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Thu, 18 Nov 1999 23:48:00 -0500
Message-ID: <1014.942986880@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
The ugly detail, I'm currently running into, is that there
already seems to be a concurrency problem I discovered with
my testing. Occationally I get this into the postmaster log
for parallel executing tests:
ERROR: Bad boolean external representation 'XXX'
FATAL 1: SearchSysCache: recursive use of cache 10
FATAL 2: elog: error in postmaster or backend startup, giving up!
pq_flush: send() failed: Broken pipe
Server process (pid 9791) exited with status 512 at Fri Nov 19 03:17:09 1999
Terminating any active server processes...
It happens during the first parallel group of 11 tests. Not
allways, so it's timing critical. Outch.
In other words, you've already exposed a bug! Right on!
Commit the thing, so more eyes can look for the problem. I expect
you have found a pre-existing backend bug, not a problem in your
new regress test scaffold.
regards, tom lane
From bouncefilter Fri Nov 19 00:16:30 1999
Received: from trends.net (clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA30890
for <pgsql-hackers@postgreSQL.org>;
Fri, 19 Nov 1999 00:15:52 -0500 (EST) (envelope-from aaron@gtv.ca)
Received: from genisys.gtv.ca (h-207-228-97-106.gen.cadvision.com
[207.228.97.106]) by trends.net (8.8.8/8.8.8) with ESMTP id AAA25328
for <pgsql-hackers@postgreSQL.org>;
Fri, 19 Nov 1999 00:01:16 -0500 (EST)
Received: from stilborne (24.67.89.147.ab.wave.home.com [24.67.89.147])
by genisys.gtv.ca (8.9.3/8.8.7) with SMTP id WAA00401
for <pgsql-hackers@postgreSQL.org>; Thu, 18 Nov 1999 22:01:20 -0700
From: "Aaron J. Seigo" <aaron@gtv.ca>
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Getting OID in psql of recent insert
Date: Thu, 18 Nov 1999 21:48:54 -0700
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <199911190416.XAA24427@candle.pha.pa.us>
In-Reply-To: <199911190416.XAA24427@candle.pha.pa.us>
MIME-Version: 1.0
Message-Id: <99111821550700.01629@stilborne>
Content-Transfer-Encoding: 8bit
On Thu, 18 Nov 1999, Bruce Momjian wrote:
If you want to attack this, I'd suggest thinking a little larger than
just the last-OID problem. I'd like to be able to save off both
insertion OIDs and values extracted by SELECTs into named variables
of some sort, and then insert those values into as many later commands
as I want. Right now there's no way to do any such thing in a psql
script; you have to move up a level of difficulty into ecpg or pgtcl
or even C code if your application needs this. Plain psql scripts
would become substantially more powerful if psql had a capability
like this.
we talked about this a few weeks ago as users... even those of us using C or
higher level scripting languages agreed it would be nice to be able to have
arbitrary values that are the result of an insert/update/delete able to be
returned, without a subsequent select. if this made it into postgres, i think
you'd have many happy users =)
OK, I am dealing with this in the book. What are oids good for then?
i can tell you what i use them for as someone who works with postgres daily...
i'm not sure if this was what they were intended for.. but =)
once inserted, a row keeps its oid. so, when performing complex selects, i'll
often grab the oid too... do some tests on the returned values, and if an action
is appropriate on that row, i reference it by its oid. the only chance of this
failing is if the database is dumped then restored between the select and the
update (not gonna happen, as the program requires the database available for
execution)... using the oid this way, its often simpler and faster to update a
known row, especially when the initial select involved many fields.
--
Aaron J. Seigo
Sys Admin
From bouncefilter Thu Nov 18 23:59:22 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA25357
for <pgsql-hackers@postgreSQL.org>;
Thu, 18 Nov 1999 23:58:50 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA25578;
Thu, 18 Nov 1999 23:58:19 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199911190458.XAA25578@candle.pha.pa.us>
Subject: Re: [HACKERS] Primary key requires SERIAL
In-Reply-To: <3.0.1.32.19991118204353.00f1e7a0@mail.pacifier.com> from Don
Baccus at "Nov 18, 1999 08:43:53 pm"
To: Don Baccus <dhogaza@pacifier.com>
Date: Thu, 18 Nov 1999 23:58:19 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
At 11:19 PM 11/18/99 -0500, Bruce Momjian wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We currently only allow the words PRIMARY KEY on a SERIAL column.
Say what? There are ColConstraintElem and ConstraintElem productions
for PRIMARY KEY ... are they broken?regards, tom lane
Oh, I see it now. The grammer seems to only support it in SERIAL, but I
see it works now. I guess i am surprised SERIAL PRIMARY creates the
index and sequence, while INTEGER PRIMARY only creates the index.Oops, I guess I blew it by responding to a post by Bruce assuming he
was right.
Seems I can't realy on understanding what we support by just looking at
gram.y.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Nov 19 00:41:25 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA34123
for <pgsql-hackers@postgreSQL.org>;
Fri, 19 Nov 1999 00:41:12 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id AAA01197;
Fri, 19 Nov 1999 00:40:02 -0500 (EST)
To: "Aaron J. Seigo" <aaron@gtv.ca>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Getting OID in psql of recent insert
In-reply-to: Your message of Thu, 18 Nov 1999 21:48:54 -0700
<99111821550700.01629@stilborne>
Date: Fri, 19 Nov 1999 00:40:02 -0500
Message-ID: <1195.942990002@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Aaron J. Seigo" <aaron@gtv.ca> writes:
On Thu, 18 Nov 1999, Bruce Momjian wrote:
OK, I am dealing with this in the book. What are oids good for then?
once inserted, a row keeps its oid. so, when performing complex
selects, i'll often grab the oid too... do some tests on the returned
values, and if an action is appropriate on that row, i reference it by
its oid. the only chance of this failing is if the database is dumped
then restored between the select and the update (not gonna happen, as
the program requires the database available for execution)... using
the oid this way, its often simpler and faster to update a known row,
especially when the initial select involved many fields.
Yes, I use 'em the same way. I think an OID is kind of like a pointer
in a C program: good for fast, unique access to an object within the
context of the execution of a particular application (and maybe not
even that long). You don't write pointers into files to be used again
by other programs, though, and in the same way an OID isn't a good
candidate for a long-lasting reference from one table to another.
regards, tom lane
From bouncefilter Fri Nov 19 00:51:25 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA35290
for <hackers@postgreSQL.org>; Fri, 19 Nov 1999 00:51:18 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id AAA01264;
Fri, 19 Nov 1999 00:50:32 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgman@candle.pha.pa.us (Bruce Momjian), peter_e@gmx.net,
hackers@postgreSQL.org
Subject: Re: [HACKERS] psql & regress tests
In-reply-to: Your message of Fri, 19 Nov 1999 05:27:07 +0100 (MET)
<m11ofdb-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Fri, 19 Nov 1999 00:50:32 -0500
Message-ID: <1262.942990632@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Bruce Momjian wrote:
Now that we know numeric is working, can we make the test run faster in
the default mode?
It is already down to 100 digits after the decimal point. I
don't want to lower it too much, but maybe 30 or 50 are
enough too - no?
Since multiply and so on are presumably O(N^2), cutting the precision
to 30 might cut the runtime by almost a factor of 10.
Jan probably has a better idea than the rest of us whether a test of
100, or 30, or 10 digits is likely to expose bugs that would not be
exposed by a test with less precision --- that depends on whether the
code has any internal behavioral dependence on the length of numeric
values. The numeric test certainly is a lot slower than the others, so
I think it would be a good idea to trim the precision as much as we can.
Anyone who's actually touching the numeric code could and should run
the "bigtest", but the rest of us just want to know whether we've got
porting problems. Seems like it shouldn't take 100-digit tests to
expose porting problems.
regards, tom lane
From bouncefilter Fri Nov 19 01:34:26 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA39532
for <pgsql-hackers@postgreSQL.org>;
Fri, 19 Nov 1999 01:33:50 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id GAA21831;
Fri, 19 Nov 1999 06:32:14 GMT
Sender: lockhart@hub.org
Message-ID: <3834EEEE.DEE4EBD1@alumni.caltech.edu>
Date: Fri, 19 Nov 1999 06:32:14 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: Don Baccus <dhogaza@pacifier.com>, Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Primary key requires SERIAL
References: <199911190458.XAA25578@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
We currently only allow the words PRIMARY KEY on a SERIAL column.
Oops, I guess I blew it by responding to a post by Bruce assuming he
was right.Seems I can't realy on understanding what we support by just looking at
gram.y.
You can, if you read carefully :)
The grammar allows *only* PRIMARY KEY on the SERIAL column
declaration, since the other keywords or clauses are either redundant
or nonsensical in the context of a serial column. As others have
pointed out, PRIMARY KEY is also allowed elsewhere.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Nov 19 01:41:26 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA40447
for <pgsql-hackers@postgreSQL.org>;
Fri, 19 Nov 1999 01:40:54 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id GAA21841;
Fri, 19 Nov 1999 06:35:59 GMT
Sender: lockhart@hub.org
Message-ID: <3834EFCF.48875CF1@alumni.caltech.edu>
Date: Fri, 19 Nov 1999 06:35:59 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 7.0 status request
References: <199911190343.WAA23334@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Here are the major open issues for 7.0 that I remember:
Foreign Keys - Jan
WAL - Vadim
Function args - Tom
System indcxes - Bruce
Outer joins and new multi-query parse tree are questionable items for
7.0.
You might include "join syntax", which will be ready even if outer
joins are not.
Also, didn't some folks express concern that indices on system tables
would make the backend more fragile? Did we resolve that issue?
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Nov 19 01:50:26 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA41260
for <pgsql-hackers@postgreSQL.org>;
Fri, 19 Nov 1999 01:49:32 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA01504;
Fri, 19 Nov 1999 01:48:03 -0500 (EST)
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Bruce Momjian <pgman@candle.pha.pa.us>, Don Baccus <dhogaza@pacifier.com>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Primary key requires SERIAL
In-reply-to: Your message of Fri, 19 Nov 1999 06:32:14 +0000
<3834EEEE.DEE4EBD1@alumni.caltech.edu>
Date: Fri, 19 Nov 1999 01:48:03 -0500
Message-ID: <1502.942994083@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
The grammar allows *only* PRIMARY KEY on the SERIAL column
declaration, since the other keywords or clauses are either redundant
or nonsensical in the context of a serial column.
Just to put another item on your todo list ;-) ...
I think it's poor practice to try to enforce such a restriction via
the grammar, because that way you cannot generate an error more
specific than "parse error near FOO". It'd be better to allow the
same ColQualifier for SERIAL as for any other column type, and then to
put sanity checks in analyze.c that would complain about conflicting
specifications. We have, or should have, most of those checks in
place already to catch conflicting ColQualifier entries for a plain
column type (eg, "foo int4 NULL NOT NULL"). Also, I do not like
generating hard errors for specifications that are merely redundant
("foo SERIAL NOT NULL"); is there any basis in the SQL spec for
refusing such constructs?
regards, tom lane
From bouncefilter Fri Nov 19 02:04:27 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA43004
for <pgsql-hackers@postgreSQL.org>;
Fri, 19 Nov 1999 02:03:49 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id CAA01553;
Fri, 19 Nov 1999 02:02:45 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 7.0 status request
In-reply-to: Your message of Thu, 18 Nov 1999 22:43:15 -0500 (EST)
<199911190343.WAA23334@candle.pha.pa.us>
Date: Fri, 19 Nov 1999 02:02:45 -0500
Message-ID: <1551.942994965@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Here are the major open issues for 7.0 that I remember:
Foreign Keys - Jan
WAL - Vadim
Function args - Tom
System indcxes - Bruce
Outer joins and new multi-query parse tree are questionable items for
7.0.
I have a bunch of optimizer tweaking that I'd like to finish before 7.0,
but perhaps that doesn't qualify as a major open issue. There's no
single item there that I would rank as "must fix or don't ship"; yet
I feel we need to make some progress in that area.
I think there are also a lot of unresolved questions about interlocking
and updating of the catalog caches and relcache. These might be
must-fix items. IIRC, Hiroshi is pretty concerned about that area...
regards, tom lane
Import Notes
Reply to msg id not found: tglsmessageofThu11Nov1999115759-0500.15334.942339479@sss.pgh.pa.us | Resolved by subject fallback
Frank Cusack wrote:
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique indexYes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):
I see a more serious problem in the current source tree:
test=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
test=> insert into test (zone, net) values (1, '1.2.3/24');
ERROR: fmgr_info: function 0: cache lookup failed
Seems something is broken with CIDR, but not INET:
test=> create table test2 (x inet unique(x));
ERROR: parser: parse error at or near "("
test=> create table test2 (x inet, unique(x));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test2_x_key' for table 'test2'
CREATE
test=> insert into test2 values ('1.2.3.4/24');
INSERT 19180 1
test=> create table test3 (x cidr, unique(x));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test3_x_key' for table 'test3'
CREATE
test=> insert into test3 values ('1.2.3.4/24');
ERROR: fmgr_info: function 0: cache lookup failed
The problem appears to be in _bt_mkscankey() and index_getprocid().
Any ideas?
Backtrace shows:
---------------------------------------------------------------------------
#0 elog (lev=-1, fmt=0x817848e "fmgr_info: function %u: cache lookup failed")
at elog.c:94
#1 0x8135a47 in fmgr_info (procedureId=0, finfo=0x830a060) at fmgr.c:225
#2 0x80643f9 in ScanKeyEntryInitialize (entry=0x830a058, flags=0,
attributeNumber=2, procedure=0, argument=137404148) at scankey.c:65
#3 0x8083e70 in _bt_mkscankey (rel=0x8312230, itup=0x8309ee8) at nbtutils.c:56
#4 0x8079989 in _bt_doinsert (rel=0x8312230, btitem=0x8309ee8,
index_is_unique=1 '\001', heapRel=0x82dfd38) at nbtinsert.c:52
#5 0x807eabe in btinsert (rel=0x8312230, datum=0x8309b28,
nulls=0x830a020 " ", ht_ctid=0x8309e2c, heapRel=0x82dfd38) at nbtree.c:358
#6 0x81358d8 in fmgr_c (finfo=0x80476e8, values=0x80476f8,
isNull=0x80476df "") at fmgr.c:146
#7 0x8135c25 in fmgr (procedureId=331) at fmgr.c:336
#8 0x8073c6d in index_insert (relation=0x8312230, datum=0x8309b28,
nulls=0x830a020 " ", heap_t_ctid=0x8309e2c, heapRel=0x82dfd38)
at indexam.c:211
#9 0x80ae3d9 in ExecInsertIndexTuples (slot=0x8309bf8, tupleid=0x8309e2c,
estate=0x8309950, is_update=0) at execUtils.c:1206
#10 0x80aa77e in ExecAppend (slot=0x8309bf8, tupleid=0x0, estate=0x8309950)
at execMain.c:1178
#11 0x80aa60e in ExecutePlan (estate=0x8309950, plan=0x83098b0,
operation=CMD_INSERT, offsetTuples=0, numberTuples=0,
direction=ForwardScanDirection, destfunc=0x817cdc4) at execMain.c:1024
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Never mind. Fixed. I had forgotten to add a line to pg_amproc.h. So
obvious, hard to imagine how I could have missed it... :-)
Frank Cusack wrote:
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique indexYes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):I see a more serious problem in the current source tree:
test=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
test=> insert into test (zone, net) values (1, '1.2.3/24');
ERROR: fmgr_info: function 0: cache lookup failedSeems something is broken with CIDR, but not INET:
test=> create table test2 (x inet unique(x));
ERROR: parser: parse error at or near "("
test=> create table test2 (x inet, unique(x));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test2_x_key' for table 'test2'
CREATE
test=> insert into test2 values ('1.2.3.4/24');
INSERT 19180 1
test=> create table test3 (x cidr, unique(x));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test3_x_key' for table 'test3'
CREATE
test=> insert into test3 values ('1.2.3.4/24');
ERROR: fmgr_info: function 0: cache lookup failedThe problem appears to be in _bt_mkscankey() and index_getprocid().
Any ideas?
Backtrace shows:
---------------------------------------------------------------------------
#0 elog (lev=-1, fmt=0x817848e "fmgr_info: function %u: cache lookup failed")
at elog.c:94
#1 0x8135a47 in fmgr_info (procedureId=0, finfo=0x830a060) at fmgr.c:225
#2 0x80643f9 in ScanKeyEntryInitialize (entry=0x830a058, flags=0,
attributeNumber=2, procedure=0, argument=137404148) at scankey.c:65
#3 0x8083e70 in _bt_mkscankey (rel=0x8312230, itup=0x8309ee8) at nbtutils.c:56
#4 0x8079989 in _bt_doinsert (rel=0x8312230, btitem=0x8309ee8,
index_is_unique=1 '\001', heapRel=0x82dfd38) at nbtinsert.c:52
#5 0x807eabe in btinsert (rel=0x8312230, datum=0x8309b28,
nulls=0x830a020 " ", ht_ctid=0x8309e2c, heapRel=0x82dfd38) at nbtree.c:358
#6 0x81358d8 in fmgr_c (finfo=0x80476e8, values=0x80476f8,
isNull=0x80476df "") at fmgr.c:146
#7 0x8135c25 in fmgr (procedureId=331) at fmgr.c:336
#8 0x8073c6d in index_insert (relation=0x8312230, datum=0x8309b28,
nulls=0x830a020 " ", heap_t_ctid=0x8309e2c, heapRel=0x82dfd38)
at indexam.c:211
#9 0x80ae3d9 in ExecInsertIndexTuples (slot=0x8309bf8, tupleid=0x8309e2c,
estate=0x8309950, is_update=0) at execUtils.c:1206
#10 0x80aa77e in ExecAppend (slot=0x8309bf8, tupleid=0x0, estate=0x8309950)
at execMain.c:1178
#11 0x80aa60e in ExecutePlan (estate=0x8309950, plan=0x83098b0,
operation=CMD_INSERT, offsetTuples=0, numberTuples=0,
direction=ForwardScanDirection, destfunc=0x817cdc4) at execMain.c:1024-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Import Notes
Reply to msg id not found: FromenvpgmanatDec81999055753am | Resolved by subject fallback
Can someone comment on this? Can someone submit a patch? I remember
something about not clearing bits somewhere.
I can't reproduce the problem on BSD/OS.
Frank Cusack wrote:
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique indexYes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):ais=> create table test (zone int4, net int4, unique(zone, net));
^^^^
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
ais=> insert into test (zone, net) values (1, 1);
INSERT 7712479 1
ais=> insert into test (zone, net) values (1, 2);
INSERT 7712480 1
ais=> insert into test (zone, net) values (1, 1);
ERROR: Cannot insert a duplicate key into a unique indexVadim
************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 8 08:32:19 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id IAA65306
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 08:31:23 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Svan.DoCS.UU.SE (e99re41@Svan.DoCS.UU.SE [130.238.9.160]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id OAA12003;
Wed, 8 Dec 1999 14:31:20 +0100
Received: from localhost (e99re41@localhost) by Svan.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id OAA00920; Wed, 8 Dec 1999 14:31:19 +0100
X-Authentication-Warning: Svan.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Wed, 8 Dec 1999 14:31:19 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Tatsuo Ishii <t-ishii@sra.co.jp>
cc: tgl@sss.pgh.pa.us, hackers@postgreSQL.org
Subject: Re: [HACKERS] Multibyte in autoconf
In-Reply-To: <19991208162304M.t-ishii@sra.co.jp>
Message-ID: <Pine.GSO.4.02A.9912081420360.28981-100000@Svan.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 8 Dec 1999, Tatsuo Ishii wrote:
If no --pgencoding, you get default (non-multibyte) coding even
if you compiled with --enable-mb.Not agreed. I think it would be better to give an error if no default
encoding is not sepecified if configured with --enable-mb. Reasons:1) Users tend to use only one encoding rather than switching multiple
encoding database. Thus major encoding for the user should be properly
set as the default.
Users also initdb only once, and that is the time to *choose* what they
want. Then and only then. Once they're done with that they'll never have
to worry about it again.
2) if non-multibyte coding such as SQL_ASCII is accidently set as the
default, and if a multi-byte user create a database with no encoding
arugument, the result would be a disaster.
Huh, so if I compile my database with multibyte and then I then I choose
to not have a default encoding in template1 but maybe I want to have the
multibyte option available for some other database later on, that will be
a disaster? Not so good.
What I'm also thinking of is the the package maintainer. They should be
able to provide a "neutral" yet multibyte (and locale, and cyrillic)
enabled package, and one should be able to use that even if one doesn't
want to use the multibyte features right now or at all.
Also, it should not be initdb's job to verify that the encodings are
correct, supported, etc. The backend should find that out itself. That
eliminates duplication of the same logic, which the backend can do better
anyway.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Wed Dec 8 09:01:19 1999
Received: from smtp1.andrew.cmu.edu (SMTP1.ANDREW.CMU.EDU [128.2.10.81])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA68730
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 09:00:34 -0500 (EST)
(envelope-from geek+@cmu.edu)
Received: from export.andrew.cmu.edu (EXPORT.ANDREW.CMU.EDU [128.2.23.2])
by smtp1.andrew.cmu.edu (8.9.3/8.9.3) with SMTP id JAA05151
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 09:00:23 -0500 (EST)
Date: 8 Dec 1999 09:00:23 -0500
Message-ID: <emacs-smtp-20280-14414-25719-223163@export.andrew.cmu.edu>
From: Brian E Gallew <geek+@cmu.edu>
X-Mailer: BatIMail version 3.2
To: hackers@postgreSQL.org
In-reply-to: <25765.944634473@sss.pgh.pa.us>
Subject: Re: [HACKERS] Table aliases in delete statements?
References: <25765.944634473@sss.pgh.pa.us>
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: multipart/signed; protocol="application/pgp-signature";
boundary="pgp-sign-Multipart_Wed_Dec__8_09:00:22_1999-1"; micalg=pgp-md5
Content-Transfer-Encoding: 7bit
--pgp-sign-Multipart_Wed_Dec__8_09:00:22_1999-1
Content-Type: text/plain; charset=US-ASCII
Then <tgl@sss.pgh.pa.us> spoke up and said:
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Is there any reason for not allowing table aliases in
delete statements?As Bruce points out in another followup, there's no real need for
an alias for the target table; if you have sub-selects that need
independent references to the target, you can always alias *them*.
The same goes for INSERT and UPDATE, which also take unadorned
<table name> as the target table specification.
Unless your query is going to be long enough to run into query length
limits, aliases are not your friends. Standard SQL they may be, but
aliases always end up obscuring queries to those who come along after
you.
--
=====================================================================
| JAVA must have been developed in the wilds of West Virginia. |
| After all, why else would it support only single inheritance?? |
=====================================================================
| Finger geek@cmu.edu for my public key. |
=====================================================================
--pgp-sign-Multipart_Wed_Dec__8_09:00:22_1999-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP MESSAGE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.3, an Emacs/PGP interface
iQBVAwUBOE5kdodzVnzma+gdAQER3QIAra5RU7YAmzGbXdwnza6gN+hOixwzzJlE
5pLU6pIRbkTC3JXRHZq4sc5eL8TpqtMzCdj63jyl/anxZRSImHEX9Q==
=5TOm
-----END PGP MESSAGE-----
--pgp-sign-Multipart_Wed_Dec__8_09:00:22_1999-1--
From bouncefilter Wed Dec 8 09:32:20 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA71969
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 09:32:01 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id XAA05216;
Wed, 8 Dec 1999 23:31:56 +0900 (JST)
Received: from localhost (IDENT:t-ishii@portsv3-3 [133.137.84.3])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id XAA03828;
Wed, 8 Dec 1999 23:31:52 +0900
To: peter_e@gmx.net, e99re41@DoCS.UU.SE
Cc: t-ishii@sra.co.jp, tgl@sss.pgh.pa.us, hackers@postgreSQL.org
Subject: Re: [HACKERS] Multibyte in autoconf
In-Reply-To: <Pine.GSO.4.02A.9912081420360.28981-100000@Svan.DoCS.UU.SE>
References: <19991208162304M.t-ishii@sra.co.jp>
<Pine.GSO.4.02A.9912081420360.28981-100000@Svan.DoCS.UU.SE>
X-Mailer: Mew version 1.94 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991208233152I.t-ishii@sra.co.jp>
Date: Wed, 08 Dec 1999 23:31:52 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 990905(IM130)
Lines: 68
If no --pgencoding, you get default (non-multibyte) coding even
if you compiled with --enable-mb.Not agreed. I think it would be better to give an error if no default
encoding is not sepecified if configured with --enable-mb. Reasons:1) Users tend to use only one encoding rather than switching multiple
encoding database. Thus major encoding for the user should be properly
set as the default.Users also initdb only once, and that is the time to *choose* what they
want. Then and only then. Once they're done with that they'll never have
to worry about it again.2) if non-multibyte coding such as SQL_ASCII is accidently set as the
default, and if a multi-byte user create a database with no encoding
arugument, the result would be a disaster.Huh, so if I compile my database with multibyte and then I then I choose
to not have a default encoding in template1 but maybe I want to have the
multibyte option available for some other database later on, that will be
a disaster? Not so good.
First of all, it's not possible not to have a default encoding in
template1. Probably you mean you choose SQL_ASCII (encoding no. is 0)
as the defaut encoding. Anyway, I'm going to give an example scenario
of the disaster.
1) initdb with no encoding augument (suppose that SQL_ASCII is set as
the default encoding in template1)
2) a user creates a database with no encoding augument. he thought
that the default encoding is EUC_JP.
3) he makes a table then fills it with some Japanese data.
4) later he pulls data from the table and found that it no longer
Japanese!
What I'm also thinking of is the the package maintainer. They should be
able to provide a "neutral" yet multibyte (and locale, and cyrillic)
enabled package, and one should be able to use that even if one doesn't
want to use the multibyte features right now or at all.
So you think a postgres package with multibyte/locale/cyrillic options
enabled is a good thing for everyone? At least I don't like locale
option. It is not only useless for multibyte languages such as
Japanese, but it makes slow for text comparison. I wouldn't say locale
is useless for everyone, however. I admit it is usefull for single
byte encodings.
I think it would be very hard to make a unified ideal package for
everyone.
Also, it should not be initdb's job to verify that the encodings are
correct, supported, etc. The backend should find that out itself. That
eliminates duplication of the same logic, which the backend can do better
anyway.
Actually that duplication can be eliminated by using the same
code. I think pg_id command will do the job.
BTW, I don't think the current implmentation of multibyte is not yet
completed. Next target would be NATIONAL CHARATER support (not sure
it's for 7.0, though). I would like to find a solution for the
problem of locale I stated above.
--
Tatsuo Ishii
From bouncefilter Wed Dec 8 10:29:42 1999
Received: from mail.rdc1.md.home.com (imail@ha1.rdc1.md.home.com [24.2.2.66])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA03314
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 10:29:22 -0500 (EST)
(envelope-from Don@AIT-INC.com)
Received: from AIT-INC.com ([24.3.22.12]) by mail.rdc1.md.home.com
(InterMail v4.01.01.00 201-229-111) with ESMTP
id <19991208152915.QKPP14742.mail.rdc1.md.home.com@AIT-INC.com>
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 07:29:15 -0800
Message-ID: <384E7816.DEFBAE14@AIT-INC.com>
Date: Wed, 08 Dec 1999 10:24:06 -0500
From: Don Schindhelm <Don@AIT-INC.com>
X-Mailer: Mozilla 4.5 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: Free SQLweb interface to postgresql w/E-Commerce capabilities
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Please note that SQLweb is a free public interface to SQL datatbases and
will work with postgresql. An E-Commerce Interface, just released, will
be valuable to PostgreSQL users who want to clear credit cards on-line.
Please feel free to add it to your list of 3rd party tools. SQLweb is
an HTML interface to PostgreSQL, for making database web applications.
SQLweb can be downloaded free from http://www.sqlweb.com
Regards,
Don Schindhelm
SQLweb Technologies
Applied Information Technologies, Inc
410-203-1999
From bouncefilter Wed Dec 8 10:30:42 1999
Received: from localhost (IDENT:root@hectic-3.jpl.nasa.gov [128.149.68.205])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA03706
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 10:30:24 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA22815;
Wed, 8 Dec 1999 15:33:13 GMT
Sender: lockhart@hub.org
Message-ID: <384E7A39.8BC2EBEA@alumni.caltech.edu>
Date: Wed, 08 Dec 1999 15:33:13 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tatsuo Ishii <t-ishii@sra.co.jp>
CC: peter_e@gmx.net, e99re41@DoCS.UU.SE, tgl@sss.pgh.pa.us,
hackers@postgreSQL.org
Subject: Re: [HACKERS] Multibyte in autoconf
References: <19991208162304M.t-ishii@sra.co.jp>
<Pine.GSO.4.02A.9912081420360.28981-100000@Svan.DoCS.UU.SE>
<19991208233152I.t-ishii@sra.co.jp>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
BTW, I don't think the current implmentation of multibyte is not yet
completed. Next target would be NATIONAL CHARATER support (not sure
it's for 7.0, though).
I'm still here, interested in working on NATIONAL CHAR and other
character stuff. Will need a multibyte partner though, since I'm not
familiar with all of the issues...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Dec 8 10:50:43 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA09603
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 10:50:27 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA26893;
Wed, 8 Dec 1999 10:49:35 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL Developers List <hackers@postgreSQL.org>
Subject: Re: [BUGS] uniqueness not always correct
In-reply-to: Your message of Wed, 8 Dec 1999 06:36:23 -0500 (EST)
<199912081136.GAA14399@candle.pha.pa.us>
Date: Wed, 08 Dec 1999 10:49:35 -0500
Message-ID: <26891.944668175@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Never mind. Fixed. I had forgotten to add a line to pg_amproc.h. So
obvious, hard to imagine how I could have missed it... :-)
ERROR: fmgr_info: function 0: cache lookup failed
This seems a mighty unhelpful error message for a missing pg_amproc
entry. Perhaps whatever code is doing the amproc lookup ought to be
checking for a failure and issuing a more specific message? I haven't
looked to see whether that's practical or not...
regards, tom lane
From bouncefilter Wed Dec 8 10:48:43 1999
Received: from localhost (IDENT:root@hectic-3.jpl.nasa.gov [128.149.68.205])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA08445
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 10:48:38 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA22836;
Wed, 8 Dec 1999 15:51:50 GMT
Sender: lockhart@hub.org
Message-ID: <384E7E96.6BD702EF@alumni.caltech.edu>
Date: Wed, 08 Dec 1999 15:51:50 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Jan Wieck <wieck@debis.com>
CC: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] When is 7.0 going Beta?
References: <m11vODM-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From my point of view, we could start BETA for a 6.6.6 when I
have the temp file buffered queue and the multibackend driver
plus a test suite ready.
If y'all need some help to get the FK stuff farther along, a 6.6
release will help on that imho. It takes the immediate pressure off of
the other developers, and they can choose to continue with their
developments or to take a breather and help out the 6.6 release.
The fact that more work needs to be done on FKs etc to enable a 6.6
release is not fatal; that is an issue for every release on one topic
or another.
I haven't heard anything (yet) which would be a show stopper imho, and
I'd *really* like to decouple some of the changes coming up. In
particular, I could commit "join syntax" for 6.6, and then work on the
query tree redesign for 7.0...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Dec 8 10:54:43 1999
Received: from localhost (IDENT:root@hectic-3.jpl.nasa.gov [128.149.68.205])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA09935
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 10:54:07 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA22852;
Wed, 8 Dec 1999 15:57:19 GMT
Sender: lockhart@hub.org
Message-ID: <384E7FDF.4B9E4245@alumni.caltech.edu>
Date: Wed, 08 Dec 1999 15:57:19 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and
shift/reduce)
References: <23950.944589174@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
... not sure how that can be done with a standard shell, and
that's a must. Maybe something using named pipes and so -
will play around a little.Would probably be more portable to write a little bit of C code that
opens several libpq connections and reads a script file with
interleaved commands to send to the different connections.
There are tools I'd consider using for this such as tcl/expect which
help with simulating interactive sessions and with coordinating
multiple actions. Forget the "sh only" approach if it makes things
difficult; some platforms ship with a much richer toolset, and these
tools might be well suited to your problem.
If it works and there is a big demand for the "sh tools" then someone
can recode it later, and it isn't holding you up now.
... my 2 cents...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Dec 8 11:34:40 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA02465
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 11:34:24 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from localhost (root@hectic-3.jpl.nasa.gov [128.149.68.205])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA02877
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 11:07:39 -0500 (EST)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA22859;
Wed, 8 Dec 1999 15:59:30 GMT
Sender: lockhart@trends.net
Message-ID: <384E8062.22F8889C@alumni.caltech.edu>
Date: Wed, 08 Dec 1999 15:59:30 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Eisentraut <peter_e@gmx.net>
CC: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
References: <Pine.GSO.4.02A.9912071929470.3057-100000@Panter.DoCS.UU.SE>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I guess you could also do some simple synchronization things, like have
the second psql wait on a file to spring into existence:
/* second-script */
\! while [ ! -f /tmp/lock.file ]; do ;; done
\! rm /tmp/lock.file
Kind of like a simple semaphore. Isn't that what you are getting at?
LISTEN/NOTIFY might be useful for this...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Dec 8 11:34:43 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA02500
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 11:34:29 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA02912
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 11:08:09 -0500 (EST)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA27024;
Wed, 8 Dec 1999 11:02:32 -0500 (EST)
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Peter Eisentraut <peter_e@gmx.net>, Jan Wieck <wieck@debis.com>,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
In-reply-to: Your message of Wed, 08 Dec 1999 15:59:30 +0000
<384E8062.22F8889C@alumni.caltech.edu>
Date: Wed, 08 Dec 1999 11:02:32 -0500
Message-ID: <27022.944668952@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
Kind of like a simple semaphore. Isn't that what you are getting at?
LISTEN/NOTIFY might be useful for this...
LISTEN/NOTIFY would be one of the things we were trying to *test*.
It's not helpful for checking intra-transaction-block behavior anyway,
since notifys are only sent at commit and only heard between
transactions.
I like the tcl/expect idea a lot. We'd have to upgrade our tcl
interface to support asynchronous queries (ie, send query then do other
stuff until answer arrives); AFAIR it can't handle that now. But that'd
be well worth doing anyway...
regards, tom lane
From bouncefilter Wed Dec 8 11:48:39 1999
Received: from www.actarg.com (root@[209.180.91.25])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA05079
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 11:47:53 -0500 (EST)
(envelope-from kyle@actarg.com)
Received: from actarg.com (root@tao.actarg.com [192.168.1.1])
by www.actarg.com (8.8.7/8.8.7) with ESMTP id JAA32330;
Wed, 8 Dec 1999 09:52:33 -0700
Received: from actarg.com (kyle@chi.actarg.com [192.168.2.16])
by actarg.com (8.8.7/8.8.7) with ESMTP id JAA20915;
Wed, 8 Dec 1999 09:45:57 -0700
Sender: kyle@actarg.com
Message-ID: <384E8BF4.A1645CAF@actarg.com>
Date: Wed, 08 Dec 1999 09:48:52 -0700
From: Kyle Bateman <kyle@actarg.com>
Organization: Action Target Inc
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: The Hermit Hacker <scrappy@hub.org>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Raising funds for PostgreSQL
References: <25958.944641432@sss.pgh.pa.us>
Content-Type: multipart/mixed; boundary="------------4B5A4FEAADF435BD4DD3805B"
This is a multi-part message in MIME format.
--------------4B5A4FEAADF435BD4DD3805B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Kyle Bateman <kyle@actarg.com> writes:
[ lots of good thoughts snipped ]
2. Take bids from the development team in advance on each feature. In
other words, how many dollars would they need to start on the
enhancement today.
Before I comment too much on this topic I should probably mention that
I have myself engaged in exactly this kind of transaction: a few months
ago, someone who need not be named here sent me a couple hundred bucks
in return for my dealing with a Postgres problem that they needed fixed
pronto (ie, within a week or two). It was something I would have fixed
anyway, eventually, but it was worth their cash to encourage me to deal
with that issue sooner rather than later. So I've certainly got no
moral objection to arrangements like this.
Tom, the more I hear, the more I'm beginning to think that maybe the best
mechanism is for the client to deal directly with one or two developers in
the way you did. Everything else we talk about begins to get rather
complicated in a hurry.
It would be relatively easy to open up a new discussion group for posting
offers (in either direction). Once a developer and a client got connected,
they could negotiate privately for the feature.
But I do have a practical concern, which is that bidding like this might
distort the development process, for example by tempting someone to put
in a quick-and-dirty hack that would provide the requested feature and
yet cause trouble down the line for future improvements. In the long
run that's not good for the health of the project.I'm not sure how to answer that concern. One possible answer is to
put a cap on the amounts bid --- a person's judgment is less likely
to be swayed in the wrong direction by $$ than $$$$$$, no? But the
cap would probably have to vary depending on the difficulty of the
proposed feature. I don't think we want to get into spending a lot
of effort on cost-estimating everything that's on the TODO list,
so administering a bid cap might well be impractical.
I think the best answer to this is already in place. It seems to me the
developer pool as a whole watches additions very carefully. Someone who
puts in an ugly hack has to think about what the rest of the team will
think of it. If the problem were repeated, that developer would begin to
lose clout and eventually would not be allowed the same kind of access to
the source tree. I think you guys are pretty motivated to do your best
work on this project. If that were not so, we would not see the quality of
work we do.
None of the arrangements can be forced (because this is a volunteer
project) so things like caps will probably not work anyway. I think I'd
encourage the group to begin to experiment with the kind of transactions
you described and see if we run into any problems with it. If it begins to
cause problems, adjustments can always be made to compensate.
--------------4B5A4FEAADF435BD4DD3805B
Content-Type: text/x-vcard; charset=us-ascii;
name="kyle.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Kyle Bateman
Content-Disposition: attachment;
filename="kyle.vcf"
begin:vcard
n:Bateman;Kyle
tel;fax:801-377-8096
tel;work:801-377-8033x101
x-mozilla-html:FALSE
url:www.actiontarget.com
org:Action Target Inc
adr:;;PO Box 636;Provo;UT;84603;US
version:2.1
email;internet:kyle@actiontarget.com
title:President
x-mozilla-cpt:;-15520
fn:Kyle Bateman
end:vcard
--------------4B5A4FEAADF435BD4DD3805B--
From bouncefilter Wed Dec 8 11:59:39 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id LAA06594
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 11:59:38 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11vkJa-0003kGC; Wed, 8 Dec 99 17:51 MET
Message-Id: <m11vkJa-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Wed, 8 Dec 1999 17:51:42 +0100 (MET)
Cc: lockhart@alumni.caltech.edu, peter_e@gmx.net, wieck@debis.com,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <27022.944668952@sss.pgh.pa.us> from "Tom Lane" at Dec 8,
99 11:02:32 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
Kind of like a simple semaphore. Isn't that what you are getting at?
LISTEN/NOTIFY might be useful for this...
LISTEN/NOTIFY would be one of the things we were trying to *test*.
It's not helpful for checking intra-transaction-block behavior anyway,
since notifys are only sent at commit and only heard between
transactions.I like the tcl/expect idea a lot. We'd have to upgrade our tcl
interface to support asynchronous queries (ie, send query then do other
stuff until answer arrives); AFAIR it can't handle that now. But that'd
be well worth doing anyway...
That would be really nice, especially because Tcl is my
preferred tool language. But I wouldn't use libpgtcl, instead
it should control a number of psql sessions over command
pipelines. These can already handle asynchronous actions
across all supported platforms.
I'll build the first version of the tool using standard Tcl,
and just keep in mind that the command language must be
easily implementable with lex/yacc so someone can convert it
later into a C version.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Dec 8 11:56:39 1999
Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net
[194.159.73.20]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA06337
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 11:56:26 -0500 (EST)
(envelope-from jeroen@design.nl)
Received: from [212.238.131.55] (helo=manderijn)
by post.mail.nl.demon.net with esmtp (Exim 2.02 #1)
id 11vkO7-0004Uv-00
for pgsql-hackers@postgresql.org; Wed, 8 Dec 1999 16:56:23 +0000
Message-Id: <4.2.0.58.19991208174034.00955220@mail.design.nl>
X-Sender: morinel@pop3.demon.nl
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58
Date: Wed, 08 Dec 1999 17:56:21 +0100
To: pgsql-hackers@postgresql.org
From: Jeroen van Vianen <jeroen@design.nl>
Subject: Small timezone bug fixed
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="=====================_1033170==_"
--=====================_1033170==_
Content-Type: text/plain; charset="us-ascii"; format=flowed
Hi,
I was able to crash postgres 6.5.3 when I did an 'alter user' command.
After I started a debugger I found the problem in the timezone handling of
datetime (my Linux box lost its timezone information, that's how the
problem occurred).
Only 7 bytes are reserved for the timezone, without checking for boundaries.
Attached is a patch that fixes this problem and emits a NOTICE if a
timezone is encountered that is longer than MAXTZLEN bytes, like this:
template1=# alter user postgres with password postgres;
NOTICE: Invalid timezone 'Local time zone must be set--see zic manual page'
NOTICE: Invalid timezone 'Local time zone must be set--see zic manual page'
ALTER USER
I don't know whether the timezone should be reset to some predefined
constant (like "GMT") if an error like this occurs. This patch at least
directs the user in a general direction that something is wrong with his setup.
Cheers,
Jeroen
--=====================_1033170==_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="timepatch"
*** ./dt.c.orig Wed Dec 8 17:18:16 1999=0A--- ./dt.c Wed Dec 8 17:23:32=
1999=0A***************=0A*** 4327,4333 ****=0A if ((*tzn !=3D NULL)=
&& (tm->tm_isdst >=3D 0))=0A {=0A strcpy((str + 27), " ");=0A!=
strcpy((str + 28), *tzn);=0A }=0A }=0A else=0A---=
4327,4333 ----=0A if ((*tzn !=3D NULL) && (tm->tm_isdst >=3D 0))=0A =
{=0A strcpy((str + 27), " ");=0A! strncpy((str + 28),=
*tzn, MAXTZLEN);=0A }=0A }=0A else=0A***************=0A***=
4336,4342 ****=0A if ((*tzn !=3D NULL) && (tm->tm_isdst >=3D 0))=0A =
{=0A strcpy((str + 24), " ");=0A! strcpy((str + 25),=
*tzn);=0A }=0A }=0A =0A--- 4336,4342 ----=0A if ((*tzn !=
=3D NULL) && (tm->tm_isdst >=3D 0))=0A {=0A strcpy((str + 24),=
" ");=0A! strncpy((str + 25), *tzn, MAXTZLEN);=0A }=0A }=
=0A =0A*** ./nabstime.c.orig Wed Dec 8 16:45:06 1999=0A---=
./nabstime.c Wed Dec 8 17:33:29 1999=0A***************=0A*** 174,180 ****=
=0A *tzp =3D -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */=0A /* XXX=
FreeBSD man pages indicate that this should work - tgl 97/04/23 */=0A if=
(tzn !=3D NULL)=0A! strcpy(tzn, tm->tm_zone);=0A #elif=
defined(HAVE_INT_TIMEZONE)=0A if (tzp !=3D NULL)=0A #ifdef=
__CYGWIN__=0A--- 174,189 ----=0A *tzp =3D -tm->tm_gmtoff; /* tm_gmtoff=
is Sun/DEC-ism */=0A /* XXX FreeBSD man pages indicate that this should=
work - tgl 97/04/23 */=0A if (tzn !=3D NULL)=0A! {=0A! /* Copy no more=
than MAXTZLEN bytes of timezone to tzn, in case it=0A! contains an=
error message, which doesn't fit in the buffer */=0A! strncpy(tzn,=
tm->tm_zone, MAXTZLEN);=0A! if (strlen(tm->tm_zone) > MAXTZLEN)=0A! {=
=0A! tzn[MAXTZLEN] =3D '\0';=0A! elog(NOTICE, "Invalid timezone=
\'%s\'", tm->tm_zone);=0A! }=0A! }=0A #elif defined(HAVE_INT_TIMEZONE)=
=0A if (tzp !=3D NULL)=0A #ifdef __CYGWIN__=0A***************=0A***=
183,189 ****=0A *tzp =3D (tm->tm_isdst ? (timezone - 3600) : timezone);=
=0A #endif=0A if (tzn !=3D NULL)=0A! strcpy(tzn,=
tzname[tm->tm_isdst]);=0A #else=0A #error POSIX time support is broken=0A=
#endif=0A--- 192,207 ----=0A *tzp =3D (tm->tm_isdst ? (timezone - 3600)=
: timezone);=0A #endif=0A if (tzn !=3D NULL)=0A! {=0A! /* Copy no=
more than MAXTZLEN bytes of timezone to tzn, in case it=0A! contains=
an error message, which doesn't fit in the buffer */=0A! strncpy(tzn,=
tzname[tm->tm_isdst], MAXTZLEN);=0A! if (strlen(tzname[tm->tm_isdst]) >=
MAXTZLEN)=0A! {=0A! tzn[MAXTZLEN] =3D '\0';=0A! elog(NOTICE,=
"Invalid timezone \'%s\'", tzname[tm->tm_isdst]);=0A! }=0A! }=0A #else=
=0A #error POSIX time support is broken=0A #endif=0A
--=====================_1033170==_--
From bouncefilter Wed Dec 8 13:04:39 1999
Received: from castle-smtp (firewall-user@ns2.amgen.com [138.133.17.7])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA18373
for <pgsql-general@postgresql.org>; Wed, 8 Dec 1999 13:04:27 -0500 (EST)
(envelope-from mdalphin@amgen.com)
Received: by castle-smtp; id KAA27167; Wed, 8 Dec 1999 10:05:01 -0800 (PST)
Received: from mailbag.amgen.com(138.133.10.78) by castle-smtp.amgen.com via
smap (V4.2) id xma026776; Wed, 8 Dec 99 10:02:41 -0800
Received: from maat.amgen.com (maat [138.133.145.25])
by mailbag.amgen.com (8.8.5/8.8.5) with ESMTP id KAA13930
for <pgsql-general@postgresql.org>; Wed, 8 Dec 1999 10:02:02 -0800 (PST)
Received: from amgen.com (mahunui [138.133.147.23])
by maat.amgen.com (8.8.8+Sun/8.8.8) with ESMTP id KAA00034
for <pgsql-general@postgresql.org>; Wed, 8 Dec 1999 10:01:59 -0800 (PST)
Sender: mdalphin@amgen.com
Message-ID: <384E9D82.CCC45186@amgen.com>
Date: Wed, 08 Dec 1999 10:03:46 -0800
From: Mark Dalphin <mdalphin@amgen.com>
Organization: Amgen, Inc.
X-Mailer: Mozilla 4.6C-SGI [en] (X11; U; IRIX64 6.5 IP30)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-general@postgresql.org
Subject: Suggested "minor" change to psql
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
Ever since I began working with Postgres, I have had one little irritating
problem with psql. It may be that I am mis-using this program; if so, my
suggestion is not helpful, however, if others have encountered this problem,
perhaps the developers can look at a fix for 7.0?
When I develop a new DB schema using psql, I usually first create a file, say
"mySchema.sql". I then "createdb" the database, start up psql, and use the
command "\i mySchema.sql" to load in my new schema. There will be, needless to
say, several errors. These fall nicely below the offending line and I can look
at fixing them. I drop the DB, re-edit my SQL file and re-do the "\i" command.
Sometimes, however, rather than using the "\i" command, I would like to simply
load my schema directly into psql and capture the output on STDOUT (ie "psql <
mySchema.sql >& myOutput"). The problem that arises is that the errors and
notices all come out on STDERR. I am not sure this is the right choice. Because
of the lack of synchronization between STDOUT and STDERR, it becomes impossible
to associate an SQL statement with either a CREATE or an ERROR message. The
option, "-e", is supposed to echo the query, but it doesn't help.
While I can see wanting to separate STDERR and STDOUT when one uses psql to run
an SQL query against a DB from within a shell script, it makes it much more
difficult when developing, and if I were to run several SQL queries into psql,
exactly the same association problem would occur.
Perhaps a combination of the function "isatty()" plus the -e flag would work? So
that if STDOUT "isatty()" then echo errors to STDOUT, otherwise send them to
STDERR. And if the -e flag is set, echo the queries to STDERR, so the
correlation between ERROR, CREATE, etc and SQL could be made.
Just my $0.02.
Mark
PS I only recently learned of the setting of the PAGER environment variable to
make it so I needn't scroll back up 400 lines to find my errors; perhaps this
could be made more prominent in the documentation as it would be a big help.
Then again, perhaps I should completely re-read the docs to see if this is
mentioned; I haven't done that for several releases now.
--
Mark Dalphin email: mdalphin@amgen.com
Mail Stop: 29-2-A phone: +1-805-447-4951 (work)
One Amgen Center Drive +1-805-375-0680 (home)
Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work)
From bouncefilter Wed Dec 8 13:42:40 1999
Received: from dec.contad.unam.mx (dec.contad.unam.mx [132.248.158.18])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA23561
for <pgsql-general@postgreSQL.org>; Wed, 8 Dec 1999 13:42:16 -0500 (EST)
(envelope-from sony@dec.contad.unam.mx)
Received: from localhost (sony@localhost) by dec.contad.unam.mx with ESMTP
(8.7.1/8.7.1) id MAA13126; Wed, 8 Dec 1999 12:27:44 -0600 (CST)
Date: Wed, 8 Dec 1999 12:27:44 -0600 (CST)
From: Sanchez Diaz Sonia <sony@dec.contad.unam.mx>
X-Sender: sony@dec.contad.unam.mx
To: Mark Dalphin <mdalphin@amgen.com>
cc: pgsql-general@postgreSQL.org
Subject: Size of database
In-Reply-To: <384E9D82.CCC45186@amgen.com>
Message-ID: <Pine.HPX.4.10.9912081226020.13070-100000@dec.contad.unam.mx>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Somebody can help me?
I need to know which is the maximum size of the database in
Postgresql and how many records I can keeps into it?
Tnaks!
Sonia Sanchez Diaz
UNAM_FCA_CIFCA_Admon.Red
e-mail: sony@dec.contad.unam.mx
From bouncefilter Wed Dec 8 13:54:40 1999
Received: from biology.nmsu.edu (biology.NMSU.Edu [128.123.5.72])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA24994
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 13:54:28 -0500 (EST)
(envelope-from brook@biology.nmsu.edu)
Received: (from brook@localhost) by biology.nmsu.edu (8.8.8/8.8.8) id
LAA14035;
Wed, 8 Dec 1999 11:54:26 -0700 (MST)
Date: Wed, 8 Dec 1999 11:54:26 -0700 (MST)
Message-Id: <199912081854.LAA14035@biology.nmsu.edu>
X-Authentication-Warning: biology.nmsu.edu: brook set sender to
brook@biology.nmsu.edu using -f
From: Brook Milligan <brook@biology.nmsu.edu>
To: hackers@postgreSQL.org
Cc: mdalphin@amgen.com
In-reply-to: <384E9D82.CCC45186@amgen.com> (message from Mark Dalphin on Wed,
08 Dec 1999 10:03:46 -0800)
Subject: Re: [GENERAL] Suggested "minor" change to psql
References: <384E9D82.CCC45186@amgen.com>
When I develop a new DB schema using psql, I usually first create a file, say
"mySchema.sql". I then "createdb" the database, start up psql, and use the
command "\i mySchema.sql" to load in my new schema. There will be, needless to
say, several errors. These fall nicely below the offending line and I can look
at fixing them. I drop the DB, re-edit my SQL file and re-do the "\i" command.
I think the new stuff allows separating or merging different output
"channels" so that psql can be run in the different ways you wish.
However, this does raise another issue that might make debugging
scripts run through psql easier. I have found that emacs compile
buffer semantics are extremely useful for debugging source code, and
suggest that error messages from psql follow something similar (at
least as an option) to aid in script debugging. The output of
compiler error messages generally gives a filename:linenumber prefix
to the message; emacs can parse that an put you exactly at the correct
point for fixing the error.
If psql would also output messages in the same form, i.e.,
filename:linenumber: error message
then scripts run in emacs compile buffer (easily done either directly
or with make) could be rapidly debugged using the normal mechanisms
available for "normal" source code debugging.
I realize that everyone does not use emacs, but I can't see how
including that information would be detrimental to anyone. It gives
more information useful for anyone debugging scripts.
Cheers,
Brook
From bouncefilter Wed Dec 8 14:06:40 1999
Received: from oxmail.ox.ac.uk (oxmail4.ox.ac.uk [163.1.2.33])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA26931
for <pgsql-general@postgresql.org>; Wed, 8 Dec 1999 14:06:26 -0500 (EST)
(envelope-from moray.mcconnachie@computing-services.oxford.ac.uk)
Received: from ermine.ox.ac.uk ([163.1.2.13])
by oxmail.ox.ac.uk with esmtp (Exim 2.10 #1)
id 11vmPn-0005JT-00; Wed, 8 Dec 1999 19:06:15 +0000
Received: from moray (helo=localhost)
by ermine.ox.ac.uk with local-esmtp (Exim 2.12 #1)
id 11vmPn-00015v-00; Wed, 8 Dec 1999 19:06:15 +0000
Date: Wed, 8 Dec 1999 19:06:15 +0000 (GMT)
From: Moray McConnachie <moray.mcconnachie@computing-services.oxford.ac.uk>
To: Mark Dalphin <mdalphin@amgen.com>
cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Suggested "minor" change to psql
In-Reply-To: <384E9D82.CCC45186@amgen.com>
Message-ID: <Pine.OSF.4.10.9912081900110.28334-100000@ermine.ox.ac.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
What's wrong with pgsql -d xxxx -c '\i myschema' > databaseload.logfile ?
Seems to work OK for me.
You can always use the 2>&1 syntax to redirect STDERR to STDOUT as well.
Yours,
Moray
From bouncefilter Wed Dec 8 14:24:40 1999
Received: from fordfamilymarketing.com (jforddsl.wvi.com [204.245.255.187])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA28927
for <pgsql-general@postgreSQL.org>; Wed, 8 Dec 1999 14:23:48 -0500 (EST)
(envelope-from stolkd@email.com)
Received: from email.com (localhost [127.0.0.1])
by fordfamilymarketing.com (8.9.3/8.9.3) with ESMTP id LAA05905;
Wed, 8 Dec 1999 11:22:54 -0800
Sender: root@fordfamilymarketing.com
Message-ID: <384EB00E.B8BFAD50@email.com>
Date: Wed, 08 Dec 1999 11:22:54 -0800
From: Daniel Stolk <stolkd@email.com>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.5-15 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Sanchez Diaz Sonia <sony@dec.contad.unam.mx>
CC: Mark Dalphin <mdalphin@amgen.com>, pgsql-general@postgreSQL.org
Subject: Re: [GENERAL] Size of database
References: <Pine.HPX.4.10.9912081226020.13070-100000@dec.contad.unam.mx>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Look at:
http://www.postgresql.org/docs/faq-english.html#4.6
Daniel Stolk
Sanchez Diaz Sonia wrote:
Somebody can help me?
I need to know which is the maximum size of the database in
Postgresql and how many records I can keeps into it?Tnaks!
Sonia Sanchez Diaz
UNAM_FCA_CIFCA_Admon.Red
e-mail: sony@dec.contad.unam.mx************
From bouncefilter Wed Dec 8 14:28:42 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA29538
for <pgsql-general@postgresql.org>; Wed, 8 Dec 1999 14:27:43 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.57.207]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Wed, 8 Dec 1999 13:18:40 -0600
Sender: ed
Message-ID: <384EB09A.472A931B@austin.rr.com>
Date: Wed, 08 Dec 1999 13:25:14 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Mark Dalphin <mdalphin@amgen.com>
CC: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Suggested "minor" change to psql
References: <384E9D82.CCC45186@amgen.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Mark Dalphin wrote:
Sometimes, however, rather than using the "\i" command, I would like to simply
load my schema directly into psql and capture the output on STDOUT (ie "psql <
mySchema.sql >& myOutput"). The problem that arises is that the errors and
notices all come out on STDERR. I am not sure this is the right choice. Because
of the lack of synchronization between STDOUT and STDERR, it becomes impossible
to associate an SQL statement with either a CREATE or an ERROR message. The
option, "-e", is supposed to echo the query, but it doesn't help.
I have experienced this problem as well. It is a bit of a pain. I would love to
hear how others are handling this. I have one partial workaround.
% psql -d test -f createdb.sql 2>&1 | less
For whatever reason, the above seems to keep the msgs fairly synchronized (at least
on Redhat 6.0), making it useful for visual inspection of short loads.
Unfortunately, that approach far exceeds my patience for my situation. I'm
frequently recreating 150 tables and redoing ~1400 INSERTs via psql with input
scripts. That takes about 4 minutes on a dual PII 450 and generates ~15K lines of
output (~500 PAGER pages @30 lines/page). Instead, I pipe STDERR/STDOUT to a file,
and then grep the file for 'INSERT 0 0', 'ERROR', and other problem signs. I've
gotten pretty good at matching up the error msgs with the problem by interspersing
judiciously comments and queries, but it's still a pain.
It'd be nice to be able to get all psql msgs sync'ed on either STDERR or STDOUT.
Cheers.
Ed
From bouncefilter Wed Dec 8 15:09:58 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA02793
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 15:09:26 -0500 (EST)
(envelope-from wieck@debis.com)
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by trends.net (8.8.8/8.8.8) with SMTP id OAA15725
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 14:53:24 -0500 (EST)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11vn1c-0003kGC; Wed, 8 Dec 99 20:45 MET
Message-Id: <m11vn1c-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Wed, 8 Dec 1999 20:45:20 +0100 (MET)
Cc: lockhart@alumni.caltech.edu, peter_e@gmx.net, wieck@debis.com,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <27022.944668952@sss.pgh.pa.us> from "Tom Lane" at Dec 8,
99 11:02:32 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
I like the tcl/expect idea a lot. We'd have to upgrade our tcl
interface to support asynchronous queries (ie, send query then do other
stuff until answer arrives); AFAIR it can't handle that now. But that'd
be well worth doing anyway...
O.K.
The multi session test tool, written in Tcl, is ready. Where
should it go and how should it be named? I think it wouldn't
be a bad idea to have it in a place where it can be used from
any location, instead of putting it into the regression dir.
Maybe install it into bin?
Just to show a little:
# ----
# Multi session test suite
# ----
# ----
# Session 1 starts a transaction and deletes all rows from t1
# ----
/ connect A
begin;
select * from t1;
delete from t1;
/ wait A
# ----
# Session 2 tries to select all from t1 for update - should block
# ----
/ connect B
begin;
select * from t1 for update of t1;
commit;
/ wait B
# ----
# Now session 1 rolls back ...
# ----
/ use A
rollback;
/ wait A
# ----
# ... what must release session 2
# ----
/ wait B
/ close A
/ close B
The above input produces this output:
# ----
# Multi session test suite
# ----
# ----
# Session 1 starts a transaction and deletes all rows from t1
# ----
(A) QUERY: begin;
(A) QUERY: select * from t1;
(A) a1|b1|c1
(A) --+--+-----
(A) 2| 2|key 2
(A) 3| 3|key 3
(A) 8| 8|key 7
(A) (3 rows)
(A)
(A) QUERY: delete from t1;
# ----
# Session 2 tries to select all from t1 for update - should block
# ----
(B) QUERY: begin;
(B) QUERY: select * from t1 for update of t1;
*** Session of connection B seems locked
# ----
# Now session 1 rolls back ...
# ----
(A) QUERY: rollback;
# ----
# ... what must release session 2
# ----
(B) a1|b1|c1
(B) --+--+-----
(B) 2| 2|key 2
(B) 3| 3|key 3
(B) 8| 8|key 7
(B) (3 rows)
(B)
(B) QUERY: commit;
The default time for the "wait" command is 5 seconds, but can
be specified explicitly as "wait A 10". Session names can of
course be longer than one character.
The script stopped at session B's SELECT ... FOR UPDATE, and
correctly continued with the *** message 5 seconds later. As
you might have noticed, it doesn't matter that the COMMIT of
session 2 was placed directly after the SELECT. If the
session hangs, all queries are internally buffered.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Dec 8 15:08:52 1999
Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA02678
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 15:08:08 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.57.207]) by mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Wed, 8 Dec 1999 14:08:20 -0600
Sender: ed
Message-ID: <384EBA49.14AB70C9@austin.rr.com>
Date: Wed, 08 Dec 1999 14:06:33 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Raising funds for PostgreSQL
References: <38496D18.96890910@actarg.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Interesting article relevant to this thread...
http://www.linuxplanet.com/linuxplanet/newss/1316/1/
SourceXchange Goes Live
Hewlett-Packard Among Initial Users of the New Service
Kevin Reichard
"Collab.Net announced today that it has finished its
beta-test phase and gone into production with its first service,
sourceXchange, a marketplace where open-source developers match their
expertise to committed buyers with well-defined, financially backed
open-source projects."
From bouncefilter Wed Dec 8 15:15:52 1999
Received: from aurora.rg.iupui.edu (aurora.rg.iupui.edu [134.68.31.122])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA04022
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 15:15:35 -0500 (EST)
(envelope-from gunther@aurora.rg.iupui.edu)
Received: from aurora.rg.iupui.edu (schadow_g.regenstrief.iupui.edu
[134.68.31.121])
by aurora.rg.iupui.edu (8.9.3/8.9.3) with ESMTP id PAA94418
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 15:15:03 -0500 (EST)
(envelope-from gunther@aurora.rg.iupui.edu)
Message-ID: <384EBC57.78AECDDB@aurora.rg.iupui.edu>
Date: Wed, 08 Dec 1999 15:15:19 -0500
From: Gunther Schadow <gunther@aurora.rg.iupui.edu>
Organization: Regenstrief Institute
X-Mailer: Mozilla 4.51 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "hackers@postgreSQL.org" <hackers@postgreSQL.org>
Subject: Advanced projects ... anyone interested?
Content-Type: multipart/mixed; boundary="------------CC189E206187504384D7C713"
This is a multi-part message in MIME format.
--------------CC189E206187504384D7C713
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
is anyone interested in, or actually working on advanced issues
with PostgreSQL, like:
- recursive queries and transitive closure optimization
- more sophisticated representation incomplete information
(different null values)
- probabilistic relations
- temporal (preferrably bi-temporal) relations
I am planning to use PostgreSQL for medical information and medical
knowledge, so I run into all these problems. I wonder whether it
makes sense to tweak on PostgreSQL for these matters or whether a
more generic approach (where the client does all the advanced stuff)
is more realistic.
any ideas appreciated,
-Gunther Schadow
--
Gunther_Schadow-------------------------------http://aurora.rg.iupui.edu
Regenstrief Institute for Health Care
1050 Wishard Blvd., Indianapolis IN 46202, Phone: (317) 630 7960
schadow@aurora.rg.iupui.edu------------------#include <usual/disclaimer>
--------------CC189E206187504384D7C713
Content-Type: text/x-vcard; charset=us-ascii;
name="gunther.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Gunther Schadow
Content-Disposition: attachment;
filename="gunther.vcf"
begin:vcard
n:Schadow;Gunther
tel;fax:+1 317 630 6962
tel;home:+1 317 816 0516
tel;work:+1 317 630 7960
x-mozilla-html:FALSE
url:http://aurora.rg.iupui.edu
org:Regenstrief Institute
adr:;;1050 Wishard Blvd;Indianapolis;Indiana;46202;USA
version:2.1
email;internet:schadow_g@regenstrief.rg.iupui.edu
title:M.D.
fn:Gunther Schadow
end:vcard
--------------CC189E206187504384D7C713--
From bouncefilter Wed Dec 8 17:57:44 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA01487
for <hackers@postgresql.org>; Wed, 8 Dec 1999 17:57:40 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from finch-post-10.mail.demon.net (finch-post-10.mail.demon.net
[194.217.242.38]) by trends.net (8.8.8/8.8.8) with ESMTP id RAA24632
for <hackers@postgresql.org>; Wed, 8 Dec 1999 17:38:35 -0500 (EST)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by finch-post-10.mail.demon.net with esmtp (Exim 2.12 #1)
id 11vpdD-000D8N-0A; Wed, 8 Dec 1999 22:32:19 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id WAA00910; Wed, 8 Dec 1999 22:32:15 GMT
Message-Id: <199912082232.WAA00910@mtcc.demon.co.uk>
Date: Wed, 8 Dec 1999 22:32:15 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: Re: [HACKERS] Table aliases in delete statements?
To: hackers@postgresql.org, geek+@cmu.edu
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: wDFqBSWaC1WtFTFhcC5LsQ==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
Brian E Gallew <geek+@cmu.edu>
Then <tgl@sss.pgh.pa.us> spoke up and said:
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Is there any reason for not allowing table aliases in
delete statements?As Bruce points out in another followup, there's no real need for
an alias for the target table; if you have sub-selects that need
independent references to the target, you can always alias *them*.
The same goes for INSERT and UPDATE, which also take unadorned
<table name> as the target table specification.Unless your query is going to be long enough to run into query length
limits, aliases are not your friends. Standard SQL they may be, but
aliases always end up obscuring queries to those who come along after
you.
The problem is that it's difficult to refer to the same table twice
in a single query without using aliases.
The trap I fell into was thinking I had to alias both references to
the table.
I'd be interested in seeing alternative solutions to the duplicate
removal problem.
Keith.
From bouncefilter Wed Dec 8 17:54:46 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA01027
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 17:54:00 -0500 (EST)
(envelope-from fve@atbib.be)
Received: from atbib.be (root@a02-179.antw.online.be [62.112.3.179])
by trends.net (8.8.8/8.8.8) with ESMTP id RAA25131
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 17:48:17 -0500 (EST)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id AAA13383
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 00:45:54 +0100
Message-Id: <3.0.6.32.19991208234658.00881e90@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Wed, 08 Dec 1999 23:46:58 +0100
To: pgsql-hackers@postgresql.org
From: Frans Van Elsacker <fve@atbib.be>
Subject: Postgresql 6.5.3-2 for redhat 6.1
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Hello,
I've a problem and i am looking for help?
I have a table with a field varchar(5), filed with right alligned numbers.
Ordering was fine, just like we expected compared with nummeric.
Starting from RedHat version 6.1 the ordening seems to remove the leading
blanco's, what was not for use. I try different versions of postgres, as
there are 6.5.2-1, 6.5.3-1, 6.5.3-2
I also try to change varchar in char, and remove the index on the varchar
field but nothing helps.
Going back to redhat 6.0 (and try with the same postgres versions) ordering
becomes fine again.
Any idea??
Frans
From bouncefilter Wed Dec 8 19:13:49 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA10166
for <hackers@postgresql.org>; Wed, 8 Dec 1999 19:13:37 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62818 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sHjER124983>; Thu, 9 Dec 1999 01:13:17 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11vrHo-0003Xd-00; Thu, 09 Dec 1999 01:18:20 +0100
Date: Thu, 9 Dec 1999 01:18:20 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tatsuo Ishii <t-ishii@sra.co.jp>
cc: Tom Lane <tgl@sss.pgh.pa.us>, hackers@postgresql.org
Subject: Re: [HACKERS] Multibyte in autoconf
In-Reply-To: <19991208233152I.t-ishii@sra.co.jp>
Message-ID: <Pine.LNX.4.20.9912082106030.389-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-08, Tatsuo Ishii mentioned:
1) initdb with no encoding augument (suppose that SQL_ASCII is set as
the default encoding in template1)2) a user creates a database with no encoding augument. he thought
that the default encoding is EUC_JP.
Why would the user think that? Can't he check if he's not sure? Call his
db admin? Or did the db admin mess up the initdb?
3) he makes a table then fills it with some Japanese data.
4) later he pulls data from the table and found that it no longer
Japanese!
That really doesn't have anything to do with what I'm getting at. This is
just a naive user, quite honestly.
So you think a postgres package with multibyte/locale/cyrillic options
enabled is a good thing for everyone? At least I don't like locale
option. It is not only useless for multibyte languages such as
Japanese, but it makes slow for text comparison. I wouldn't say locale
is useless for everyone, however. I admit it is usefull for single
byte encodings.
(Locale doesn't only affect language matters, but also currenct
formatting, number display, etc.)
The performance problems with locale is a deficiency which will get fixed.
But that doesn't mean we have to block this path via other means. But that
was not the point. The point was that what we have here is a default for a
default. And moreover a default for an action you only do once. If you
init a database system, you make then and there (and only there) a
decision what you are going to do, tell your users about it and everyone
is happy. That's not any more complicated than it is now, only that it
moves runtime behaviour to run time programs and leaves build time
decisions with configure time programs.
Now you would do:
./configure --with-mb=FOO
make
make install
initdb
With the proposal you could do:
./configure --enable-multibyte
make
make install
initdb -E FOO # if you want multibyte in all your databases
--or--
initdb # if you don't want multibyte by default but want
# to keep the option for individual cases
The fact that you have configured with --enable-multibyte doesn't mean you
have to use it. Just because a program is locale capable, doesn't mean you
have to decide on the default locale at compile time.
I think it would be very hard to make a unified ideal package for
everyone.
That's what packages try to achieve. We shouldn't make it harder for them.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Wed Dec 8 19:13:45 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA10165
for <hackers@postgresql.org>; Wed, 8 Dec 1999 19:13:36 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62919 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sHjEW118831>; Thu, 9 Dec 1999 01:13:22 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11vrI5-0003YE-00
for hackers@postgresql.org; Thu, 09 Dec 1999 01:18:37 +0100
Date: Thu, 9 Dec 1999 01:18:37 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: hackers@postgresql.org
Subject: More initdb follies
Message-ID: <Pine.LNX.4.20.9912090040450.389-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
In my digging around in initdb, I came to the --username option, which
supposedly allows you to initialize the database system with another
username. Not a bad idea, really.
Obviously, you'd have to be root in that case, because you want to create
files in someone else's name. But if you are root, the backends will
refuse to execute, wisely so. So this option is totally broken.
I propose that I remove it, and that it instead be possible that you can
do
root# su -l postgres -c 'initdb ...'
if you are not a fan of logging in and out of user accounts during the
install process.
That would also remove a whole bunch of the username/id checking logic,
since you just use the user you're logged in as ($UID, $USER), and if the
backend doesn't like it, it will tell you. pg_id adieu.
Another question: Is there a reason why the system views in initdb are all
created with a CREATE TABLE and then with a CREATE RULE, instead of using
CREATE VIEW? Is that a left over from the time before there were views as
such?
Question 3: Is there a reason why the template1 database is vacuumed twice
in the process? Once before all the views are created (no analyze) and
once at the very end (with analyze).
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Wed Dec 8 20:05:45 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA15654
for <hackers@postgresql.org>; Wed, 8 Dec 1999 20:05:39 -0500 (EST)
(envelope-from Inoue@tpf.co.jp)
Received: from tpf.co.jp ([126.0.1.56] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with ESMTP
id KAA00698; Thu, 09 Dec 1999 10:03:49 +0900
Message-ID: <384F0001.91E17222@tpf.co.jp>
Date: Thu, 09 Dec 1999 10:04:01 +0900
From: Hiroshi Inoue <Inoue@tpf.co.jp>
X-Mailer: Mozilla 4.51 [ja] (Win98; I)
X-Accept-Language: ja
MIME-Version: 1.0
To: Peter Eisentraut <peter_e@gmx.net>
CC: Tatsuo Ishii <t-ishii@sra.co.jp>, Tom Lane <tgl@sss.pgh.pa.us>,
hackers@postgresql.org
Subject: Re: [HACKERS] Multibyte in autoconf
References: <Pine.LNX.4.20.9912082106030.389-100000@localhost.localdomain>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Peter Eisentraut wrote:
On 1999-12-08, Tatsuo Ishii mentioned:
1) initdb with no encoding augument (suppose that SQL_ASCII is set as
the default encoding in template1)2) a user creates a database with no encoding augument. he thought
that the default encoding is EUC_JP.Why would the user think that? Can't he check if he's not sure? Call his
db admin? Or did the db admin mess up the initdb?
As a Japanese,I don't want to specify an encoding for every initdb.
There are few selections except --with-mb=EUC_JP in Japan.
Isn't it preferable that PostgreSQL doesn't need an excellent db
admin ?
I do initdb frequently in current tree.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Wed Dec 8 20:32:45 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA18696
for <hackers@postgresql.org>; Wed, 8 Dec 1999 20:31:59 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id UAA29135;
Wed, 8 Dec 1999 20:31:20 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Tatsuo Ishii <t-ishii@sra.co.jp>, hackers@postgresql.org
Subject: Re: [HACKERS] Multibyte in autoconf
In-reply-to: Your message of Thu, 9 Dec 1999 01:18:20 +0100 (CET)
<Pine.LNX.4.20.9912082106030.389-100000@localhost.localdomain>
Date: Wed, 08 Dec 1999 20:31:20 -0500
Message-ID: <29133.944703080@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
The fact that you have configured with --enable-multibyte doesn't mean you
have to use it. Just because a program is locale capable, doesn't mean you
have to decide on the default locale at compile time.
Well, if you don't determine a default locale at configure/compile time,
what that *really* means is that the default was hardwired in even
earlier, ie, when the program was written. (Or else it means that there
is no default: if we did that, users would be required to explicitly
give an encoding choice whenever they run initdb.)
Seems to me that Tatsuo is right that setting a site-specific default
encoding at configure time is handy, and *also* that Peter is right that
the encoding should be selectable at initdb time. But where's the
conflict? We can accept "--with-mb=FOO" at configure time, with the
understanding that the *only* thing FOO is used for is to set the
default value of initdb's --pgencoding switch. You override FOO by
giving an explicit --pgencoding switch when you do initdb. People
building generic multibyte-capable RPMs would probably configure with
FOO=ASCII (or whatever the non-multibyte encoding is called). Seems
like that should satisfy everyone. Have I missed something?
regards, tom lane
From bouncefilter Wed Dec 8 20:39:45 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA19557
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 20:39:05 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id UAA29159;
Wed, 8 Dec 1999 20:38:30 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] More initdb follies
In-reply-to: Your message of Thu, 9 Dec 1999 01:18:37 +0100 (CET)
<Pine.LNX.4.20.9912090040450.389-100000@localhost.localdomain>
Date: Wed, 08 Dec 1999 20:38:30 -0500
Message-ID: <29157.944703510@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
In my digging around in initdb, I came to the --username option, which
supposedly allows you to initialize the database system with another
username. Not a bad idea, really.Obviously, you'd have to be root in that case, because you want to create
files in someone else's name. But if you are root, the backends will
refuse to execute, wisely so. So this option is totally broken.I propose that I remove it,
Makes sense to me --- I was saying more or less the same thing, I think,
when I said that initdb should pay attention to the effective UID it's
run under *and nothing else* to determine the postgres user name/ID.
In particular, if you want to be able to run it via "su", it mustn't
assume that environment variables like LOGNAME or USER are set correctly
for the postgres user. If it needs the user name it should look it up
from the EUID.
Another question: Is there a reason why the system views in initdb are all
created with a CREATE TABLE and then with a CREATE RULE, instead of using
CREATE VIEW? Is that a left over from the time before there were views as
such?
Probably, but it's before my time.
Question 3: Is there a reason why the template1 database is vacuumed twice
in the process? Once before all the views are created (no analyze) and
once at the very end (with analyze).
I've wondered about that too. There are some comments in initdb
suggesting that other orderings might fail, but I wouldn't be surprised
if those are obsolete. Have you tried altering the procedure?
regards, tom lane
From bouncefilter Wed Dec 8 20:49:45 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA20902
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 20:48:01 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id UAA29193;
Wed, 8 Dec 1999 20:46:50 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: lockhart@alumni.caltech.edu, peter_e@gmx.net, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
In-reply-to: Your message of Wed, 8 Dec 1999 20:45:20 +0100 (MET)
<m11vn1c-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Wed, 08 Dec 1999 20:46:50 -0500
Message-ID: <29191.944704010@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
The multi session test tool, written in Tcl, is ready.
Looks way cool.
Where should it go and how should it be named?
Why not throw it in as another src/bin/ subdirectory, or maybe put it
in Peter's new "src/bin/scripts/" directory? No great ideas for
a name here.
The default time for the "wait" command is 5 seconds, but can
be specified explicitly as "wait A 10".
It makes me uncomfortable that there are any explicit times at all.
A developer might set up a test script with delays that seem ample
on his hardware, yet will fail when someone tries to use the script
on a much slower and/or heavily loaded system.
Can we find a way to avoid needing explicit times in the scripts?
If not, there should probably be a command-line switch that allows all
the times to be scaled by some amount. (Ugly, but could be really
handy.)
regards, tom lane
From bouncefilter Wed Dec 8 22:28:15 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA02784
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 22:27:22 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from www.wgcr.org (root@www.wgcr.org [206.74.232.194])
by trends.net (8.8.8/8.8.8) with ESMTP id WAA05556
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 22:07:39 -0500 (EST)
Received: from lorc.wgcr.org (dial-34.r9.ncbrvr.Infoave.Net [206.74.37.162])
by www.wgcr.org (8.8.7/8.8.5) with SMTP id VAA17630;
Wed, 8 Dec 1999 21:58:37 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Postgresql 6.5.3-2 for redhat 6.1
Date: Wed, 8 Dec 1999 21:45:19 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <3.0.6.32.19991208234658.00881e90@193.75.233.1>
In-Reply-To: <3.0.6.32.19991208234658.00881e90@193.75.233.1>
MIME-Version: 1.0
Message-Id: <99120822014200.01570@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
On Wed, 08 Dec 1999, Frans Van Elsacker wrote:
I have a table with a field varchar(5), filed with right alligned numbers.
Ordering was fine, just like we expected compared with nummeric.Starting from RedHat version 6.1 the ordening seems to remove the leading
blanco's, what was not for use. I try different versions of postgres, as
there are 6.5.2-1, 6.5.3-1, 6.5.3-2
I also try to change varchar in char, and remove the index on the varchar
field but nothing helps.
As I e-mailed to you before, I cannot reproduce this behaviour on my
installation of RedHat 6.1. If you can provide a session transcript for the
create, some inserts, and a select, then I might be able to help. What is your
locale set to, out of curiousity?
If I do the following:
CREATE TABLE BLANK (column1 varchar(5));
INSERT INTO BLANK (column1) VALUES (' 12');
INSERT INTO BLANK (column1) VALUES (' 212');
INSERT INTO BLANK (column1) VALUES (' 3212');
INSERT INTO BLANK (column1) VALUES ('3212 ');
then:
SELECT * FROM BLANK;
produces:
column1
-------
12
212
3212
3212
(4 rows)
Just like it's supposed to.
PostgreSQL 6.5.3-2nl on RedHat 6.1.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Wed Dec 8 21:54:48 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA28155
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 21:54:23 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA03027;
Wed, 8 Dec 1999 21:54:16 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912090254.VAA03027@candle.pha.pa.us>
Subject: Re: [HACKERS] More initdb follies
In-Reply-To: <Pine.LNX.4.20.9912090040450.389-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 9, 1999 01:18:37 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Wed, 8 Dec 1999 21:54:16 -0500 (EST)
CC: hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Question 3: Is there a reason why the template1 database is vacuumed twice
in the process? Once before all the views are created (no analyze) and
once at the very end (with analyze).
Yes, there is a reason, though I can't remember why. We need the
analyze at the end so the system tables are completely optimized, but we
need the earlier vacuum to set some table statistics that don't get set
by the raw load used by initdb. You can try removing the first one to
see if it works.
Seems it works without the first initdb here. I will apply a patch to
remove the first initdb. I think we needed it long ago for some reason.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 8 21:55:49 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA28486
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 21:55:40 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA03055;
Wed, 8 Dec 1999 21:55:35 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912090255.VAA03055@candle.pha.pa.us>
Subject: Re: [HACKERS] More initdb follies
In-Reply-To: <Pine.LNX.4.20.9912090040450.389-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 9, 1999 01:18:37 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Wed, 8 Dec 1999 21:55:35 -0500 (EST)
CC: hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Question 3: Is there a reason why the template1 database is vacuumed twice
in the process? Once before all the views are created (no analyze) and
once at the very end (with analyze).
I see the line before the first vacuum:
# If the COPY is first, the VACUUM generates an error, so we vacuum first
That may have been me adding this. Seems it is no longer an issue.
Removed.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 8 22:27:15 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA02746
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 22:27:14 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by trends.net (8.8.8/8.8.8) with ESMTP id WAA05560
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 22:07:42 -0500 (EST)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id MAA06009;
Thu, 9 Dec 1999 12:01:25 +0900 (JST)
Received: from localhost (IDENT:t-ishii@localhost [127.0.0.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id MAA08296;
Thu, 9 Dec 1999 12:01:24 +0900
To: lockhart@alumni.caltech.edu
Cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] Multibyte in autoconf
In-Reply-To: Your message of "Wed, 08 Dec 1999 15:33:13 +0000"
<384E7A39.8BC2EBEA@alumni.caltech.edu>
References: <384E7A39.8BC2EBEA@alumni.caltech.edu>
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991209120124N.t-ishii@sra.co.jp>
Date: Thu, 09 Dec 1999 12:01:24 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 12
BTW, I don't think the current implmentation of multibyte is not yet
completed. Next target would be NATIONAL CHARATER support (not sure
it's for 7.0, though).I'm still here, interested in working on NATIONAL CHAR and other
character stuff. Will need a multibyte partner though, since I'm not
familiar with all of the issues...
Thanks for the offering. I would need help with the parser and some
other staffs too.
--
Tatsuo Ishii
From bouncefilter Wed Dec 8 22:28:15 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA02782
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 22:27:21 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by trends.net (8.8.8/8.8.8) with ESMTP id WAA05575
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 22:08:13 -0500 (EST)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA03406;
Wed, 8 Dec 1999 22:03:00 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912090303.WAA03406@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: [BUGS] uniqueness not always correct
In-Reply-To: <26891.944668175@sss.pgh.pa.us> from Tom Lane at "Dec 8,
1999 10:49:35 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Wed, 8 Dec 1999 22:03:00 -0500 (EST)
CC: PostgreSQL Developers List <hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Never mind. Fixed. I had forgotten to add a line to pg_amproc.h. So
obvious, hard to imagine how I could have missed it... :-)ERROR: fmgr_info: function 0: cache lookup failed
This seems a mighty unhelpful error message for a missing pg_amproc
entry. Perhaps whatever code is doing the amproc lookup ought to be
checking for a failure and issuing a more specific message? I haven't
looked to see whether that's practical or not...
Not practical. The lookup in fmgr is far away from the rd_strategy load
failure.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 8 22:21:20 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA01316
for <hackers@postgreSQL.org>; Wed, 8 Dec 1999 22:21:13 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA03916;
Wed, 8 Dec 1999 22:20:14 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912090320.WAA03916@candle.pha.pa.us>
Subject: Re: [HACKERS] Table aliases in delete statements?
In-Reply-To: <199912082232.WAA00910@mtcc.demon.co.uk> from Keith Parks at "Dec
8, 1999 10:32:15 pm"
To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Date: Wed, 8 Dec 1999 22:20:14 -0500 (EST)
CC: hackers@postgreSQL.org, geek+@cmu.edu
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Unless your query is going to be long enough to run into query length
limits, aliases are not your friends. Standard SQL they may be, but
aliases always end up obscuring queries to those who come along after
you.The problem is that it's difficult to refer to the same table twice
in a single query without using aliases.The trap I fell into was thinking I had to alias both references to
the table.I'd be interested in seeing alternative solutions to the duplicate
removal problem.
Yes, that is tricky in that there is an aliased version and a non-alias
version of the same table.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 8 23:06:56 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id XAA41910
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 23:06:42 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11vuhQ-0003kGC; Thu, 9 Dec 99 04:57 MET
Message-Id: <m11vuhQ-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Thu, 9 Dec 1999 04:57:00 +0100 (MET)
Cc: wieck@debis.com, lockhart@alumni.caltech.edu, peter_e@gmx.net,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <29191.944704010@sss.pgh.pa.us> from "Tom Lane" at Dec 8,
99 08:46:50 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
The multi session test tool, written in Tcl, is ready.
Looks way cool.
Did I ever say that I love Tcl :-) ?
It took me less that 5 hours to create a full featured tool,
that already discovered another bug (not yet fixed) in the RI
procs, close to that Hiroshi reported (just do the violation
the other way round and it will be accepted).
I know, that there are similar powerful languages availabel
(perl for one). It's just that I looked for a good scripting
language some years ago and found Tcl (version 7.4 at that
time). Today it is such a magic tool for someone, familiar
with the C language, that I think it was one of the best
coices I ever made. Tcl was the first language I ever
embedded as a PL, and the difficulties reported (and yet
missing results) on approaches to embedd other languages tell
the entire story.
Where should it go and how should it be named?
Why not throw it in as another src/bin/ subdirectory, or maybe put it
in Peter's new "src/bin/scripts/" directory? No great ideas for
a name here.
Exactly what I intended to do.
I prefer src/bin, since it isn't a shell script. I think that
"pgmultitest" (my internal development name) wouldn't be such
a bad decision.
The default time for the "wait" command is 5 seconds, but can
be specified explicitly as "wait A 10".It makes me uncomfortable that there are any explicit times at all.
A developer might set up a test script with delays that seem ample
on his hardware, yet will fail when someone tries to use the script
on a much slower and/or heavily loaded system.Can we find a way to avoid needing explicit times in the scripts?
If not, there should probably be a command-line switch that allows all
the times to be scaled by some amount. (Ugly, but could be really
handy.)
Once again, similar thoughts and feelings.
The third parameter should indeed be a value used internally
to ESTIMATE the real time require, to tell that the session
is blocked in a lock operation. And the estimation should be
based on some prior analyzed system performance.
Load peak's might still confuse the estimation. I don't have
any clue right now, how to estimate, but anyway, load peaks
lead to estimator confusions when it comes to estimate the
execution time of some operation.
I don't think, that a few (1-2) seconds of delay at an
expected lock would really hurt. Well, a test stressing the
locking mechanism (like the RI test I want to have), might
take a while, even if executed on high end hardware. But I
cannot imagine any other way, than using multiple sessions
and response timeouts, to detect from the outside that a
query ended in a blocking lock request.
Except we extend the entire FE/BE protocol with information,
telling "I'm blocked" / "I'm resuming" (plus adding
appropriate messages to psql), there is absolutely no way to
avoid the above timeouts. And we don't want to add regression
test requirements to the FE/BE protocol and psql - no? The
already discussed flushing feature is a requirement, but it
might be useful in other situations too and thus worth
anyway.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Dec 8 23:06:56 1999
Received: from osprey.astro.umass.edu (root@osprey.astro.umass.edu
[128.119.51.182]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA40292
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 23:06:03 -0500 (EST)
(envelope-from weinberg@osprey.astro.umass.edu)
Received: (from weinberg@localhost)
by osprey.astro.umass.edu (8.9.3/8.9.3/Debian/GNU) id XAA21251;
Wed, 8 Dec 1999 23:06:01 -0500
Date: Wed, 8 Dec 1999 23:06:01 -0500
Message-Id: <199912090406.XAA21251@osprey.astro.umass.edu>
From: Martin Weinberg <weinberg@osprey.astro.umass.edu>
To: pgsql-hackers@postgresql.org
Cc: weinberg@osprey.astro.umass.edu
Subject: pg_sorttemp hits 2GB during index construction
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
I am trying to make an index on three columns (text, int2, date)
on a table with 193 million records. I believe I am finding that
the pg_sorttemp files reach 2GB before the index finishes.
The backend finishes the index but it's clearly missing tuples.
Does this make sense to you folks?
--Martin
P.S. My text field only contains a single char and I realize that
I was foolish not use a char(1) instead of varchar . . .
From bouncefilter Wed Dec 8 23:33:56 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA04274
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Dec 1999 23:33:43 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id UAA17264;
Wed, 8 Dec 1999 20:32:22 -0800 (PST)
Message-Id: <3.0.1.32.19991208203030.0102ca90@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Wed, 08 Dec 1999 20:30:30 -0800
To: wieck@debis.com (Jan Wieck), tgl@sss.pgh.pa.us (Tom Lane)
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
Cc: wieck@debis.com, lockhart@alumni.caltech.edu, peter_e@gmx.net,
pgsql-hackers@postgreSQL.org
In-Reply-To: <m11vuhQ-0003kGC@orion.SAPserv.Hamburg.dsh.de>
References: <29191.944704010@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 04:57 AM 12/9/99 +0100, Jan Wieck wrote:
I know, that there are similar powerful languages availabel
(perl for one). It's just that I looked for a good scripting
language some years ago and found Tcl (version 7.4 at that
time). Today it is such a magic tool for someone, familiar
with the C language, that I think it was one of the best
coices I ever made.
And this is the scripting language embedded in the NaviSoft, later
AOLserver web server. Your comments pretty much sum things up.
There's an official port of the ArsDigita Community System to postgres
(from Oracle) underway.
This is in some sense the wrong forum to mention such things, but in
another sense it is the right forum, because mainstream database server
companies are pouring everything they've got into "web-ifying" their
tools.
But, really, with a lightweight threaded server like AOLserver and an
excellent Tcl API, middleware and such is really not necessary. We think
the port's going to be excellent, though I'm steadily building up a list
of Postgres bugs to report (I'll wait until I have a dozen or so). One
symptom of PotgreSQL's stability in 6.5.* is that the bugs are of the
reproducible, mostly language-oriented kind and because of this they're
easy to isolate and work-around (not always the truth in a multi-threaded
environment such as typifies AOLserver).
The enthusiasm for this in-progress port's pretty surprising, given that
we only announced it four-five days ago and even then more or less under
duress.
PostgreSQL, though, has the potential to be an ideal web db server for
small-to-mid-range sites. Given that Oracle wants like $22,500 for a
fully paid up license for a single-processor P500, you can understand
the interest for integrating these tools, which have been used to build
a number of high-profile sites.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Wed Dec 8 23:42:56 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA15846
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 23:42:31 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from lorc.wgcr.org (dial-34.r9.ncbrvr.Infoave.Net [206.74.37.162])
by www.wgcr.org (8.8.7/8.8.5) with SMTP id XAA17810
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 23:42:34 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: pgsql-hackers@postgresql.org
Subject: Pooled postgresql backends
Date: Wed, 8 Dec 1999 23:37:37 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <99120823453803.01570@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
Ok, I just had a brainstorm for those who want to get a pooling-capable
postmaster up and running.
Do the following:
1.) Grab the GPL'd AOLserver 3.0 from aolserver.lcs.mit.edu
2.) Strip out the webserver stuff.
3.) Write a communications module for AOLserver that implements the
PostgreSQL FE-BE protocol.
4.) That module then redirects said communications to a backend
under the pool.
5.) Of course, the real postmaster has to run on a different port, as the
AOLserver database driver still will need to initiate connections through
postmaster.
6.) A few other minor issues will need to be handled, such as
multi-database enabling the AOLserver pool mechanism.
Advantages: AOLserver is multithreaded -- this thing could be made quite fast,
with low latency.
Disadvantages: Adds yet another layer of communication, unless some really
creative coding can be done, thus, post-connect throughput is likely to suffer.
AOLserver is GPL'd, so code lifted from it could not be integrated into the main
PostgreSQL tree.
For those who think they need pooled connections and are not already running
AOLServer...
--
Lamar Owen
WGCR Internet Radio
From bouncefilter Wed Dec 8 23:55:56 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA37797
for <pgsql-hackers@postgresql.org>; Wed, 8 Dec 1999 23:55:16 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from lorc.wgcr.org (dial-34.r9.ncbrvr.Infoave.Net [206.74.37.162])
by www.wgcr.org (8.8.7/8.8.5) with SMTP id XAA17831;
Wed, 8 Dec 1999 23:54:56 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: Don Baccus <dhogaza@pacifier.com>, wieck@debis.com (Jan Wieck)
Subject: PostgreSQL front ends (was Re: [HACKERS] Parallel regress tests (was
Re: FOREIGN KEY andshift/reduce))
Date: Wed, 8 Dec 1999 23:47:08 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
Cc: pgsql-hackers@postgresql.org
References: <29191.944704010@sss.pgh.pa.us>
<3.0.1.32.19991208203030.0102ca90@mail.pacifier.com>
In-Reply-To: <3.0.1.32.19991208203030.0102ca90@mail.pacifier.com>
MIME-Version: 1.0
Message-Id: <99120823580104.01570@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
[cc: list trimmed, and subject changed....]
On Wed, 08 Dec 1999, Don Baccus wrote:
At 04:57 AM 12/9/99 +0100, Jan Wieck wrote:
I know, that there are similar powerful languages availabel
(perl for one). It's just that I looked for a good scripting
language some years ago and found Tcl (version 7.4 at that
time). Today it is such a magic tool for someone, familiar
with the C language, that I think it was one of the best
coices I ever made.And this is the scripting language embedded in the NaviSoft, later
AOLserver web server. Your comments pretty much sum things up.
I replied to Jan privately about that, but, since you brought it up on-list....
This is in some sense the wrong forum to mention such things, but in
another sense it is the right forum, because mainstream database server
companies are pouring everything they've got into "web-ifying" their
tools.
Vince almost finished the switch, but got tangled up in the high latency of the
AOLserver developers for 3.0beta3. His comments about the ease of setup were
on the money, but he wanted to use CGI, and CGI is far from AOLserver's strong
suite. The tcl API is the preferred way to do AOLserver hacking.
symptom of PotgreSQL's stability in 6.5.* is that the bugs are of the
reproducible, mostly language-oriented kind and because of this they're
easy to isolate and work-around (not always the truth in a multi-threaded
environment such as typifies AOLserver).
As opposed to PostgreSQL 6.2.1, the first version that was officially supported
by the AOLserver crew. PostgreSQL has come a long way!
PostgreSQL, though, has the potential to be an ideal web db server for
small-to-mid-range sites.
The use of AOLserver+Tcl+PostgreSQL has the potential to far surpass the speed
of Apache+mod_perl+mySQL -- or Apache+mod_php+mySQL.
To quote Philip Greenspun, AOLserver is now handling 28 thousand hits at AOL.
Oh, that's 28K hits _per_second_ aggregate over AOL's server farm.
IMO,. AOLserver is far and away the best web front end for PostgreSQL. And
that's my final answer.
--
Lamar Owen
WGCR Internet Radio
From bouncefilter Thu Dec 9 00:03:58 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA56452
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 00:03:05 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA08173;
Thu, 9 Dec 1999 00:02:13 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912090502.AAA08173@candle.pha.pa.us>
Subject: Re: [HACKERS] Small timezone bug fixed
In-Reply-To: <4.2.0.58.19991208174034.00955220@mail.design.nl> from Jeroen van
Vianen at "Dec 8, 1999 05:56:21 pm"
To: Jeroen van Vianen <jeroen@design.nl>
Date: Thu, 9 Dec 1999 00:02:13 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Applied.
Hi,
I was able to crash postgres 6.5.3 when I did an 'alter user' command.
After I started a debugger I found the problem in the timezone handling of
datetime (my Linux box lost its timezone information, that's how the
problem occurred).Only 7 bytes are reserved for the timezone, without checking for boundaries.
Attached is a patch that fixes this problem and emits a NOTICE if a
timezone is encountered that is longer than MAXTZLEN bytes, like this:template1=# alter user postgres with password postgres;
NOTICE: Invalid timezone 'Local time zone must be set--see zic manual page'
NOTICE: Invalid timezone 'Local time zone must be set--see zic manual page'
ALTER USERI don't know whether the timezone should be reset to some predefined
constant (like "GMT") if an error like this occurs. This patch at least
directs the user in a general direction that something is wrong with his setup.Cheers,
Jeroen
[Attachment, skipping...]
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 9 01:21:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA64940
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 01:21:52 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA07231;
Thu, 9 Dec 1999 01:20:49 -0500 (EST)
To: Martin Weinberg <weinberg@osprey.astro.umass.edu>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] pg_sorttemp hits 2GB during index construction
In-reply-to: Your message of Wed, 8 Dec 1999 23:06:01 -0500
<199912090406.XAA21251@osprey.astro.umass.edu>
Date: Thu, 09 Dec 1999 01:20:48 -0500
Message-ID: <7229.944720448@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Martin Weinberg <weinberg@osprey.astro.umass.edu> writes:
I am trying to make an index on three columns (text, int2, date)
on a table with 193 million records. I believe I am finding that
the pg_sorttemp files reach 2GB before the index finishes.
2GB/193million is only about 10 (bytes per index tuple), and your
index tuples obviously will need more than 10 bytes apiece, so
yeah, you can't do that in 6.5.*. It'd lose even without the fact
that sorts in 6.5.* require more space than the actual data volume.
One possible workaround is to define the indexes while the table
is empty and then fill the table. You could probably have not only
a coffee break but a full-course meal while the data is loading,
but at least it'd work.
The backend finishes the index but it's clearly missing tuples.
Yeah :-(. The 6.5 sort code fails to notice write errors on the temp
files, so lost tuples would be the likely result of file overflow.
These problems are fixed in current sources, but I dunno if you
want to run bleeding-edge development code just to get work done...
regards, tom lane
From bouncefilter Thu Dec 9 01:31:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA66135
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 01:31:23 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA07302;
Thu, 9 Dec 1999 01:30:19 -0500 (EST)
To: Don Baccus <dhogaza@pacifier.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
In-reply-to: Your message of Wed, 08 Dec 1999 20:30:30 -0800
<3.0.1.32.19991208203030.0102ca90@mail.pacifier.com>
Date: Thu, 09 Dec 1999 01:30:19 -0500
Message-ID: <7300.944721019@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Don Baccus <dhogaza@pacifier.com> writes:
the port's going to be excellent, though I'm steadily building up a list
of Postgres bugs to report (I'll wait until I have a dozen or so).
Actually, I think it's easier to keep track of things if you file bug
reports as separate messages, rather than one big message that lists a
bunch of unrelated problems. So feel free to send 'em in as you find
'em.
regards, tom lane
From bouncefilter Thu Dec 9 02:31:58 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA71259
for <pgsql-interfaces@hub.org>; Thu, 9 Dec 1999 02:31:19 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11vy2o-0003Ya-0K; Thu, 9 Dec 1999 07:31:19 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA11245;
Thu, 9 Dec 1999 09:02:20 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV3GS>; Thu, 9 Dec 1999 07:28:12 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF32@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Assaf Arkin'" <arkin@exoffice.com>, Peter Mount
<petermount@it.maidstone.gov.uk>
Cc: pgsql-interfaces@hub.org, "'pgsql-hackers@postgresql.org'"
<pgsql-hackers@postgresql.org>
Subject: RE: [INTERFACES] Transaction support in 6.5.3/JDBC
Date: Thu, 9 Dec 1999 07:28:11 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
[Hackers: Can anyone comment on my idea on how point 1 below could be
done, or not if thats the case? Thanks, Peter]
-----Original Message-----
From: Assaf Arkin [mailto:arkin@exoffice.com]
Sent: Wednesday, December 08, 1999 7:41 PM
To: Peter Mount
Cc: pgsql-interfaces@hub.org
Subject: Re: [INTERFACES] Transaction support in 6.5.3/JDBC
PM: JDBC based code should never issue begin/commit/rollback commands,
and should use the similarly named methods in Connection. This is
because a JDBC driver could be issuing these statements internally,
and
it would be confused. With our driver, you could currently get away
with
it, but it's not guaranteed to stay that way.
Inside a transaction, the application should not even use
commit/rollback on the JDBC connection, only through the transaction
monitor API. This is easy to solve, I simply return a ClientConnection
wrapper that prevents that. But someone can still send a commit/rollback
statement directly through the JDBC driver.
What I'm more afraid of is some operation that will cause a
commit/rollback to occur, e.g. a failed update, a trigger or stored
procedure.
PM: This is tricky. Some JDBC drivers do parse the SQL before sending to
the backend, but we dont - mainly because its faster to let the
backend's parser do the job, and also it keeps our size down. The latter
affects applet users more than anything else.
PM: I suppose we could add a check for the simplest cases, ie sql
containing just "begin" "commit" "rollback" etc, but it won't catch all
possible cases.
PM: Hmmm, in theory if a transaction is in a dead state (ie: an SQL
statement failed, so anything else is ignored until the rollback),
there
should be a message in the notify queue. Our JDBC driver keeps these
in
the warnings queue, so you could read them prior to calling commit()
yourself.
Thanks I'll try to look that out.
I've minimized all the special requirements I need from the driver to
three methods calls:
1. enbleSQLTransactions -- prevents a commit/rollback from being
executed directly in SQL; you can never be too careful ;-)
PM: I wonder if we can get this functionality in the backend's parser -
ie, for the API interfaces, they can set a variable on startup that
disables begin, commit and rollback, then when they need to use them, it
can then either temporarily clear the variable, or use a prefix that
forces the statement to work?
PM: enableSQLTransactions can then act immediately above this
functionality.
2. prepare -- should return false if the transaction is read-only, true
if it will commit, throw an exception if it will rollback
3. isCriticalError -- should tell me if a critical error occured in the
connection and the connection is no longer useable
How do I detect no. 3? Is there are certain range of error codes, should
I just look at certain PSQLExceptions as being critial (e.g. all I/O
related errors)?
PM: Don't rely on the text returned from PSQLException to be in English.
We are pretty unique in that the driver will return an error message in
the language defined by the locale of the client (also depends on if we
have translated the errors into that language). What I could to is add a
method to PSQLException that returns the original id of the Exception,
and another to return the arguments supplied. That may make your code
more portable.
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
From bouncefilter Thu Dec 9 04:03:59 1999
Received: from mail.ngi.de ([195.243.0.227])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA82237
for <hackers@postgresql.org>; Thu, 9 Dec 1999 04:03:52 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: from p3E9D3DE3.dip0.t-ipconnect.de
(root@p3E9D3DE3.dip0.t-ipconnect.de [62.157.61.227])
by mail.ngi.de (8.9.3/8.9.3) with ESMTP id JAA25522;
Thu, 9 Dec 1999 09:54:24 +0100 (CET)
(envelope-from michael@fam-meskes.de)
Received: (from michael@localhost)
by tanja.fam-meskes.de (8.9.3/8.9.3/Debian 8.9.3-6) id IAA02260;
Thu, 9 Dec 1999 08:43:51 +0100
Date: Thu, 9 Dec 1999 08:43:51 +0100
From: Michael Meskes <meskes@postgresql.org>
To: Gunther Schadow <gunther@aurora.rg.iupui.edu>
Cc: "hackers@postgreSQL.org" <hackers@postgresql.org>
Subject: Re: [HACKERS] Advanced projects ... anyone interested?
Message-ID: <19991209084351.A2250@fam-meskes.de>
Mail-Followup-To: Gunther Schadow <gunther@aurora.rg.iupui.edu>,
"hackers@postgreSQL.org" <hackers@postgresql.org>
References: <384EBC57.78AECDDB@aurora.rg.iupui.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0i
In-Reply-To: <384EBC57.78AECDDB@aurora.rg.iupui.edu>;
from gunther@aurora.rg.iupui.edu on Wed, Dec 08, 1999 at
03:15:19PM -0500
On Wed, Dec 08, 1999 at 03:15:19PM -0500, Gunther Schadow wrote:
is anyone interested in, or actually working on advanced issues
with PostgreSQL, like:
Yes and no.
- recursive queries and transitive closure optimization
Yup, that's the topic I'm interested in.
I am planning to use PostgreSQL for medical information and medical
knowledge, so I run into all these problems. I wonder whether it
makes sense to tweak on PostgreSQL for these matters or whether a
more generic approach (where the client does all the advanced stuff)
is more realistic.
IMO the backend should be expanded to handle this stuff. In fact I had
actual plans to add the recursive stuff but have not even found enough time
to dig into the source code.
For those who don't know, I made my Ph.D. in deductive database systems
which is mostly about recursive queries and transitive closures.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Thu Dec 9 02:49:58 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA73062
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 02:49:08 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11vyK4-0005DV-0K; Thu, 9 Dec 1999 07:49:08 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA11325;
Thu, 9 Dec 1999 09:20:09 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV3G6>; Thu, 9 Dec 1999 07:46:01 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF35@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Lamar Owen'" <lamar.owen@wgcr.org>, pgsql-hackers@postgresql.org
Subject: RE: [HACKERS] Pooled postgresql backends
Date: Thu, 9 Dec 1999 07:46:00 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
There's a small connection pool manager class for JDBC in the
src/interfaces/jdbc/example/corba directory. Ok, it doesn't implement
the FE-BE protocol, but does hand out already open Connections.
It's simple, but it works.
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Lamar Owen [mailto:lamar.owen@wgcr.org]
Sent: Thursday, December 09, 1999 4:38 AM
To: pgsql-hackers@postgreSQL.org
Subject: [HACKERS] Pooled postgresql backends
Ok, I just had a brainstorm for those who want to get a pooling-capable
postmaster up and running.
Do the following:
1.) Grab the GPL'd AOLserver 3.0 from aolserver.lcs.mit.edu
2.) Strip out the webserver stuff.
3.) Write a communications module for AOLserver that implements the
PostgreSQL FE-BE protocol.
4.) That module then redirects said communications to a backend
under the pool.
5.) Of course, the real postmaster has to run on a different port,
as the
AOLserver database driver still will need to initiate connections
through
postmaster.
6.) A few other minor issues will need to be handled, such as
multi-database enabling the AOLserver pool mechanism.
Advantages: AOLserver is multithreaded -- this thing could be made quite
fast,
with low latency.
Disadvantages: Adds yet another layer of communication, unless some
really
creative coding can be done, thus, post-connect throughput is likely to
suffer.
AOLserver is GPL'd, so code lifted from it could not be integrated into
the main
PostgreSQL tree.
For those who think they need pooled connections and are not already
running
AOLServer...
--
Lamar Owen
WGCR Internet Radio
************
From bouncefilter Thu Dec 9 07:07:01 1999
Received: from mail.enterprise.net (mail.enterprise.net [194.72.192.18])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA00408
for <hackers@postgreSQL.org>; Thu, 9 Dec 1999 07:06:34 -0500 (EST)
(envelope-from olly@lfix.co.uk)
Received: from linda.lfix.co.uk (root@max01-014.enterprise.net
[194.72.195.14])
by mail.enterprise.net (8.8.5/8.8.5) with ESMTP id LAA08378;
Thu, 9 Dec 1999 11:14:33 GMT
Received: from lfix.co.uk (olly@localhost [127.0.0.1])
by linda.lfix.co.uk (8.9.3/8.9.3/Debian 8.9.3-6) with ESMTP id LAA09862;
Thu, 9 Dec 1999 11:14:28 GMT
Message-Id: <199912091114.LAA09862@linda.lfix.co.uk>
X-Authentication-Warning: linda.lfix.co.uk: Host olly@localhost [127.0.0.1]
claimed to be lfix.co.uk
X-Mailer: exmh version 2.1.1 10/15/1999 (debian)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org, olly@linda.lfix.co.uk
Subject: Re: [HACKERS] More initdb follies
In-Reply-To: Message from Peter Eisentraut <peter_e@gmx.net> of "Thu,
09 Dec 1999 01:18:37 +0100."
<Pine.LNX.4.20.9912090040450.389-100000@localhost.localdomain>
References: <Pine.LNX.4.20.9912090040450.389-100000@localhost.localdomain>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0
Date: Thu, 09 Dec 1999 11:14:28 +0000
From: "Oliver Elphick" <olly@lfix.co.uk>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id HAA00434
Peter Eisentraut wrote:
In my digging around in initdb, I came to the --username option, which
supposedly allows you to initialize the database system with another
username. Not a bad idea, really.Obviously, you'd have to be root in that case, because you want to create
files in someone else's name. But if you are root, the backends will
refuse to execute, wisely so. So this option is totally broken.I propose that I remove it, and that it instead be possible that you can
doroot# su -l postgres -c 'initdb ...'
You can already do this; this example is from the Debian package installation
(which runs as root, of course):
su postgres -c "cd ${PGHOME}; . ./${PROFILE}; initdb -e ${Encoding} -l
${PGLIB} -r ${PGDATA} -u postgres"
It can be quite tricky, though, since there are a number of different su
versions around. I would prefer it if root were able to run initdb directly
and set the ownerships as part of the process. The ability to run as root
should only apply to initdb.
--
Vote against SPAM: http://www.politik-digital.de/spam/
========================================
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"Let not sin therefore reign in your mortal body, that
ye should obey it in the lusts thereof."
Romans 6:12
From bouncefilter Mon Dec 27 08:12:35 1999
Received: from mx02.gis.net ([208.218.130.7])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA84222
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 08:12:30 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from laptop.pacifier.com (nas-1-58.boston.navinet.net [216.67.1.58])
by mx02.gis.net (8.8.8/8.8.8+pyrd) with SMTP id IAA12164;
Mon, 27 Dec 1999 08:12:15 -0500 (EST)
Message-Id: <3.0.1.32.19991209031733.00ecfd20@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 09 Dec 1999 03:17:33 -0800
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] memory dilemma
In-Reply-To: <Pine.LNX.3.96.991227124802.6398D-100000@ara.zf.jcu.cz>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 01:40 PM 12/27/99 +0100, Karel Zak - Zakkr wrote:
not use cache - hmm.. but I like fast routines (my current
to_char() implementation is faster (20-50%) than current
date_part()).
While fast routines are nice indeed, isn't it true in practice
that to_char() times will be swamped by the amount of time to
parse, plan, and execute a query in most cases?
Trivial cases like "select to_char('now'::datetime,...)" can't in
general be cached anyway, since 'now' is always changing...
Your caching code needs to guarantee that it can't leak memory
in any circumstance. In environments where database servers
run 24/7 that's far more important than minor increases in
speed.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Dec 9 11:10:15 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA29943
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 11:09:58 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id IAA14217;
Thu, 9 Dec 1999 08:09:09 -0800 (PST)
Message-Id: <3.0.1.32.19991209074430.00e52590@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 09 Dec 1999 07:44:30 -0800
To: Lamar Owen <lamar.owen@wgcr.org>, wieck@debis.com (Jan Wieck)
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: PostgreSQL front ends (was Re: [HACKERS] Parallel regress
tests (was Re: FOREIGN KEY andshift/reduce))
Cc: pgsql-hackers@postgreSQL.org
In-Reply-To: <99120823580104.01570@lorc.wgcr.org>
References: <3.0.1.32.19991208203030.0102ca90@mail.pacifier.com>
<29191.944704010@sss.pgh.pa.us>
<3.0.1.32.19991208203030.0102ca90@mail.pacifier.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 11:47 PM 12/8/99 -0500, Lamar Owen wrote:
Vince almost finished the switch, but got tangled up in the high latency
of the
AOLserver developers for 3.0beta3. His comments about the ease of setup were
on the money, but he wanted to use CGI, and CGI is far from AOLserver's
strong
suite. The tcl API is the preferred way to do AOLserver hacking.
The PHP folks have claimed that they'll have an embedded interpreter
for AOLserver for their next release. It's not clear that they'll
duplicate the rich API the server provides Tcl though. If they do,
this will be an alternative for those who don't like Tcl or AOLserver's
ADPs (HTML with embedded Tcl snippets)
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Dec 9 11:10:04 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA29875
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 11:09:30 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id IAA14298
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 08:09:23 -0800 (PST)
Message-Id: <3.0.1.32.19991209075431.00e56ec0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 09 Dec 1999 07:54:31 -0800
To: pgsql-hackers@postgreSQL.org
From: Don Baccus <dhogaza@pacifier.com>
Subject: alter table crashes back end
In-Reply-To: <7300.944721019@sss.pgh.pa.us>
References: <Your message of Wed, 08 Dec 1999 20:30:30 -0800
<3.0.1.32.19991208203030.0102ca90@mail.pacifier.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
As I've mentioned previously, I'm porting over a web toolkit
from Oracle to Postgres.
One portion of the toolkit creates and alters tables to add
user-defined fields into what's being used essentially as a
meta-table (used to later define real tables). One page
forgets to check for an empty form before issuing its
"alter table" command, and it crashed the backend. I'm
correcting its forgetfulness, but am also reporting the
problem:
alter table foo add;
gives a parser error, which is fine.
alter table foo add();
crashes the backend.
I'd say it's really low priority, but should be fixed.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Mon Dec 27 12:54:38 1999
Received: from mx01.gis.net ([208.218.130.25])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA46945
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 12:54:04 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from laptop.pacifier.com (nas-41-55.boston.navinet.net
[216.67.41.55]) by mx01.gis.net (8.8.8/8.8.8+pyrd) with SMTP id
MAA11565; Mon, 27 Dec 1999 12:53:58 -0500 (EST)
Message-Id: <3.0.1.32.19991209075728.00ed7538@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 09 Dec 1999 07:57:28 -0800
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] memory dilemma
Cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
In-Reply-To: <Pine.LNX.3.96.991227140248.7354A-100000@ara.zf.jcu.cz>
References: <3.0.1.32.19991209031733.00ecfd20@mail.pacifier.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 02:26 PM 12/27/99 +0100, Karel Zak - Zakkr wrote:
Sorry, but it is not good argument. If any routine (in the query path)
spend time is not interesting write (other) fast routine? No, we must
try rewrite this slowly part to faster version.*Very* simpl test over 10000 rows:
$ time psql test -c "select date_part('second', d)
from dtest;" -o /dev/nullreal 0m0.504s
user 0m0.100s
sys 0m0.000s$ time psql test -c "select to_char(d, 'SI') from
dtest;" -o /dev/nullreal 0m0.288s
user 0m0.100s
sys 0m0.000s
This would seem to be a great argument to investigate why
date_part's so much slower. However, it says nothing about
the times saving of caching vs. not caching.
A more interesting comparison, more germane to the point under
discussion, would be:
time psql test -c "select d from dtest;"
In other words, how much overhead does "to_char" add? That's what
you need to look at if you want to measure whether or not caching's
worth it. Caching the parse of the format string will save a
percentage of the to_char overhead, but a test like the above
will at least help you get a handle on how much overhead the
format string parse adds.
Your caching code needs to guarantee that it can't leak memory
in any circumstance. In environments where database servers
run 24/7 that's far more important than minor increases in
speed.
Yes, I agree - robus SQL is more importent, but always say "speed is not
interesting, we can robus only" is way to robus-snail-SQL.
Which, of course, isn't what I said...after all, I've spent most of
my adult life writing highly optimizing compilers. I merely asked
if a typical query wouldn't swamp any savings that caching the
parse of a format string might yield.
I want nice-robus-fast-SQL :-)
Sure, but given the great disparity between "date_part" and your
initial "to_char" implementation, more people might see a more
significant speed-up if you spent time speeding up "date_part"...
of course, if caching greatly speeds up queries using "to_char"
then it's probably worth doing, but at least try to measure first
before adding the complication.
At least, that's how I tend to work...
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Dec 9 11:10:05 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA29878
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 11:09:31 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id IAA14304
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 08:09:23 -0800 (PST)
Message-Id: <3.0.1.32.19991209080050.00e553f0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 09 Dec 1999 08:00:50 -0800
To: pgsql-hackers@postgreSQL.org
From: Don Baccus <dhogaza@pacifier.com>
Subject: check contraints incorrectly reject "null"
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Given a table definition like:
create table foo (i integer check (i > 0));
I noticed the following works in Oracle but fails in Postgres:
insert into foo values(null);
I was curious about what the standard might say, and had been
meaning to buy Date's book for some time, so broke down and
did so.
According to Date, a check contraint should fail if the expression
evaluates to false. It appears that Postgres only passes the
check constraint if it evaluates to true. In three-valued logic,
these statements aren't equivalent. He has a paragraph about
nulls and check contraints in chapter 14, I believe, and his
explanation makes it clear that Oracle is right, Postgres wrong.
It's easy to fix by adding a check for null to the constraint,
and afterwards the SQL still works with Oracle, but it's still
a bug...
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Dec 9 14:20:08 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA02971
for <pgsql-interfaces@hub.org>; Thu, 9 Dec 1999 14:19:21 -0500 (EST)
(envelope-from arkin@exoffice.com)
Received: from arkin.exoffice.com (root@[207.33.160.104])
by trends.net (8.8.8/8.8.8) with ESMTP id NAA11070
for <pgsql-interfaces@hub.org>; Thu, 9 Dec 1999 13:34:49 -0500 (EST)
Received: from exoffice.com (IDENT:arkin@arkin.exoffice.com [207.33.160.104])
by arkin.exoffice.com (8.9.3/8.9.3) with ESMTP id KAA00994;
Thu, 9 Dec 1999 10:42:44 -0800
Sender: arkin@arkin.exoffice.com
Message-ID: <384FF823.93EBC358@exoffice.com>
Date: Thu, 09 Dec 1999 10:42:43 -0800
From: Assaf Arkin <arkin@exoffice.com>
Organization: Exoffice
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Mount <petermount@it.maidstone.gov.uk>
CC: pgsql-interfaces@hub.org,
"'pgsql-hackers@postgresql.org'" <pgsql-hackers@postgresql.org>
Subject: Re: [INTERFACES] Transaction support in 6.5.3/JDBC
References:
<1B3D5E532D18D311861A00600865478C70BF32@exchange1.nt.maidstone.gov.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
PM: I wonder if we can get this functionality in the backend's parser -
ie, for the API interfaces, they can set a variable on startup that
disables begin, commit and rollback, then when they need to use them, it
can then either temporarily clear the variable, or use a prefix that
forces the statement to work?PM: enableSQLTransactions can then act immediately above this
functionality.
That's what I was hoping for.
2. prepare -- should return false if the transaction is read-only, true
if it will commit, throw an exception if it will rollback
Works fine now that I've added a check for *ABORT STATUS*.
3. isCriticalError -- should tell me if a critical error occured in the
connection and the connection is no longer useableHow do I detect no. 3? Is there are certain range of error codes, should
I just look at certain PSQLExceptions as being critial (e.g. all I/O
related errors)?PM: Don't rely on the text returned from PSQLException to be in English.
We are pretty unique in that the driver will return an error message in
the language defined by the locale of the client (also depends on if we
have translated the errors into that language). What I could to is add a
method to PSQLException that returns the original id of the Exception,
and another to return the arguments supplied. That may make your code
more portable.
I'm not looking into the messages, I know their language dependent. I
even added two or three new error messages, but only in English.
I'm looking for either specific error codes, range of error codes, or
some class extending PSQLException that will just indicate that this
connection is no longer useful. For example, if an I/O error occurs,
there's no ReadyForQuery reply, there's garbled response, etc.
arkin
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.************
--
____________________________________________________________
Assaf Arkin arkin@exoffice.com
CTO http://www.exoffice.com
Exoffice, The ExoLab Company tel: (650) 259-9796
From bouncefilter Thu Dec 9 14:51:08 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id OAA01587
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 14:50:56 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11w9TB-0003kGC; Thu, 9 Dec 99 20:43 MET
Message-Id: <m11w9TB-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Weired FK problem
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Thu, 9 Dec 1999 20:43:17 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
I need someone to enlighten me!
Have this setup
create table t1 (a int4 primary key);
create table t2 (b int4 references t1 match full
on delete restrict
on update restrict);
Now I use two sessions:
(S1) insert into t1 values (1);
(S1) begin;
(S1) delete from t1 where a = 1;
(S2) insert into t2 values (1);
(S2) -- Session is now blocked
(S1) commit;
(S2) -- Bails out with the correct violation message.
Now the other way round:
(S1) insert into t1 values (1);
(S1) begin;
(S1) insert into t2 values (1);
(S2) delete from t1 where a = 1;
(S2) -- Session is now blocked
(S1) commit;
(S2) -- Session continues without error
The interesting thing is, that in both cases the trigger
procs use a
SELECT oid FROM ... FOR UPDATE ...
In the first case, where the primary key has been deleted
first, the triggers SELECT does not find the deleted row
anymore. But in the second case, the freshly inserted
referencing row doesn't show up.
Why are the visibilities different between INSERTED and
DELETED tuples?
I tried to acquire an exclusive table lock before beginning
the scan, to increment the command counter at various
different places, but nothing helped so far. The inserted row
is invisible for this trigger invocation. The next command
in the transaction can see it, but that's too late.
What state must be changed by the trigger to make it visible?
What confuses me totally is the fact, that S2 does block
already at the attempt to delete from t1, not down in the
trigger. This is because S1 executed a SELECT FOR UPDATE due
to the insertion check trigger on t2. So S2 has no active
scans or the like on the FK table at the time S2 blocks. I
think it's a general bug in the visibility code - no?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Dec 9 16:17:08 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id QAA08494
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 16:16:26 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wAo3-0003kGC; Thu, 9 Dec 99 22:08 MET
Message-Id: <m11wAo3-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Weired FK problem
To: wieck@debis.com
Date: Thu, 9 Dec 1999 22:08:55 +0100 (MET)
Cc: pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <m11w9TB-0003kGC@orion.SAPserv.Hamburg.dsh.de> from "Jan Wieck"
at Dec 9, 99 08:43:17 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Why are the visibilities different between INSERTED and
DELETED tuples?
There's something weired going on. As far as I read the code
in tqual.c, all changes done by transactions that started
before and committed after my own transaction should be
invisible.
In the case that works now (PK deleted while FK is inserted),
HeapTupleSatisfiesSnapshot() tells, that the PK tuple is
still alive. But then it should be locked (for update), the
process blocks, and when the deleter commits it somehow
magically doesn't make it into the SPI return set.
Anyway, this visibility mechanism can never work with
referential integrity constraints.
At least the RI trigger procedures need some way to override
this snapshot qualification temporary, so the check's will
see what's committed, regardless who did it and when -
committed is committed, basta.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Dec 9 17:00:09 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA15270
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 16:59:43 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
QAA12255;
Thu, 9 Dec 1999 16:58:02 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912092158.QAA12255@candle.pha.pa.us>
Subject: Re: [HACKERS] Weired FK problem
In-Reply-To: <m11wAo3-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 9, 1999 10:08:55 pm"
To: Jan Wieck <wieck@debis.com>
Date: Thu, 9 Dec 1999 16:58:02 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Why are the visibilities different between INSERTED and
DELETED tuples?There's something weired going on. As far as I read the code
in tqual.c, all changes done by transactions that started
before and committed after my own transaction should be
invisible.In the case that works now (PK deleted while FK is inserted),
HeapTupleSatisfiesSnapshot() tells, that the PK tuple is
still alive. But then it should be locked (for update), the
process blocks, and when the deleter commits it somehow
magically doesn't make it into the SPI return set.Anyway, this visibility mechanism can never work with
referential integrity constraints.At least the RI trigger procedures need some way to override
this snapshot qualification temporary, so the check's will
see what's committed, regardless who did it and when -
committed is committed, basta.
I stared at your first e-mail for quite some time, and couldn't figure
out what was happening. This second e-mail clears it up. The code:
(S1) insert into t1 values (1);
(S1) begin;
(S1) insert into t2 values (1);
(S2) delete from t1 where a = 1;
(S2) -- Session is now blocked
(S1) commit;
When S1 does the INSERT and commit, it sees the row still in T1, so the
commit works. When the commit completes, the delete is performed.
My guess is that the T1 delete by S2 started before the S1 committed,
and that is why it doesn't see the actual insert from S1.
Maybe we can talk on IRC about this. It looks like a tough issue, and I
don't understand most of it.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 02:11:57 1999
Received: from ns2.kdt.de (ns2.kdt.de [195.8.224.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA63561
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 02:11:40 -0500 (EST)
(envelope-from christof.petig@wtal.de)
Received: from gateway.petig.de (line0017lf.kdt.de [195.8.241.17])
by ns2.kdt.de (8.8.8/8.8.8) with ESMTP id IAA20253
for <pgsql-hackers@postgresql.org>; Fri, 10 Dec 1999 08:11:38 +0100
Received: from wtal.de (christof@[192.168.230.9])
by gateway (8.8.8/8.8.8) with ESMTP id HAA13972
for <pgsql-hackers@postgresql.org>; Fri, 10 Dec 1999 07:41:05 +0100
Sender: christof@to.wtal.de
Message-ID: <3850299F.C86DEFD6@wtal.de>
Date: Thu, 09 Dec 1999 23:13:51 +0100
From: Christof Petig <christof.petig@wtal.de>
Organization: Adolf Petig GmbH. & Co. KG
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.7 i586)
X-Accept-Language: de
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: Volunteer: Large Tuples / Tuple chaining
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
I'll donate some (read all freely available) of my spare time to
implementing tuple
chaining. It looks like this feature is most wanted and it would be a
pity to hold this until post 7.0. Personally I don't need it, yet ...
But I will definitely find a use for it once available ;-) And it looks
like a good start for hacking on pgsql.
I already dived into the depth of pgsql's page and tuple structures and
it looks like it is possible. But before I start coding I would like to
hear some more experienced opinions on how to implement it.
Did you alread discuss technical matters about the implementation? How
can I get in touch with it? (Simply browse the mailing list archives?)
Here's a layout how I imagine the work:
What is needed:
- lay out a tuple continuation structure
- put tuple into multiple chunks when pages are considered, reconcile
when
loaded from disk
(how to continue a tuple - need a structure)
how is a tuple (read page item) addressed? ItemPointerData
I imagine to store a continuation address as the last bytes of the
tuple unless it
fits into one page.
I need to mark large tuples (how, just one flag in tuple)
How to tell a maximum possible size last block from a continued
(which carries a pointer to the next one at its end)?
Or don't care: make item continued and put last 6(?) bytes into a new
block
- note that the continued tuples are not referenced directly (vacuum?)
mark them as used. I hope vacuum operates on a tuple basis and has no
concept of
pages
- I guess that the tuple pointer points into page memory, if multiple
pages
are concatenated for a tuple, these pages must not reside in memory
but
the full tuple's memory must be allocated (from a memory similar to
pages)
(shared mem?)
- should be possible for memory only pages
see PageGetPageSize but od_pagesize is 16bit!
Reuse another variable? Another type of page? (32bit od_pagesize)
Very fascinated by this large beast of ancient code to explore
Christof
PS: I think the documentation on page layout is far outdated (or points
into the future since it speaks about ItemContinuationData structures.)
Should I update it?
The table doesn't match actual structure components. At least I don't
understand what it's about. The source code mentions a different page
layout.
PPS: Do not pity me, I have ten+ years of coding experience in C.
PPPS: Could someone in few words tell me what an access method is (a
tuple is an access method, log pages are another?)
From bouncefilter Thu Dec 9 18:48:02 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA02000
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 18:47:33 -0500 (EST)
(envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id IAA01235; Fri, 10 Dec 1999 08:47:17 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Jan Wieck" <wieck@debis.com>
Cc: <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] Weired FK problem
Date: Fri, 10 Dec 1999 08:52:11 +0900
Message-ID: <000501bf42a0$68f2b3c0$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <m11wAo3-0003kGC@orion.SAPserv.Hamburg.dsh.de>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Jan WieckWhy are the visibilities different between INSERTED and
DELETED tuples?There's something weired going on. As far as I read the code
in tqual.c, all changes done by transactions that started
before and committed after my own transaction should be
invisible.In the case that works now (PK deleted while FK is inserted),
HeapTupleSatisfiesSnapshot() tells, that the PK tuple is
still alive. But then it should be locked (for update), the
process blocks, and when the deleter commits it somehow
magically doesn't make it into the SPI return set.Anyway, this visibility mechanism can never work with
referential integrity constraints.At least the RI trigger procedures need some way to override
this snapshot qualification temporary, so the check's will
see what's committed, regardless who did it and when -
committed is committed, basta.
There's no user level method which allows to see being inserted
tuples of other backends now.
As Vadim suggested before in a discussion between you,
SnapshotDirty is needed to see uncommitted tuples of other
backends.
IIRC,duplicate index check for unique indexes is a unique case
that uses this dirty read technique currently.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Thu Dec 9 19:36:02 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id TAA11008
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 19:35:12 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wDuP-0003kGC; Fri, 10 Dec 99 01:27 MET
Message-Id: <m11wDuP-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Weired FK problem
To: Inoue@tpf.co.jp (Hiroshi Inoue)
Date: Fri, 10 Dec 1999 01:27:41 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <000501bf42a0$68f2b3c0$2801007e@cadzone.tpf.co.jp> from "Hiroshi
Inoue" at Dec 10, 99 08:52:11 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hiroshi Inoue wrote:
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Jan WieckAt least the RI trigger procedures need some way to override
this snapshot qualification temporary, so the check's will
see what's committed, regardless who did it and when -
committed is committed, basta.There's no user level method which allows to see being inserted
tuples of other backends now.
As Vadim suggested before in a discussion between you,
SnapshotDirty is needed to see uncommitted tuples of other
backends.
IIRC,duplicate index check for unique indexes is a unique case
that uses this dirty read technique currently.
Thanks - yes that was some issue at the time I totally
underestimated the entire complexity and (silly as I am)
thought RI could be implemented with rules.
Anyway, the locking, RI triggers do internally by doing all
their internal SELECT's with FOR UPDATE, seems to help much.
Actually I'm playing with another global bool, that the
triggers set. It simply causes HeapTupleSatisfiesSnapshot()
to forward the check into HeapTupleSatisfiesNow(). It is
reset on every transaction start and after any AFTER ROW
trigger call. So far it seems to do the job perfectly.
What I found out so far is this: The only problem, the
locking wasn't able to catch, is the case, where an IMMEDIATE
RESTRICT trigger successfully checked, that no references
exist, while another transaction was inserting exactly that
and still saw the PK alive. Looking up with snapshot NOW does
the trick, because it sees anything committed, and the
locking guarantees that this lookup is delayed until the
other ones transaction ended.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Dec 9 19:39:02 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA11223
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 19:38:05 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id TAA10055;
Thu, 9 Dec 1999 19:36:16 -0500 (EST)
To: Don Baccus <dhogaza@pacifier.com>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] check contraints incorrectly reject "null"
In-reply-to: Your message of Thu, 09 Dec 1999 08:00:50 -0800
<3.0.1.32.19991209080050.00e553f0@mail.pacifier.com>
Date: Thu, 09 Dec 1999 19:36:16 -0500
Message-ID: <10053.944786176@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Don Baccus <dhogaza@pacifier.com> writes:
According to Date, a check contraint should fail if the expression
evaluates to false.
And SQL92 says:
A table check constraint is satisfied if and only if the specified
<search condition> is not false for any row of a table.
^^^^^^^^^
so they agree: a constraint that yields NULL should be considered
to pass. A tad nonintuitive, but who am I to argue...
I have fixed several bugs recently having to do with incorrect
evaluation of three-state boolean logic. I'll take care of this one.
regards, tom lane
From bouncefilter Thu Dec 9 20:24:03 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA23380
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 20:23:59 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64809 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sI3MI184370>; Fri, 10 Dec 1999 02:23:32 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wErF-0000DA-00; Fri, 10 Dec 1999 02:28:29 +0100
Date: Fri, 10 Dec 1999 02:28:29 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: Tom Lane <tgl@sss.pgh.pa.us>, lockhart@alumni.caltech.edu,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
In-Reply-To: <m11vn1c-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.4.20.9912090126370.389-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-08, Jan Wieck mentioned:
The multi session test tool, written in Tcl, is ready. Where
should it go and how should it be named? I think it wouldn't
be a bad idea to have it in a place where it can be used from
any location, instead of putting it into the regression dir.
Maybe install it into bin?
Please consider not doing that. Bin is for user programs. I don't see why
it shouldn't at least go under the test tree, if not under regress.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Dec 9 20:24:06 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA23382
for <pgsql-general@postgresql.org>; Thu, 9 Dec 1999 20:24:00 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64807 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sI3MH184363>; Fri, 10 Dec 1999 02:23:31 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wErR-0000DE-00; Fri, 10 Dec 1999 02:28:41 +0100
Date: Fri, 10 Dec 1999 02:28:41 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Mark Dalphin <mdalphin@amgen.com>
cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Suggested "minor" change to psql
In-Reply-To: <384E9D82.CCC45186@amgen.com>
Message-ID: <Pine.LNX.4.20.9912090130100.389-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-08, Mark Dalphin mentioned:
Sometimes, however, rather than using the "\i" command, I would like to simply
load my schema directly into psql and capture the output on STDOUT (ie "psql <
mySchema.sql >& myOutput"). The problem that arises is that the errors and
notices all come out on STDERR. I am not sure this is the right choice. Because
of the lack of synchronization between STDOUT and STDERR, it becomes impossible
to associate an SQL statement with either a CREATE or an ERROR message. The
option, "-e", is supposed to echo the query, but it doesn't help.
You might be glad to hear that I've been addressing these issues. The way
it currently looks is that everything that is related to backend traffic
(query results, INSERT xxx, notices, errors) will all go to the same
stream (the \o one) in the order they arrive. I think this is what
everyone wanted. If you are running interactively, it doesn't make a
difference anyway, but in a automated script you'll rarely have the need
to have the errors without the commands that caused them.
The only thing that will keep going to stderr are fatal notices from psql
itself. The only thing that always goes to stdout is psql internal
messages ("Turned on expanded mode.").
One additional feature that's coming up, which you might like, is the
possibility to stop such a psql script after the first error it
encounters.
While I can see wanting to separate STDERR and STDOUT when one uses psql to run
an SQL query against a DB from within a shell script, it makes it much more
difficult when developing, and if I were to run several SQL queries into psql,
exactly the same association problem would occur.
You can check the return code and decide what to do with the output that
way.
Perhaps a combination of the function "isatty()" plus the -e flag would work? So
that if STDOUT "isatty()" then echo errors to STDOUT, otherwise send them to
STDERR. And if the -e flag is set, echo the queries to STDERR, so the
correlation between ERROR, CREATE, etc and SQL could be made.
There are already about 4 or 5 different output sources and 2 or 3 states
controlling them; I'm hesitant to adding more confusion, especially
subtle things.
Also, the meaning of the -e flag has been adjusted. In interactive mode it
doesn't do anything, in script mode it prints every line as it reads it.
If you don't give it, you don't see the code of your script. That is more
like a regular shell.
PS I only recently learned of the setting of the PAGER environment variable to
make it so I needn't scroll back up 400 lines to find my errors; perhaps this
could be made more prominent in the documentation as it would be a big help.
That part has been changed, because the purpose of the PAGER environment
variable in general is not to toggle the use of the pager in psql. There
is now an internal switch.
Then again, perhaps I should completely re-read the docs to see if this is
mentioned; I haven't done that for several releases now.
Well, I rewrote the complete manual, so you're in for a great work of
literature. :)
When will you be able to reach this promised land? You could start by
flaming the hackers list about a 6.6 release in Feb/Mar ... ;)
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Dec 9 22:13:57 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA03324
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 22:13:54 -0500 (EST)
(envelope-from wieck@debis.com)
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by trends.net (8.8.8/8.8.8) with SMTP id VAA02640
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 21:04:15 -0500 (EST)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wF4w-0003kGC; Fri, 10 Dec 99 02:42 MET
Message-Id: <m11wF4w-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
To: peter_e@gmx.net (Peter Eisentraut)
Date: Fri, 10 Dec 1999 02:42:38 +0100 (MET)
Cc: wieck@debis.com, tgl@sss.pgh.pa.us, lockhart@alumni.caltech.edu,
pgsql-hackers@postgresql.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.LNX.4.20.9912090126370.389-100000@localhost.localdomain>
from "Peter Eisentraut" at Dec 10, 99 02:28:29 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter Eisentraut wrote:
On 1999-12-08, Jan Wieck mentioned:
The multi session test tool, written in Tcl, is ready. Where
should it go and how should it be named? I think it wouldn't
be a bad idea to have it in a place where it can be used from
any location, instead of putting it into the regression dir.
Maybe install it into bin?Please consider not doing that. Bin is for user programs. I don't see w=
hy
it shouldn't at least go under the test tree, if not under regress.
You're right,
I'll place it into the regression tree. Those of us hackers,
who need it handy in a more central place can copy it to
whereever they like.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Dec 9 22:13:57 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA03322
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 22:13:53 -0500 (EST)
(envelope-from wieck@debis.com)
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by trends.net (8.8.8/8.8.8) with SMTP id VAA02732
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 21:06:23 -0500 (EST)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wF7D-0003kKC; Fri, 10 Dec 99 02:44 MET
Message-Id: <m11wF7D-0003kKC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY
andshift/reduce)
To: peter_e@gmx.net (Peter Eisentraut)
Date: Fri, 10 Dec 1999 02:44:59 +0100 (MET)
Cc: wieck@debis.com, tgl@sss.pgh.pa.us, lockhart@alumni.caltech.edu,
pgsql-hackers@postgresql.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.LNX.4.20.9912090126370.389-100000@localhost.localdomain>
from "Peter Eisentraut" at Dec 10, 99 02:28:29 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter Eisentraut wrote:
On 1999-12-08, Jan Wieck mentioned:
The multi session test tool, written in Tcl, is ready. Where
should it go and how should it be named? I think it wouldn't
be a bad idea to have it in a place where it can be used from
any location, instead of putting it into the regression dir.
Maybe install it into bin?Please consider not doing that. Bin is for user programs. I don't see w=
hy
it shouldn't at least go under the test tree, if not under regress.
BTW: I added one fflush(stdout) to psql/commands.c where the
query buffer is printed for the \p command. After that, my
test tool is totally happy with it.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Dec 9 22:14:00 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA03307
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 22:13:44 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by trends.net (8.8.8/8.8.8) with ESMTP id VAA03445
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 21:25:21 -0500 (EST)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA10631;
Thu, 9 Dec 1999 21:22:20 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgsql-hackers@postgresql.org (PostgreSQL HACKERS)
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
In-reply-to: Your message of Mon, 6 Dec 1999 19:20:10 +0100 (MET)
<m11v2k6-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Thu, 09 Dec 1999 21:22:20 -0500
Message-ID: <10629.944792540@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
If I allow the <constraint attributes> in column constraints,
I get 2 shift/reduce conflicts. Seems the syntax interferes
with NOT NULL. Actually I commented that part out, so the
complete syntax is available only for table constraints, not
on the column level.
Could some yacc-guru please take a look at it?
Well, I'm not a guru, but I looked anyway. It's a mess. The problem
is that when NOT is the next token, the grammar doesn't know whether
the NOT is starting NOT NULL, which would be a new ColConstraintElem,
or starting NOT DEFERRABLE, which would be part of the current
ColConstraintElem. So it can't decide whether it's time to reduce
the current stack contents to a finished ColConstraintElem or not.
The only way to do that is to look ahead further than the NOT.
In short, we no longer have an LR(1) grammar. Yipes.
After a few minutes' thought, it seems that the least unclean way
to attack this problem is to hack up the lexer so that
"NOT<whitespace>NULL" is lexed as a single keyword. Assuming that
that's doable (I haven't tried, but I think it's possible), the
required changes in the grammar would be small. The shift/reduce
problem would go away, since we'd essentially have pushed the
required lookahead into the lexer.
It's possible that making this change would even allow us to use
full a_expr rather than b_expr in DEFAULT expressions. I'm not
sure about it, but that'd be a nice side benefit if so.
Does anyone see a better answer? This'd definitely be a Big Kluge
from the lexer's point of view, but I don't see an answer at the
grammar level.
BTW --- if we do this, it'd be a simple matter to allow "NOTNULL"
with no embedded space, which is something that I think a number
of other DBMSes accept. (Which may tell us something about how
they solved this problem...) It's not a keyword according to
SQL92, so I'm inclined *not* to accept it, but perhaps someone
else wants to argue the case.
regards, tom lane
From bouncefilter Thu Dec 9 22:06:55 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA02728
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 22:06:43 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by trends.net (8.8.8/8.8.8) with ESMTP id VAA04273
for <pgsql-hackers@postgresql.org>; Thu, 9 Dec 1999 21:43:32 -0500 (EST)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA11255;
Thu, 9 Dec 1999 21:42:30 -0500 (EST)
To: Don Baccus <dhogaza@pacifier.com>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] alter table crashes back end
In-reply-to: Your message of Thu, 09 Dec 1999 07:54:31 -0800
<3.0.1.32.19991209075431.00e56ec0@mail.pacifier.com>
Date: Thu, 09 Dec 1999 21:42:30 -0500
Message-ID: <11253.944793750@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Don Baccus <dhogaza@pacifier.com> writes:
alter table foo add();
crashes the backend.
I'd say it's really low priority, but should be fixed.
A crash is never a good thing. If you feel like patching your
copy, the problem is in backend/parser/gram.y:
***************
*** 759,769 ****
}
| ADD '(' OptTableElementList ')'
{
- Node *lp = lfirst($3);
-
if (length($3) != 1)
elog(ERROR,"ALTER TABLE/ADD() allows one column only");
! $$ = lp;
}
| DROP opt_column ColId
{ elog(ERROR,"ALTER TABLE/DROP COLUMN not yet implemented"); }
--- 759,767 ----
}
| ADD '(' OptTableElementList ')'
{
if (length($3) != 1)
elog(ERROR,"ALTER TABLE/ADD() allows one column only");
! $$ = (Node *) lfirst($3);
}
| DROP opt_column ColId
{ elog(ERROR,"ALTER TABLE/DROP COLUMN not yet implemented"); }
***************
Line numbers certainly not right for 6.5 ...
regards, tom lane
From bouncefilter Thu Dec 9 22:46:55 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA10416
for <pgsql-hackers@hub.org>; Thu, 9 Dec 1999 22:46:07 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA11462;
Thu, 9 Dec 1999 22:45:09 -0500 (EST)
To: Tatsuo Ishii <t-ishii@sra.co.jp>
cc: pgsql-hackers@hub.org
Subject: Re: [HACKERS] FreeBSD problem under heavy load
In-reply-to: Your message of Wed, 08 Dec 1999 17:26:14 +0900
<19991208172614V.t-ishii@sra.co.jp>
Date: Thu, 09 Dec 1999 22:45:09 -0500
Message-ID: <11460.944797509@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
I seem to run into a serious problem. With 6.5.x + FreeBSD 3.2, I get
a core under heavy load (16 or more concurrent users). FreeBSD 2.2.x
seems more stable but soon or later same thing happens. Examing a
core, I found it segfaulted in hash_search().
I've been looking into this without much success. I cannot reproduce it
here under HPUX --- I ran pgbench for several hours without seeing any
problem. I also made another pass over the dynahash.c code looking for
portability bugs, but didn't find anything that looked promising. (The
code is ugly and fragile, but AFAICT it will work under existing usage
patterns.) It's quite possible the problem is elsewhere and dynahash is
just on the receiving end of a memory clobber ... but if so, we have
very little to go on in guessing where to look.
Can anyone else reproduce the problem? Does anything show up in the
postmaster log at or just before the crash?
regards, tom lane
PS: pgbench's configure fails on HPUX, because HP's compiler doesn't
like whitespace before #include. I modified configure.in like this:
AC_TRY_LINK([#include <sys/time.h>
#include <sys/resource.h>],
[struct rlimit rlim;
From bouncefilter Thu Dec 9 23:11:55 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA15698
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 23:11:51 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA11579
for <pgsql-hackers@postgreSQL.org>; Thu, 9 Dec 1999 23:11:19 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: pgsql web site busted?
Date: Thu, 09 Dec 1999 23:11:18 -0500
Message-ID: <11576.944799078@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
http://www.postgresql.org/ shows hub.org's homepage, not postgres's,
and none of my bookmarked links to other pgsql pages work. I think
someone messed up the virtual-host redirection tables there...
regards, tom lane
From bouncefilter Fri Dec 10 00:16:56 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA25219
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 00:16:41 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA16038;
Fri, 10 Dec 1999 00:16:28 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912100516.AAA16038@candle.pha.pa.us>
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
In-Reply-To: <10629.944792540@sss.pgh.pa.us> from Tom Lane at "Dec 9,
1999 09:22:20 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 10 Dec 1999 00:16:28 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
wieck@debis.com (Jan Wieck) writes:
If I allow the <constraint attributes> in column constraints,
I get 2 shift/reduce conflicts. Seems the syntax interferes
with NOT NULL. Actually I commented that part out, so the
complete syntax is available only for table constraints, not
on the column level.Could some yacc-guru please take a look at it?
Well, I'm not a guru, but I looked anyway. It's a mess. The problem
is that when NOT is the next token, the grammar doesn't know whether
the NOT is starting NOT NULL, which would be a new ColConstraintElem,
or starting NOT DEFERRABLE, which would be part of the current
ColConstraintElem. So it can't decide whether it's time to reduce
the current stack contents to a finished ColConstraintElem or not.
The only way to do that is to look ahead further than the NOT.
Tom and I talked about moving NOT DEFERED up into the main level with
NOT NULL.
In gram.y, line 949 and line, could there be a test that if the last
List element of $1 is a constraint, and if $2 is NOT DEFERED, we can set
the bit in $1 and just skip adding the defered node? If not, we can
throw an error.
Also, ColQualList seems very strange. Why the two actions? I have
removed it and made ColQualifier work properly.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 00:30:56 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA29264
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 00:30:50 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id BAA23481;
Fri, 10 Dec 1999 01:30:46 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 10 Dec 1999 01:30:45 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] pgsql web site busted?
In-Reply-To: <11576.944799078@sss.pgh.pa.us>
Message-ID: <Pine.BSF.4.21.9912100130250.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 9 Dec 1999, Tom Lane wrote:
http://www.postgresql.org/ shows hub.org's homepage, not postgres's,
and none of my bookmarked links to other pgsql pages work. I think
someone messed up the virtual-host redirection tables there...
moved to new ip's without putting in a record for the old...fixed now, or,
at least, should be...let me know...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Dec 10 00:31:57 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA29323
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 00:31:17 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA16495;
Fri, 10 Dec 1999 00:31:04 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912100531.AAA16495@candle.pha.pa.us>
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
In-Reply-To: <199912100516.AAA16038@candle.pha.pa.us> from Bruce Momjian at
"Dec 10, 1999 00:16:28 am"
To: Bruce Momjian <pgman@candle.pha.pa.us>
Date: Fri, 10 Dec 1999 00:31:04 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Well, I'm not a guru, but I looked anyway. It's a mess. The problem
is that when NOT is the next token, the grammar doesn't know whether
the NOT is starting NOT NULL, which would be a new ColConstraintElem,
or starting NOT DEFERRABLE, which would be part of the current
ColConstraintElem. So it can't decide whether it's time to reduce
the current stack contents to a finished ColConstraintElem or not.
The only way to do that is to look ahead further than the NOT.Tom and I talked about moving NOT DEFERED up into the main level with
NOT NULL.In gram.y, line 949 and line, could there be a test that if the last
List element of $1 is a constraint, and if $2 is NOT DEFERED, we can set
the bit in $1 and just skip adding the defered node? If not, we can
throw an error.
Also, I am using flex 2.5.4, and an seeing no shift-reduce errors from
the current gram.y.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 00:45:56 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA30901
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 00:45:02 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id AAA16757
for pgsql-hackers@postgreSQL.org; Fri, 10 Dec 1999 00:44:55 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912100544.AAA16757@candle.pha.pa.us>
Subject: 6.6 release
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Fri, 10 Dec 1999 00:44:55 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
There have been some people who have said they want a 6.6 release with
beta to start on February 1. They are Tom Lane, Thomas Lockhart, and
myself. Jan and Peter Eisentraut have said they will be ready on that
date.
Seems foreign key ability would be enough to justify a 6.6.
Comments?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 00:57:56 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA32090
for <pgsql-hackers@hub.org>; Fri, 10 Dec 1999 00:57:01 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id OAA21634;
Fri, 10 Dec 1999 14:56:58 +0900 (JST)
Received: from localhost (IDENT:t-ishii@localhost [127.0.0.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id OAA25118;
Fri, 10 Dec 1999 14:56:58 +0900
To: tgl@sss.pgh.pa.us
Cc: pgsql-hackers@hub.org
Subject: Re: [HACKERS] FreeBSD problem under heavy load
In-Reply-To: Your message of "Thu, 09 Dec 1999 22:45:09 -0500"
<11460.944797509@sss.pgh.pa.us>
References: <11460.944797509@sss.pgh.pa.us>
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991210145658J.t-ishii@sra.co.jp>
Date: Fri, 10 Dec 1999 14:56:58 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 74
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
I seem to run into a serious problem. With 6.5.x + FreeBSD 3.2, I get
a core under heavy load (16 or more concurrent users). FreeBSD 2.2.x
seems more stable but soon or later same thing happens. Examing a
core, I found it segfaulted in hash_search().I've been looking into this without much success. I cannot reproduce it
here under HPUX --- I ran pgbench for several hours without seeing any
problem. I also made another pass over the dynahash.c code looking for
portability bugs, but didn't find anything that looked promising. (The
code is ugly and fragile, but AFAICT it will work under existing usage
patterns.) It's quite possible the problem is elsewhere and dynahash is
just on the receiving end of a memory clobber ... but if so, we have
very little to go on in guessing where to look.Can anyone else reproduce the problem? Does anything show up in the
postmaster log at or just before the crash?regards, tom lane
I think I got it. in storage/lmgr/lock.c:WaitOnLock:
char old_status[64],
new_status[64];
:
:
strcpy(old_status, PS_STATUS);
strcpy(new_status, PS_STATUS);
strcat(new_status, " waiting");
PS_SET_STATUS(new_status);
:
:
PS_SET_STATUS(old_status);
The current status string is copied into old_status, then the pointer
to it is set to a gloable variable ps_status by PS_SET_STATUS
macro. Unfortunately old_status is on the stack, so once WaitOnLock
returns, ps_status would point to a garbage. In the subsequent call to
WaitOnLock,
strcpy(old_status, PS_STATUS);
will copy garbage string into old_status. So if the string is longer
than 63, the stack would be broken. Note that this would not happen on
Linux due to the difference of the definition of the macro. See
include/utils/ps_status.h for more details.
Also, I don't understand why:
strcpy(new_status, PS_STATUS);
strcat(new_status, " waiting");
PS_SET_STATUS(new_status);
is necessary. Just:
PS_SET_STATUS("waiting");
should be enough. After doing some tests on my FreeBSD and Linux box,
I will commit fixes to both current and 6.5 source tree.
PS: pgbench's configure fails on HPUX, because HP's compiler doesn't
like whitespace before #include. I modified configure.in like this:AC_TRY_LINK([#include <sys/time.h>
#include <sys/resource.h>],
[struct rlimit rlim;
Thanks. I will incorporate your fix.
BTW, I think pgbench is usefull to detect this kind of problems. Can I
put it into contrib or somewhere?
--
Tatsuo Ishii
From bouncefilter Fri Dec 10 01:26:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA46744
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 01:26:10 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA16230
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 01:25:39 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: OK, what's this LDREL all about?
Date: Fri, 10 Dec 1999 01:25:39 -0500
Message-ID: <16227.944807139@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
The recent QNX patches have broken current sources. I think
maybe the patches were incomplete or were not applied fully.
Every makefile now has $(LD) $(LDREL) in place of $(LD) -r,
which would be cool if only LDREL were defined as -r someplace.
But it ain't defined anywhere. Major lossage ensues.
regards, tom lane
From bouncefilter Fri Dec 10 01:35:57 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA55608
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 01:35:46 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
BAA18303;
Fri, 10 Dec 1999 01:34:58 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912100634.BAA18303@candle.pha.pa.us>
Subject: Re: [HACKERS] OK, what's this LDREL all about?
In-Reply-To: <16227.944807139@sss.pgh.pa.us> from Tom Lane at "Dec 10,
1999 01:25:39 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 10 Dec 1999 01:34:58 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
The recent QNX patches have broken current sources. I think
maybe the patches were incomplete or were not applied fully.
Every makefile now has $(LD) $(LDREL) in place of $(LD) -r,
which would be cool if only LDREL were defined as -r someplace.
But it ain't defined anywhere. Major lossage ensues.
Fixed. CVS update.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 01:39:58 1999
Received: from corvette.mascari.com (dhcp26131045.columbus.rr.com
[24.26.131.45]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA56064
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 01:39:04 -0500 (EST)
(envelope-from mascarm@mascari.com)
Received: from mascari.com (ferrari.mascari.com [192.168.2.1])
by corvette.mascari.com (8.8.7/8.8.7) with ESMTP id BAA19740;
Fri, 10 Dec 1999 01:34:35 -0500
Message-ID: <38509FAA.80491B18@mascari.com>
Date: Fri, 10 Dec 1999 01:37:30 -0500
From: Mike Mascari <mascarm@mascari.com>
Organization: Mascari Development Inc.
X-Mailer: Mozilla 4.7 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References: <199912100544.AAA16757@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
There have been some people who have said they want a 6.6 release with
beta to start on February 1. They are Tom Lane, Thomas Lockhart, and
myself. Jan and Peter Eisentraut have said they will be ready on that
date.Seems foreign key ability would be enough to justify a 6.6.
Comments?
From a user's perspective, that would be great. Our application is composed
of over 130 C++ class objects (its about 100K lines of C++) and the move to
6.5 meant:
1) A change throughout the code to lock tables appropriately to support the
refint.c code (which itself doesn't work for cascading updates) under MVCC
2) Keep using 6.4 which isn't all that hot for concurrent access, or
3) Wait for referential integrity...and pray the race condition isn't
triggered under 6.5 for tables being altered.
Due to the nature of our application, and the number of people actually
updating and deleting base tables whose keys would require a cascading
delete/update, we choose #3...... :-)
Mike Mascari
From bouncefilter Fri Dec 10 01:39:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA56047
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 01:38:56 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA16441;
Fri, 10 Dec 1999 01:37:49 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Fri, 10 Dec 1999 00:44:55 -0500 (EST)
<199912100544.AAA16757@candle.pha.pa.us>
Date: Fri, 10 Dec 1999 01:37:49 -0500
Message-ID: <16439.944807869@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Seems foreign key ability would be enough to justify a 6.6.
Even without foreign keys, we have enough bugfixes in place to justify
a 6.6 release, I think. If Jan can get some amount of foreign key
support working before Feb, that'd be a nice bonus --- but it's not
really necessary.
The way I see it, we should push what we have out the door, and then
settle in for a long slog on 7.0. We need to do WAL, querytree
redesign, long tuples, function manager changeover, date/time type
unification, and probably a couple other things that I don't remember
at this time of night. These are all appropriate for "7.0" because
they are big items and/or will involve some loss of backward
compatibility. Before we start in on that stuff, it'd be good to
consolidate the gains we already have. Almost every day I find myself
saying to someone "that's fixed in current sources". 7.0 is still
a long way away, so we ought to get the existing improvements out
to our users.
(In short, Bruce persuaded me: we ought to do a 6.6 cycle.)
regards, tom lane
From bouncefilter Fri Dec 10 01:43:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA56828
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 01:43:49 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA16457;
Fri, 10 Dec 1999 01:42:01 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
In-reply-to: Your message of Fri, 10 Dec 1999 00:31:04 -0500 (EST)
<199912100531.AAA16495@candle.pha.pa.us>
Date: Fri, 10 Dec 1999 01:42:01 -0500
Message-ID: <16455.944808121@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Also, I am using flex 2.5.4, and an seeing no shift-reduce errors from
the current gram.y.
You wouldn't, because the critical item is still commented out.
| REFERENCES ColId opt_column_list key_match key_actions
{
/* XXX
* Need ConstraintAttributeSpec as $6 -- Jan
*/
If you add ConstraintAttributeSpec to the end of this production,
it fails...
regards, tom lane
From bouncefilter Fri Dec 10 01:56:58 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA58580
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 01:56:50 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id CAA24134;
Fri, 10 Dec 1999 02:55:19 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 10 Dec 1999 02:55:18 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <199912100544.AAA16757@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.9912100251360.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, Bruce Momjian wrote:
There have been some people who have said they want a 6.6 release with
beta to start on February 1. They are Tom Lane, Thomas Lockhart, and
myself. Jan and Peter Eisentraut have said they will be ready on that
date.Seems foreign key ability would be enough to justify a 6.6.
Comments?
So we'd be looking at Beta on Feb 1st, with a release around Apr 1st, and
beta for 7 being around June 1st, with 7 release for Sept 1st?
IMHO, 7 is waiting for Vadim/WAL...we're doing a 6.6 due to him being
indisposed until Mar/Apr, correct?
Just want to get this clarified, that's all :)
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Dec 10 01:58:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA58776
for <pgsql-hackers@hub.org>; Fri, 10 Dec 1999 01:58:41 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA17221;
Fri, 10 Dec 1999 01:58:06 -0500 (EST)
To: Tatsuo Ishii <t-ishii@sra.co.jp>
cc: pgsql-hackers@hub.org
Subject: Re: [HACKERS] FreeBSD problem under heavy load
In-reply-to: Your message of Fri, 10 Dec 1999 14:56:58 +0900
<19991210145658J.t-ishii@sra.co.jp>
Date: Fri, 10 Dec 1999 01:58:06 -0500
Message-ID: <17219.944809086@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
The current status string is copied into old_status, then the pointer
to it is set to a gloable variable ps_status by PS_SET_STATUS
macro. Unfortunately old_status is on the stack, so once WaitOnLock
returns, ps_status would point to a garbage. In the subsequent call to
WaitOnLock,
strcpy(old_status, PS_STATUS);
will copy garbage string into old_status. So if the string is longer
than 63, the stack would be broken. Note that this would not happen on
Linux due to the difference of the definition of the macro. See
include/utils/ps_status.h for more details.
Ugh. It wouldn't happen on HPUX either, because the PS_STATUS stuff
all compiles as no-ops here. So that's why I couldn't see it.
You didn't say what you had in mind to fix this, but I think the safest
approach would be to reserve an area to copy the PS_SET_STATUS string
into on *all* systems. Otherwise we'll just get bitten by this kind of
bug again in future.
BTW, I think pgbench is usefull to detect this kind of problems. Can I
put it into contrib or somewhere?
Sounds like a good idea to me.
regards, tom lane
From bouncefilter Fri Dec 10 02:09:57 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA63357
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 02:09:54 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id DAA24246;
Fri, 10 Dec 1999 03:08:50 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 10 Dec 1999 03:08:50 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <16439.944807869@sss.pgh.pa.us>
Message-ID: <Pine.BSF.4.21.9912100300040.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Seems foreign key ability would be enough to justify a 6.6.
Even without foreign keys, we have enough bugfixes in place to justify
a 6.6 release, I think. If Jan can get some amount of foreign key
support working before Feb, that'd be a nice bonus --- but it's not
really necessary.The way I see it, we should push what we have out the door, and then
settle in for a long slog on 7.0. We need to do WAL, querytree
redesign, long tuples, function manager changeover, date/time type
unification, and probably a couple other things that I don't remember
at this time of night. These are all appropriate for "7.0" because
they are big items and/or will involve some loss of backward
compatibility. Before we start in on that stuff, it'd be good to
consolidate the gains we already have. Almost every day I find myself
saying to someone "that's fixed in current sources". 7.0 is still
a long way away, so we ought to get the existing improvements out
to our users.
Wait, now I'm confused...so between 6.6 and 7, we're talking another year
anyway? *raised eyebrow* Just curious about your 'long slog' above :)
Here's a question...should we beta on Feb 1st but make it 7.0? If we are
going to be looking for a "long slog" for 7, why not "freeze" things on
Feb 1st as v7, and start working on v8 with WAL, long tuples, etc, etc...
Like, what point do we call things a major release? In a sense, MVCC
probably should have been considered a large enough overhaul to warrant
7.0, no?
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Dec 10 02:30:58 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA67716
for <pgsql-interfaces@hub.org>; Fri, 10 Dec 1999 02:30:30 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11wKVZ-000Ffi-0K; Fri, 10 Dec 1999 07:30:29 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA15200;
Fri, 10 Dec 1999 09:01:59 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV3Q4>; Fri, 10 Dec 1999 07:27:22 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF63@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Assaf Arkin'" <arkin@exoffice.com>, Peter Mount
<petermount@it.maidstone.gov.uk>
Cc: pgsql-interfaces@hub.org, "'pgsql-hackers@postgresql.org'"
<pgsql-hackers@postgreSQL.org>
Subject: RE: [INTERFACES] Transaction support in 6.5.3/JDBC
Date: Fri, 10 Dec 1999 07:27:20 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
-----Original Message-----
From: Assaf Arkin [mailto:arkin@exoffice.com]
Sent: Thursday, December 09, 1999 6:43 PM
To: Peter Mount
Cc: pgsql-interfaces@hub.org; 'pgsql-hackers@postgresql.org'
Subject: Re: [INTERFACES] Transaction support in 6.5.3/JDBC
[snip]
3. isCriticalError -- should tell me if a critical error occured in
the
connection and the connection is no longer useable
How do I detect no. 3? Is there are certain range of error codes,
should
I just look at certain PSQLExceptions as being critial (e.g. all I/O
related errors)?PM: Don't rely on the text returned from PSQLException to be in
English.
We are pretty unique in that the driver will return an error message
in
the language defined by the locale of the client (also depends on if
we
have translated the errors into that language). What I could to is add
a
method to PSQLException that returns the original id of the Exception,
and another to return the arguments supplied. That may make your code
more portable.
I'm not looking into the messages, I know their language dependent. I
even added two or three new error messages, but only in English.
I'm looking for either specific error codes, range of error codes, or
some class extending PSQLException that will just indicate that this
connection is no longer useful. For example, if an I/O error occurs,
there's no ReadyForQuery reply, there's garbled response, etc.
arkin
PM: There are not error codes available. Also, there's nothing extending
PSQLException (yet), but there's no reason not to extend it.
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
From bouncefilter Fri Dec 10 02:37:57 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA69754
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 02:37:36 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11wKcR-000GGv-0K; Fri, 10 Dec 1999 07:37:35 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA15229;
Fri, 10 Dec 1999 09:09:05 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV3QZ>; Fri, 10 Dec 1999 07:34:28 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF64@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Assaf Arkin'" <arkin@exoffice.com>, Peter Mount
<petermount@it.maidstone.gov.uk>
Cc: "'pgsql-hackers@postgresql.org'" <pgsql-hackers@postgresql.org>
Subject: RE: [INTERFACES] Transaction support in 6.5.3/JDBC
Date: Fri, 10 Dec 1999 07:34:27 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
-----Original Message-----
From: Assaf Arkin [mailto:arkin@exoffice.com]
Sent: Thursday, December 09, 1999 6:52 PM
To: Peter Mount
Subject: Re: [INTERFACES] Transaction support in 6.5.3/JDBC
The version I have sends requests protocol 1.0, once I changed that to
protocol 2.0, I got the pid/key. I also got the read-for-query response,
so that works fine for detecting when the BE is unable to process
further requests (for whatever reason).
PM: Eeek, this will break, as current sources already do this (I still
don't know why 6.5.3 didn't go out with those patches).
I've implemented the setTransactionIsolation method, that also works
fine. According to the specs only two levels are supported read
committed and serializable, and serializable is mistakingly spelled
"SERIALIZED".
PM: Already done, should have been in 6.5.3 :-(
I couldn't find any indication that PostgreSQL supports read-only
transactions, so either setReadOnly should throw an not-supported
exception, or getReadOnly should always return false. The current
behavior is to use a boolean which is not reflected in the DB.
I have another question, that is how can we synchronize our code bases.
For the minor changes I did to the JDBC layer I will simply send you the
modified sources.
PM: Currently its best to send direct to me, rather than to the patches
list. This is because the changes I'm making for 7.0 is very extensive,
and it would be safer for me to apply them manually. Also, it seems that
6.5.3 didn't pick up a lot of the patches I committed (but are in the
CVS). The protocol version is definitely one, as was some of the
transaction stuff.
For the JDBC 2.0 standard extensions stuff, I'm using a very generic
implementation that was developed independently of (but tested with)
PostgreSQL. The exact same code base exists in a different package
(txm.jdbc.xa) and can be put on top of any JDBC driver. It works better,
though, if the JDBC driver implements the TwoPhaseConnection interface.
Right now, anytime a change happens to txm.jdbc.xa I simply copy the
files and change the package to postgresql.xa. I would like to see these
files distributed as part of the PostgreSQL driver, but I also don't
want to get a conflict where updates to one code base are not reflected
in the other.
PM: What copyright do they have? I'm cc'ing the hackers list, as it's
one area we have to be careful of, and the others have more
experience/feelings on this subject.
Peter
PM: In theory 6.5.3 should be requesting the current protocol (I
remember the patch being submitted to me as part of another fix).
However, I haven't (yet) had chance to look at it yet - hence not
knowing about the security key. The bit I want to add is for JDBC2,
ResultSet would by default use a cursor, and if it's closed while a
read
is in effect, it would send cancel to the backend.
Peter
regards, tom lane
************
************
--
____________________________________________________________
Assaf Arkin arkin@exoffice.com
CTO http://www.exoffice.com
Exoffice, The ExoLab Company tel: (650) 259-9796
From bouncefilter Fri Dec 10 02:46:57 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA71239
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 02:46:16 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11wKkp-000H44-0K; Fri, 10 Dec 1999 07:46:15 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA15285;
Fri, 10 Dec 1999 09:17:45 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV3Q8>; Fri, 10 Dec 1999 07:43:08 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF67@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Bruce Momjian'" <pgman@candle.pha.pa.us>, PostgreSQL-development
<pgsql-hackers@postgresql.org>
Subject: RE: [HACKERS] 6.6 release
Date: Fri, 10 Dec 1999 07:43:07 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
It looks like it may be an idea now, as for some reason, some parts of
the 6.5.3 JDBC driver isn't in 6.5.3?
We had a similar problem with 6.5.2, so before 6.5.3 was released, I
checked CVS to make sure the changes were there, and they were. It's
just that I've seen several references recently (the most recent from
Assaf this morning) about the protocol version being 1.0. The 6.5.3
driver was the first version not to use 1.0! eek.
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: Friday, December 10, 1999 5:45 AM
To: PostgreSQL-development
Subject: [HACKERS] 6.6 release
There have been some people who have said they want a 6.6 release with
beta to start on February 1. They are Tom Lane, Thomas Lockhart, and
myself. Jan and Peter Eisentraut have said they will be ready on that
date.
Seems foreign key ability would be enough to justify a 6.6.
Comments?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania
19026
************
From bouncefilter Fri Dec 10 02:56:59 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA72579
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 02:56:18 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11wKuT-000IVh-0K; Fri, 10 Dec 1999 07:56:14 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA15322;
Fri, 10 Dec 1999 09:27:43 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV3RC>; Fri, 10 Dec 1999 07:53:06 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF68@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'The Hermit Hacker'" <scrappy@hub.org>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, PostgreSQL-development
<pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] 6.6 release
Date: Fri, 10 Dec 1999 07:53:05 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
I'm also confused. So far, I've been working on the premise that the
next release would be 7.0 because of the probably major additions
expected, and that I'm hitting the JDBC driver hard to get as much of
the 2.0 spec complete as is possible.
I think, if the other changes are going to be that long, the version for
beta on Feb 1st should be 7.0, and have WAL (and others) for 8.0.
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: The Hermit Hacker [mailto:scrappy@hub.org]
Sent: Friday, December 10, 1999 7:09 AM
To: Tom Lane
Cc: Bruce Momjian; PostgreSQL-development
Subject: Re: [HACKERS] 6.6 release
[snipped toms comments]
Wait, now I'm confused...so between 6.6 and 7, we're talking another
year
anyway? *raised eyebrow* Just curious about your 'long slog' above :)
Here's a question...should we beta on Feb 1st but make it 7.0? If we
are
going to be looking for a "long slog" for 7, why not "freeze" things on
Feb 1st as v7, and start working on v8 with WAL, long tuples, etc,
etc...
Like, what point do we call things a major release? In a sense, MVCC
probably should have been considered a large enough overhaul to warrant
7.0, no?
Marc G. Fournier ICQ#7615664 IRC Nick:
Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary:
scrappy@{freebsd|postgresql}.org
************
From bouncefilter Fri Dec 10 03:08:58 1999
Received: from sunpine.krs.ru (SunPine.krs.ru [195.161.16.37])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA80850
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 03:08:48 -0500 (EST) (envelope-from vadim@krs.ru)
Received: from krs.ru (dune.krs.ru [195.161.16.38])
by sunpine.krs.ru (8.8.8/8.8.8) with ESMTP id PAA25059;
Fri, 10 Dec 1999 15:04:46 +0700 (KRS)
Sender: root@sunpine.krs.ru
Message-ID: <3850B41E.B333CA62@krs.ru>
Date: Fri, 10 Dec 1999 15:04:46 +0700
From: Vadim Mikheev <vadim@krs.ru>
Organization: OJSC Rostelecom (Krasnoyarsk)
X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-RELEASE i386)
X-Accept-Language: ru, en
MIME-Version: 1.0
To: The Hermit Hacker <scrappy@hub.org>
CC: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References: <Pine.BSF.4.21.9912100300040.500-100000@thelab.hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The Hermit Hacker wrote:
Wait, now I'm confused...so between 6.6 and 7, we're talking another year
anyway? *raised eyebrow* Just curious about your 'long slog' above :)Here's a question...should we beta on Feb 1st but make it 7.0? If we are
going to be looking for a "long slog" for 7, why not "freeze" things on
Feb 1st as v7, and start working on v8 with WAL, long tuples, etc, etc...Like, what point do we call things a major release? In a sense, MVCC
probably should have been considered a large enough overhaul to warrant
7.0, no?
So, may be call next after 6.6 release just 6.7 ? -:)
Does it so matter - v7, v8? I would be happy with 6.7 -:)
Vadim
From bouncefilter Fri Dec 10 03:07:58 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA80664
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 03:07:52 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id DAA19473;
Fri, 10 Dec 1999 03:06:17 -0500 (EST)
To: The Hermit Hacker <scrappy@hub.org>
cc: Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Fri, 10 Dec 1999 03:08:50 -0400 (AST)
<Pine.BSF.4.21.9912100300040.500-100000@thelab.hub.org>
Date: Fri, 10 Dec 1999 03:06:16 -0500
Message-ID: <19471.944813176@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
The Hermit Hacker <scrappy@hub.org> writes:
7.0 is still a long way away, so we ought to get the existing
improvements out to our users.
Wait, now I'm confused...so between 6.6 and 7, we're talking another year
anyway? *raised eyebrow* Just curious about your 'long slog' above :)
I hope not a year ... but I could easily believe we have three to six
months of development ahead, if 7.0 is to contain all the stuff I
mentioned.
Here's a question...should we beta on Feb 1st but make it 7.0? If we are
going to be looking for a "long slog" for 7, why not "freeze" things on
Feb 1st as v7, and start working on v8 with WAL, long tuples, etc, etc...
Like, what point do we call things a major release? In a sense, MVCC
probably should have been considered a large enough overhaul to warrant
7.0, no?
Maybe so. What's in a name, anyway? But I think we've established a
precedent that it takes a really significant jump to bump the front
number. If we didn't call MVCC 7.0, the stuff we currently have
ready-to-go doesn't seem to justify it either. I think what we have
in current sources is a nice maintenance update, or maybe a little more
than that if Jan has a good chunk of foreign-key stuff working. It's
worth getting it out to users --- but it doesn't feel like a "7.0"
to me.
OTOH, we've already changed the version ID in current sources, and
changing it back might not be worth the trouble of arguing ;-)
regards, tom lane
From bouncefilter Fri Dec 10 03:12:58 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA81304
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 03:12:08 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id DAA19513;
Fri, 10 Dec 1999 03:11:04 -0500 (EST)
To: Peter Mount <petermount@it.maidstone.gov.uk>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Fri, 10 Dec 1999 07:43:07 -0000
<1B3D5E532D18D311861A00600865478C70BF67@exchange1.nt.maidstone.gov.uk>
Date: Fri, 10 Dec 1999 03:11:04 -0500
Message-ID: <19511.944813464@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Mount <petermount@it.maidstone.gov.uk> writes:
It looks like it may be an idea now, as for some reason, some parts of
the 6.5.3 JDBC driver isn't in 6.5.3?
We had a similar problem with 6.5.2, so before 6.5.3 was released, I
checked CVS to make sure the changes were there, and they were.
They may be in the tip, but are they in the REL6_5_PATCHES branch?
regards, tom lane
From bouncefilter Fri Dec 10 03:16:58 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA81891
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 03:16:06 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11wLDi-000OCR-0K; Fri, 10 Dec 1999 08:16:06 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA15430;
Fri, 10 Dec 1999 09:47:36 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV3R2>; Fri, 10 Dec 1999 08:12:58 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF69@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Tom Lane'" <tgl@sss.pgh.pa.us>, Peter Mount
<petermount@it.maidstone.gov.uk>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: RE: [HACKERS] 6.6 release
Date: Fri, 10 Dec 1999 08:12:57 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
I thought they were, but it's possible as I don't really know CVS that
well.
Peter
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, December 10, 1999 8:11 AM
To: Peter Mount
Cc: PostgreSQL-development
Subject: Re: [HACKERS] 6.6 release
Peter Mount <petermount@it.maidstone.gov.uk> writes:
It looks like it may be an idea now, as for some reason, some parts of
the 6.5.3 JDBC driver isn't in 6.5.3?
We had a similar problem with 6.5.2, so before 6.5.3 was released, I
checked CVS to make sure the changes were there, and they were.
They may be in the tip, but are they in the REL6_5_PATCHES branch?
regards, tom lane
From bouncefilter Fri Dec 10 03:21:58 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA82756
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 03:21:02 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id DAA19536;
Fri, 10 Dec 1999 03:18:56 -0500 (EST)
To: Peter Mount <petermount@it.maidstone.gov.uk>
cc: "'The Hermit Hacker'" <scrappy@hub.org>,
Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Fri, 10 Dec 1999 07:53:05 -0000
<1B3D5E532D18D311861A00600865478C70BF68@exchange1.nt.maidstone.gov.uk>
Date: Fri, 10 Dec 1999 03:18:55 -0500
Message-ID: <19534.944813935@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Mount <petermount@it.maidstone.gov.uk> writes:
I'm also confused. So far, I've been working on the premise that the
next release would be 7.0 because of the probably major additions
expected, and that I'm hitting the JDBC driver hard to get as much of
the 2.0 spec complete as is possible.
That was what I was thinking also, until yesterday. I think that the
proposal on the table is simply to consolidate/debug what we've already
done and push it out the door. If you've still got substantial work
left to finish JDBC 2.0, then it'd be better left for the next release.
I know I have a lot of little loose ends dangling on stuff that's
already "done", and a long list of nitty little bugs to fix, so it
makes sense to me to spend some time in fix-bugs-and-make-a-release
mode before going back into long-haul-feature-development mode.
Now, if other people don't have that feeling, maybe the idea of
a near-term release isn't so hot after all.
regards, tom lane
From bouncefilter Fri Dec 10 03:34:58 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA87379
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 03:34:02 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11wLV3-000PjG-0K; Fri, 10 Dec 1999 08:34:02 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id KAA15515;
Fri, 10 Dec 1999 10:05:32 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV3RP>; Fri, 10 Dec 1999 08:30:54 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF6A@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Tom Lane'" <tgl@sss.pgh.pa.us>, Peter Mount
<petermount@it.maidstone.gov.uk>
Cc: "'The Hermit Hacker'" <scrappy@hub.org>, Bruce Momjian
<pgman@candle.pha.pa.us>, PostgreSQL-development
<pgsql-hackers@postgresql.org>
Subject: RE: [HACKERS] 6.6 release
Date: Fri, 10 Dec 1999 08:30:52 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
Ok, if we go for a 6.6, then we will need to make sure the current
sources for JDBC are included in it (The stuff I have for 7.0 I've kept
separate).
I'll keep on plodding along with a "7.0" version of the driver, but I
won't commit anything until either 6.6 is out, or we decide that 7.0
would be imminent.
Peter
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, December 10, 1999 8:19 AM
To: Peter Mount
Cc: 'The Hermit Hacker'; Bruce Momjian; PostgreSQL-development
Subject: Re: [HACKERS] 6.6 release
Peter Mount <petermount@it.maidstone.gov.uk> writes:
I'm also confused. So far, I've been working on the premise that the
next release would be 7.0 because of the probably major additions
expected, and that I'm hitting the JDBC driver hard to get as much of
the 2.0 spec complete as is possible.
That was what I was thinking also, until yesterday. I think that the
proposal on the table is simply to consolidate/debug what we've already
done and push it out the door. If you've still got substantial work
left to finish JDBC 2.0, then it'd be better left for the next release.
I know I have a lot of little loose ends dangling on stuff that's
already "done", and a long list of nitty little bugs to fix, so it
makes sense to me to spend some time in fix-bugs-and-make-a-release
mode before going back into long-haul-feature-development mode.
Now, if other people don't have that feeling, maybe the idea of
a near-term release isn't so hot after all.
regards, tom lane
From bouncefilter Fri Dec 10 05:31:59 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA13043
for <pgsql-hackers@hub.org>; Fri, 10 Dec 1999 05:31:03 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id TAA14286;
Fri, 10 Dec 1999 19:31:01 +0900 (JST)
Received: from localhost (IDENT:t-ishii@localhost [127.0.0.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id TAA30902;
Fri, 10 Dec 1999 19:30:58 +0900
To: tgl@sss.pgh.pa.us
Cc: pgsql-hackers@hub.org
Subject: Re: [HACKERS] FreeBSD problem under heavy load
In-Reply-To: Your message of "Fri, 10 Dec 1999 01:58:06 -0500"
<17219.944809086@sss.pgh.pa.us>
References: <17219.944809086@sss.pgh.pa.us>
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991210193057Q.t-ishii@sra.co.jp>
Date: Fri, 10 Dec 1999 19:30:57 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 15
You didn't say what you had in mind to fix this, but I think the safest
approach would be to reserve an area to copy the PS_SET_STATUS string
into on *all* systems. Otherwise we'll just get bitten by this kind of
bug again in future.
Done for current.
BTW, I think pgbench is usefull to detect this kind of problems. Can I
put it into contrib or somewhere?Sounds like a good idea to me.
Will commit into contrib.
--
Tatsuo Ishii
From bouncefilter Fri Dec 10 05:59:00 1999
Received: from flame.flame.co.za (flame.flame.co.za [160.124.170.1])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA16454
for <hackers@postgresql.org>; Fri, 10 Dec 1999 05:58:52 -0500 (EST)
(envelope-from theo@flame.co.za)
Received: from flame.co.za (flame.flame.co.za [160.124.170.1])
by flame.flame.co.za (8.8.7/8.8.7) with ESMTP id MAA11018
for <hackers@postgresql.org>; Fri, 10 Dec 1999 12:57:17 +0200
Sender: theo@flame.flame.co.za
Message-ID: <3850DC8D.C412E16C@flame.co.za>
Date: Fri, 10 Dec 1999 12:57:17 +0200
From: Theo Kramer <theo@flame.co.za>
Organization: Flame Computing Enterprises
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.35 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: hackers@postgresql.org
Subject: insert using select with limit
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi
Just noticed that limit is ignored when using a select to insert
into a table.
Eg. insert into mytable (f1, f2) select f1, f2 from myothertable limit 10;
selects all records from myothertable.
Using the select with limit on it's own works fine.
Version 6.5.2 on RH6
--------
Regards
Theo
From bouncefilter Tue Dec 28 08:11:51 1999
Received: from mx02.gis.net ([208.218.130.7])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA89068
for <pgsql-hackers@postgreSQL.org>;
Tue, 28 Dec 1999 08:11:48 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from laptop.pacifier.com (nas-75-25.boston.navinet.net
[216.67.75.25]) by mx02.gis.net (8.8.8/8.8.8+pyrd) with SMTP id
IAA02959; Tue, 28 Dec 1999 08:11:43 -0500 (EST)
Message-Id: <3.0.1.32.19991210030852.00ed1ed4@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Fri, 10 Dec 1999 03:08:52 -0800
To: "Marc G. Fournier" <scrappy@hub.org>, pgsql-hackers@postgreSQL.org
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] RE: What database i can use? (fwd)
Cc: berend@pobox.com
In-Reply-To: <Pine.BSF.4.21.9912272113430.50426-100000@hub.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 09:14 PM 12/27/99 -0500, Marc G. Fournier wrote:
For those working on INNER/OUTER Joins...any comments? :)
I'm not working on them (or on Postgres at all, other than steadily
plowing through the code to familiarize myself with it) but I'm
always willing to comment...
JOIN statement? I take it that this is different then:
SELECT a.field1, b.field2 from table1 a, table2 b where a.key = b.key
ANSI92 supports the far better readable JOIN statement:
select a.field1, b.field2
from table1 a
join table2 b on
a.key = b.key
He's right that they are different, but they give the same result.
Wearing my compiler-writer's hat, something like:
select a.field1, b.field2 from table1 a, table2 b where a.key=b.key
says "cross join table1 and table2, then return only those rows
where a.key=b.key"
in other words, it's not (strictly speaking) an inner join.
However...the rows returned by this are the same as the rows
returned by an inner join. One could look at the traditional
implementation as an inner join as being an OPTIMIZATION of
this query. It qualifies as an optimization in the sense that
it's certainly far faster for the vast majority of such queries!
From my reading of the standard (or Date's review of it), this
is really how the standard defines things, i.e. an inner join
are explicitly given in the "from" clause.
Left outer joins are now easy to:
select a.field1, b.field2
from table1 a
left outer join table2 b on
a.key = b.keyIt generally parses and optimizes faster too. For MS SQL Server I've seen
improvements of up to 75% percent: execution time was the same, but the plan
was calculated much faster.
This is a bit surprising to me. One source might be the fact that outer
joins aren't associative (SQL for smarties gives examples), so outer joins
appearing in the "from" clause may simply force left-to-right execution
which reduces the number of cases a plan optimizer (whatever Sybase/SQL server
uses) must consider.
Or it may be that SQL server just executes ALL joins, inner or outer,
explicitly listed in the "from" clause in left-to-right order under
the assumption that the programmer knows best. I kinda doubt that,
though. If true, it would certainly simplify plan optimization, there
wouldn't be any other than deciding what kind of join and which indices
to use for each one (as opposed to figuring out that plus which order
of execution).
From my reading of the work done on joins thus far for Postgres, the
plan optimizer will be fed essentially the same information whether
an inner join is listed in the "from" clause or derived from the
"where" clause, so I wouldn't expect to see such speed ups. The
non-associativity of outer joins might impose an ordering on
inner joins mixed in, though (I haven't thought through the cases,
again I'm just reading Postgres code and Date's book on the standard,
I wrote my first SQL query less than a year ago and am still very
much a novice at all this).
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Tue Dec 28 08:19:51 1999
Received: from mx02.gis.net ([208.218.130.7])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA89960
for <pgsql-hackers@postgreSQL.org>;
Tue, 28 Dec 1999 08:19:38 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from laptop.pacifier.com (nas-75-25.boston.navinet.net
[216.67.75.25]) by mx02.gis.net (8.8.8/8.8.8+pyrd) with SMTP id
IAA02969; Tue, 28 Dec 1999 08:11:50 -0500 (EST)
Message-Id: <3.0.1.32.19991210031705.00ed6168@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Fri, 10 Dec 1999 03:17:05 -0800
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>, Tom Lane <tgl@sss.pgh.pa.us>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] memory dilemma
Cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
In-Reply-To: <Pine.LNX.3.96.991228102949.12706B-100000@ara.zf.jcu.cz>
References: <26286.946310966@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 11:28 AM 12/28/99 +0100, Karel Zak - Zakkr wrote:
Thank for all suggestion. I finaly use in to_char() cache via static buffer,
and if format-picture will bigger than this buffer, to_char will work as
without cache. This solution eliminate memory leak - this solution is used
in current datetime routines. It is good compromise.
Seems simple and safe, yes. My objection was really due to my concern
over memory leaks. The "to_char()" function will be a great help to
those porting over Oracle applications to Postgres.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Fri Dec 10 06:39:00 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id GAA25878
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 06:38:48 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 25602 invoked by uid 1001); 10 Dec 1999 11:38:48 -0000
Date: Fri, 10 Dec 1999 06:38:48 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: The Hermit Hacker <scrappy@hub.org>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <Pine.BSF.4.21.9912100300040.500-100000@thelab.hub.org>
Message-ID: <Pine.BSF.4.05.9912100632020.25498-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, The Hermit Hacker wrote:
Here's a question...should we beta on Feb 1st but make it 7.0? If we are
going to be looking for a "long slog" for 7, why not "freeze" things on
Feb 1st as v7, and start working on v8 with WAL, long tuples, etc, etc...Like, what point do we call things a major release? In a sense, MVCC
probably should have been considered a large enough overhaul to warrant
7.0, no?
I thought Marc decided[1]Or did you do that on inn-workers and not here? It was about the same time FreeBSD dropped the major.minor.minor for the major.minor numbering. -- ========================================================================== Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null # include <std/disclaimers.h> Have you seen http://www.pop4.net? Online Campground Directory http://www.camping-usa.com Online Giftshop Superstore http://www.cloudninegifts.com ========================================================================== last year to drop the minor.minor version
numbers. IOW, there would be no 6.6.1, 6.6.2, etc. Make the upcoming
release 7.0 and take care of any minor glitches in it as 7.1, 7.2 and
when WAL and the other stuff is ready - or as it's ready - release 8.0
and fix any glitches as 8.1, etc. Currently every minor release is really
a major one, so why not just mark it as such and not worry about it?
Vince.
[1]: Or did you do that on inn-workers and not here? It was about the same time FreeBSD dropped the major.minor.minor for the major.minor numbering. -- ========================================================================== Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null # include <std/disclaimers.h> Have you seen http://www.pop4.net? Online Campground Directory http://www.camping-usa.com Online Giftshop Superstore http://www.cloudninegifts.com ==========================================================================
time FreeBSD dropped the major.minor.minor for the major.minor numbering.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null
# include <std/disclaimers.h> Have you seen http://www.pop4.net?
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Fri Dec 10 07:50:01 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id HAA38241
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 07:49:49 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wPJx-0003kGC; Fri, 10 Dec 99 13:38 MET
Message-Id: <m11wPJx-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] 6.6 release
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Fri, 10 Dec 1999 13:38:49 +0100 (MET)
Cc: pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <16439.944807869@sss.pgh.pa.us> from "Tom Lane" at Dec 10,
99 01:37:49 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Seems foreign key ability would be enough to justify a 6.6.
Even without foreign keys, we have enough bugfixes in place to justify
a 6.6 release, I think. If Jan can get some amount of foreign key
support working before Feb, that'd be a nice bonus --- but it's not
really necessary.
As far as I see it now, I can get the FK stuff with MATCH
FULL ready by February first. Must be enough.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 07:47:02 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA37944
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 07:46:03 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id IAA26203;
Fri, 10 Dec 1999 08:42:41 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 10 Dec 1999 08:42:41 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <19471.944813176@sss.pgh.pa.us>
Message-ID: <Pine.BSF.4.21.9912100838380.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, Tom Lane wrote:
Maybe so. What's in a name, anyway? But I think we've established a
precedent that it takes a really significant jump to bump the front
Actually, we've never set a precedent...v6.0 was so named more because
v1.10 just sounded like such a small number compared to the overall age of
the software...
OTOH, we've already changed the version ID in current sources, and
changing it back might not be worth the trouble of arguing ;-)
Okay, I can agree with that one :)
Peter brought up a good argument over on his side too...make the Feb1st
one 7, and we'll make the post-WAL stuff 8.0 ...
Just as a note, I'm not 100% certain how this generally works in "real
life", but, in some circumstances, I've seen it happen where the major
gets bumped a significant number of changes have gone into everything
since the last major bump...I think we have achieved that at least one
release back...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Dec 10 08:01:01 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA42401
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 08:00:34 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id IAA26251;
Fri, 10 Dec 1999 08:56:30 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 10 Dec 1999 08:56:30 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Vince Vielhaber <vev@michvhf.com>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <Pine.BSF.4.05.9912100632020.25498-100000@paprika.michvhf.com>
Message-ID: <Pine.BSF.4.21.9912100844170.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, Vince Vielhaber wrote:
On Fri, 10 Dec 1999, The Hermit Hacker wrote:
Here's a question...should we beta on Feb 1st but make it 7.0? If we are
going to be looking for a "long slog" for 7, why not "freeze" things on
Feb 1st as v7, and start working on v8 with WAL, long tuples, etc, etc...Like, what point do we call things a major release? In a sense, MVCC
probably should have been considered a large enough overhaul to warrant
7.0, no?I thought Marc decided[1] last year to drop the minor.minor version
numbers. IOW, there would be no 6.6.1, 6.6.2, etc. Make the upcoming
release 7.0 and take care of any minor glitches in it as 7.1, 7.2 and
when WAL and the other stuff is ready - or as it's ready - release 8.0
and fix any glitches as 8.1, etc. Currently every minor release is really
a major one, so why not just mark it as such and not worry about it?Vince.
[1] Or did you do that on inn-workers and not here? It was about the same
time FreeBSD dropped the major.minor.minor for the major.minor numbering.
Would have been here...
The problem, as I see it, is that the FreeBSD camp is more "strict" in how
it does their source tree...there is a development tree (X.y), and a
stable tree (X-1.y)...if something is back-patchable to X-1.y from X.y, it
gets done (ie. bug fixes, security fixes or even feature changes *as long
as* they don't change the API...
We're about 50% there, but not completely...this last release (6.5) has
been fantastic...ppl have been back-patching to the 6.5 tree, providing us
wiht interim releases, but not to the level that we can build a 6.6 off
that tree...
when we do up Release 7, which I'd like to make this one, I'd *love* to
make this a whole-hog thing...tag/branch things as REL_7, no minor
number...then its up to the developers to decide whether something is
back-patchable (like they've been doing up until now) with a periodic
release put out while Release 8 is being worked on.
It slows down the rush of getting a full release out while allowign ppl
access to the debug'd advances in the upcoming release...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Dec 10 08:35:01 1999
Received: from mail.ngi.de ([195.243.0.227])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA49761
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 08:34:00 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: from p3E9D3DE5.dip0.t-ipconnect.de
(root@p3E9D3DE5.dip0.t-ipconnect.de [62.157.61.229])
by mail.ngi.de (8.9.3/8.9.3) with ESMTP id OAA54535
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 14:24:13 +0100 (CET)
(envelope-from michael@fam-meskes.de)
Received: (from michael@localhost)
by tanja.fam-meskes.de (8.9.3/8.9.0/Debian/GNU) id OAA00344
for pgsql-hackers@postgresql.org; Fri, 10 Dec 1999 14:27:51 +0100
Date: Fri, 10 Dec 1999 14:27:51 +0100
From: Michael Meskes <meskes@postgresql.org>
To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Subject: question
Message-ID: <19991210142751.A329@fam-meskes.de>
Mail-Followup-To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0i
I'd like to set up a system where every employee can log into an intranet
server and enter the time he/she spend on each of the projects. At the end
of the month I'd like to create a list of time per project from this data.
My idea was to use PostgreSQL as backend (of course) and a web front-end.
Does anyone have a similar system running? Or any ideas concerning how to
set this up and what software to use?
Thanks in advance.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Fri Dec 10 08:59:02 1999
Received: from druid.net (root@druid.net [216.126.72.98])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA53109
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 08:58:47 -0500 (EST) (envelope-from darcy@druid.net)
Received: from localhost (1187 bytes) by druid.net
via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp
(sender: <darcy>) (ident <darcy> using unix)
id <m11wQZH-0000cRC@druid.net> for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 08:58:43 -0500 (EST)
(Smail-3.2.0.104 1998-Nov-20 #4 built 1999-Apr-13)
Message-Id: <m11wQZH-0000cRC@druid.net>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <m11wPJx-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 10, 1999 01:38:49 pm"
To: wieck@debis.com
Date: Fri, 10 Dec 1999 08:58:42 -0500 (EST)
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
Cc: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL50 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Thus spake Jan Wieck
As far as I see it now, I can get the FK stuff with MATCH
FULL ready by February first. Must be enough.
Any chance of getting the FK semantics into the parser right away even
though it is ignored? As soon as it is there we can start modifying
our CREATE TABLE scripts in preparation for when the underlying code
is there.
Hmm. Sounds like an argument I had with Jolly once over PKs. :-)
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
From bouncefilter Fri Dec 10 09:49:02 1999
Received: from www.lowcountry.com ([206.74.39.99])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA63184
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 09:48:28 -0500 (EST)
(envelope-from jscottb@www.lowcountry.com)
From: jscottb@www.lowcountry.com
Received: from localhost (jscottb@localhost)
by www.lowcountry.com (8.9.3/8.9.3) with ESMTP id JAA02831;
Fri, 10 Dec 1999 09:49:15 -0500
Date: Fri, 10 Dec 1999 09:49:15 -0500 (EST)
To: pgsql-hackers@postgresql.org
cc: jscottb@infoave.com
Subject: First draft of pg_group admin tool.
Message-ID: <Pine.LNX.4.10.9912100918480.2750-200000@www.lowcountry.com>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED;
BOUNDARY="1255039783-1815777390-944837355=:2750"
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--1255039783-1815777390-944837355=:2750
Content-Type: TEXT/PLAIN; charset=US-ASCII
Well this is my first post to this list, so be gentle ;-). With it I hope
we will be able to do most group amin, without going into psql. It has
the following syntax:
usage: pg_group options -- dB group [user ...] || [table ...]
where options is one of:
-c create group
-d delete group
-a add user(s) to group
-r remove user(s) to group
+g give group access to tables
-g revoke group access to tables
-p privlages to grant/revoke. This is only used with the +g and -g
options.
-- end of switches.
examples:
pg_group -c -- guestbook grp_gstbook_usr nobody tux
pg_group -a -- guestbook grp_gstbook_usr webuser
pg_group -d -- guestbook grp_gstbook_usr
pg_group -r -- guestbook grp_gstbook_usr nobody
pg_group +g -p "insert,select" -- guestbook grp_gstbook_usr gstbook
pg_group -g -p "insert" -- guestbook grp_gstbook_usr gstbook
I have attched the pg_group script src (it's in tcl), I hope It will make
it and it was not a bad thing to do so, if not you can get it from:
http://www.lowcountry.com/~jscottb/pg_group.tar.gz
If you have any questions, comments, patches or total rewrites email me
at: jscottb@infoave.com
scott
--1255039783-1815777390-944837355=:2750
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=pg_group
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.9912100949150.2750@www.lowcountry.com>
Content-Description:
Content-Disposition: attachment; filename=pg_group
IyEvdXNyL2Jpbi90Y2xzaCANCg0KIw0KIyBwZ19ncm91cCB2MC4zMA0KIyBB
IHF1aWNrIGhhY2sgcGdfZ3JvdXAgYWRtaW4gY29tbWFuZCBsaW5lIHV0aWxp
dHkuDQojIEkga25vdyBpdCBuZWVkcyBhIGxvdCBvZiBjbGVhbiB1cC4gDQoj
IFNlbmQgYW55IGJ1Z3MsIHBhdGNoZXMgb3IgdG90YWwgcmV3cml0ZXMgdG8N
CiMganNjb3R0YkBpbmZvYXZlLmNvbQ0KIw0KDQpsb2FkIGxpYnBndGNsW2lu
Zm8gc2hhcmVkbGliZXh0ZW5zaW9uXQ0KDQpwcm9jIGRvX3VzYWdlIHt9IHsN
CiAgIHB1dHMgInVzYWdlOiBwZ19ncm91cCBvcHRpb25zIC0tIGRCIGdyb3Vw
IFxbdXNlciAuLi5cXSB8fCBcW3RhYmxlIC4uLlxdIg0KICAgcHV0cyAid2hl
cmUgb3B0aW9ucyBpcyBvbmUgb2Y6XG5cDQogICAgICAgICAgLWMgY3JlYXRl
IGdyb3VwXG5cDQogICAgICAgICAgLWQgZGVsZXRlIGdyb3VwXG5cDQogICAg
ICAgICAgLWEgYWRkIHVzZXIocykgdG8gZ3JvdXBcblwNCiAgICAgICAgICAt
ciByZW1vdmUgdXNlcihzKSB0byBncm91cFxuXA0KICAgICAgICAgICtnIGdp
dmUgZ3JvdXAgYWNjZXNzIHRvIHRhYmxlc1xuXA0KICAgICAgICAgIC1nIHJl
dm9rZSBncm91cCBhY2Nlc3MgdG8gdGFibGVzXG5cDQogICAgICAgICAgLXAg
cHJpdmxhZ2VzIHRvIGdyYW50L3Jldm9rZS5cDQogICAgICAgICAgVGhpcyBp
cyBvbmx5IHVzZWQgd2l0aCB0aGUgK2cgYW5kIC1nIG9wdGlvbnMuXG5cDQog
ICAgICAgICAgLS0gZW5kIG9mIHN3aXRjaGVzLlxuXG5cDQoJIGV4YW1wbGVz
OlxuXA0KICAgICAgICAgcGdfZ3JvdXAgLWMgLS0gZ3Vlc3Rib29rIGdycF9n
c3Rib29rX3VzciBub2JvZHkgdHV4XG5cDQogICAgICAgICBwZ19ncm91cCAt
YSAtLSBndWVzdGJvb2sgZ3JwX2dzdGJvb2tfdXNyIHdlYnVzZXJcblwNCiAg
ICAgICAgIHBnX2dyb3VwIC1kIC0tIGd1ZXN0Ym9vayBncnBfZ3N0Ym9va191
c3JcblwNCiAgICAgICAgIHBnX2dyb3VwIC1yIC0tIGd1ZXN0Ym9vayBncnBf
Z3N0Ym9va191c3Igbm9ib2R5XG5cDQogICAgICAgICBwZ19ncm91cCArZyAt
cCBcImluc2VydCxzZWxlY3RcIiAtLSBndWVzdGJvb2sgZ3JwX2dzdGJvb2tf
dXNyIGdzdGJvb2tcblwNCiAgICAgICAgIHBnX2dyb3VwIC1nIC1wIFwiaW5z
ZXJ0XCIgLS0gZ3Vlc3Rib29rIGdycF9nc3Rib29rX3VzciBnc3Rib29rXG4i
DQp9DQoNCiMgbWFpbg0KICAgIw0KICAgIyBJIG5lZWQgdG8gQ2xlYW4gdXAg
aGVyZSBhbmQgZG8gYmV0dGVyIG9uIGFyZ3YgYW5kIGFyZ2MNCiAgICMgY2hl
Y2tpbmcgb24gZWFjaCBzd2l0Y2ggdHlwZS4NCiAgICMNCiAgIA0KICAgaWYg
eyRhcmdjIDwgNH0gew0KICAgICAgZG9fdXNhZ2UNCiAgICAgIGV4aXQgMQ0K
ICAgfQ0KDQogICBzZXQgb3B0aW9uICIiDQogICBzZXQgcHJpdnN3dCAwDQog
ICBzZXQgb3B0ZW5kIDAgICANCiAgIHNldCBjbnQgMA0KICAgd2hpbGUgezF9
IHsNCiAgICAgIGlmIHskY250ID4gJGFyZ2N9IHsNCiAgICAgICAgIGJyZWFr
DQogICAgICB9DQogICAgICAgIA0KICAgICAgc2V0IHN3dGNoIFtsaW5kZXgg
JGFyZ3YgJGNudF0NCiAgICAgIGluY3IgY250DQogICAgICANCiAgICAgIHN3
aXRjaCAtLSAkc3d0Y2ggew0KICAgICAgICAgIi1jIiB7DQoJICAgIHNldCBv
cHRpb24gImMiDQoJIH0NCgkgDQogICAgICAgICAiLWEiIHsNCgkgICAgc2V0
IG9wdGlvbiAiYSINCgkgfQ0KDQogICAgICAgICAiLXIiIHsNCgkgICAgc2V0
IG9wdGlvbiAiciINCgkgfQ0KDQogICAgICAgICAiK2ciIHsNCgkgICAgc2V0
IG9wdGlvbiAiKyINCgkgfQ0KDQogICAgICAgICAiLWciIHsNCgkgICAgc2V0
IG9wdGlvbiAiLSINCgkgfQ0KDQogICAgICAgICAiLXAiIHsNCgkgICAgc2V0
IHByaXZzd3QgMQ0KCSAgICBzZXQgcHJpdnMgW2xpbmRleCAkYXJndiAkY250
XQ0KCSAgICBpbmNyIGNudA0KCSB9DQoNCiAgICAgICAgICItZCIgew0KCSAg
ICBzZXQgb3B0aW9uICJkIg0KCSB9DQoNCiAgICAgICAgICItLSIgew0KICAg
ICAgICAgICAgc2V0IG9wdGVuZCAxDQogICAgICAgICAgICBicmVhawkgICAg
DQoJIH0NCiAgICAgIH0NCiAgIH0NCg0KICAgIw0KICAgIyBZZXMsIEkgdG9v
ayB0aGUgZWFzeSB3YXkgb3V0Lg0KICAgIw0KDQogICBpZiB7ISRvcHRlbmR9
IHsNCiAgICAgIHB1dHMgImVycm9yICctLScgbWlzc2luZy4iDQogICAgICBk
b191c2FnZQ0KICAgICAgZXhpdCAxDQogICB9DQoNCiAgICMgR2V0IHRoZSBw
YXJtcyB0aGF0IHdlIGtub3cgc2hvdWxkIGJlIHRoZXJlLg0KICAgc2V0IGRi
IFtsaW5kZXggJGFyZ3YgJGNudF0NCiAgIGluY3IgY250DQogICBzZXQgZ3Jv
dXAgW2xpbmRleCAkYXJndiAkY250XQ0KICAgaW5jciBjbnQNCiAgIA0KICAg
c2V0IHVpZHMge30NCiAgIHNldCBkYmhuZCBbcGdfY29ubmVjdCAkZGJdDQog
ICANCiAgICMNCiAgICMgRnJvbSBoZXJlIG9uIGRvd24gbmVlZHMgdG8gYmUg
c3dpdGNoZWQgb3V0IGFuZA0KICAgIyBjYWxsIGEgcHJvYyBmb3IgZWFjaCBv
cHRpb24uDQogICAjDQogICANCiAgICMgQ3JlYXRlIGEgZ3JvdXAuDQogICBp
ZiB7JG9wdGlvbiA9PSAiYyJ9IHsNCiAgICAgICMgU2VlIGlmIHRoZSBncm91
cCBhbHJlYWR5IGV4c2lzdHMgZmlyc3QuDQogICAgICBzZXQgU3FsICJzZWxl
Y3QgZ3Jvc3lzaWQgXA0KICAgICAgICAgICAgICAgZnJvbSBwZ19ncm91cCBc
DQogICAgICAgICAgICAgICB3aGVyZSBncm9uYW1lPSckZ3JvdXAnIg0KICAg
ICAgc2V0IHJldCBbcGdfZXhlYyAkZGJobmQgJFNxbF0NCiANCiAgICAgICMg
R2V0IHRoZSBlcnJvciByZXN1bHQgaWYgYW55Lg0KICAgICAgc2V0IERiUmV0
IFtwZ19yZXN1bHQgJHJldCAtZXJyb3JdDQogICAgICBpZiB7JERiUmV0ICE9
ICIifSB7DQogICAgICAgICBwdXRzICREYlJldA0KCSBleGl0IDENCiAgICAg
IH0NCiAgIA0KICAgICAgaWYge1twZ19yZXN1bHQgJHJldCAtbnVtVHVwbGVz
XSA+PSAxfSB7DQogICAgICAgICBwdXRzICJncm91cCAkZ3JvdXAgYWxyZWFk
eSBleHNpc3RzLCB0cnkgLWEgb3B0aW9uIHRvIGFkZCB1c2Vycy4iDQoJIGV4
aXQgMQ0KICAgICAgfQ0KDQogICAgICAjIEZpZ3VyZSBvdXQgd2hhdCB0aGUg
bmV4dCBmcmVlIGdyb3VwIGlkIGlzLg0KICAgICAgc2V0IFNxbCAic2VsZWN0
IG1heChncm9zeXNpZCkgZnJvbSBwZ19ncm91cCINCiAgICAgIHNldCByZXQg
W3BnX2V4ZWMgJGRiaG5kICRTcWxdDQogDQogICAgICAjIEdldCB0aGUgZXJy
b3IgcmVzdWx0IGlmIGFueS4NCiAgICAgIHNldCBEYlJldCBbcGdfcmVzdWx0
ICRyZXQgLWVycm9yXQ0KICAgICAgaWYgeyREYlJldCAhPSAiIn0gew0KICAg
ICAgICAgcHV0cyAkRGJSZXQNCgkgZXhpdCAxDQogICAgICB9DQoNCiAgICAg
IHNldCBnaWQgW3BnX3Jlc3VsdCAkcmV0IC1nZXRUdXBsZSAwXQ0KICAgICAg
DQogICAgICAjIElmIHdlIGdldCBhICJ7fSIgdGhlbiB0aGF0IG1lYW5zIHRo
ZXJlIGlzIG5vIG9uZSBpbiB0aGUgZ3JvdXAgYWxyZWFkeS4NCiAgICAgIGlm
IHskZ2lkID09ICJ7fSIgfSB7DQogICAgICAgICBzZXQgZ2lkIC0xDQogICAg
ICB9DQogICAgICANCiAgICAgIGluY3IgZ2lkDQoNCiAgICAgICMgQWRkIHRo
ZSBncm91cCB0byB0aGUgZEIuDQogICAgICBzZXQgU3FsICJpbnNlcnQgaW50
byBwZ19ncm91cCBcDQogICAgICAgICAgICAgICB2YWx1ZXMoJyRncm91cCcs
ICRnaWQsICd7fScpIg0KICAgICAgc2V0IHJldCBbcGdfZXhlYyAkZGJobmQg
JFNxbF0NCiANCiAgICAgICMgR2V0IHRoZSBlcnJvciByZXN1bHQgaWYgYW55
Lg0KICAgICAgc2V0IERiUmV0IFtwZ19yZXN1bHQgJHJldCAtZXJyb3JdDQog
ICAgICBpZiB7JERiUmV0ICE9ICIifSB7DQogICAgICAgICBwdXRzICREYlJl
dA0KCSBleGl0IDENCiAgICAgIH0NCiAgIH0NCg0KICAgIyBEZWxldGUgYSBn
cm91cC4NCiAgIGlmIHskb3B0aW9uID09ICJkIn0gew0KICAgICAgIyBTZWUg
aWYgdGhlIGdyb3VwIGFscmVhZHkgZXhzaXN0cyBmaXJzdC4NCiAgICAgIHNl
dCBTcWwgInNlbGVjdCBncm9zeXNpZCBcDQogICAgICAgICAgICAgICBmcm9t
IHBnX2dyb3VwIFwNCiAgICAgICAgICAgICAgIHdoZXJlIGdyb25hbWU9JyRn
cm91cCciDQogICAgICBzZXQgcmV0IFtwZ19leGVjICRkYmhuZCAkU3FsXQ0K
IA0KICAgICAgIyBHZXQgdGhlIGVycm9yIHJlc3VsdCBpZiBhbnkuDQogICAg
ICBzZXQgRGJSZXQgW3BnX3Jlc3VsdCAkcmV0IC1lcnJvcl0NCiAgICAgIGlm
IHskRGJSZXQgIT0gIiJ9IHsNCiAgICAgICAgIHB1dHMgJERiUmV0DQoJIGV4
aXQgMQ0KICAgICAgfQ0KICAgDQogICAgICBpZiB7W3BnX3Jlc3VsdCAkcmV0
IC1udW1UdXBsZXNdID09IDB9IHsNCiAgICAgICAgIHB1dHMgImdyb3VwICRn
cm91cCBkb2VzIG5vdCBleHNpc3QgaW4gZEIgJGRiLiINCgkgZXhpdCAxDQog
ICAgICB9DQoNCiAgICAgIHBnX3Jlc3VsdCAkcmV0IC1jbGVhcg0KICAgICAg
DQogICAgICAjIFJldm9rZSBhbGwgdG8gY2xlYW4gdXAgdGhlIHBnX2NsYXNz
IGVudHJ5IGZvciBlYWNoIHRhYmxlLg0KICAgICAgc2V0IFNxbCAic2VsZWN0
IHJlbG5hbWUgZnJvbSBwZ19jbGFzcyINCiAgICAgIHNldCByZXQgW3BnX2V4
ZWMgJGRiaG5kICRTcWxdDQogDQogICAgICAjIEdldCB0aGUgZXJyb3IgcmVz
dWx0IGlmIGFueS4NCiAgICAgIHNldCBEYlJldCBbcGdfcmVzdWx0ICRyZXQg
LWVycm9yXQ0KICAgICAgaWYgeyREYlJldCAhPSAiIn0gew0KICAgICAgICAg
cHV0cyAkRGJSZXQNCgkgZXhpdCAxDQogICAgICB9DQoNCiAgICAgIHNldCBu
dW1vZnRhYmxlcyBbcGdfcmVzdWx0ICRyZXQgLW51bVR1cGxlc10NCiAgICAg
IHNldCByb3djbnQgMA0KICAgICAgd2hpbGUgezF9IHsNCiAgICAgICAgICMg
R2V0IHRhYmxlIG5hbWUuDQogICAgICAgICBzZXQgdGFibGVuYW1lIFtwZ19y
ZXN1bHQgJHJldCAtZ2V0VHVwbGUgJHJvd2NudF0NCg0KICAgICAgICAgIyBS
ZXZva2UgYWxsIHRvIGNsZWFuIHVwIHRoZSBwZ19jbGFzcyBlbnRyeS4NCiAg
ICAgICAgIHNldCBTcWwgInJldm9rZSBhbGwgb24gJHRhYmxlbmFtZSBmcm9t
IGdyb3VwICRncm91cCINCiAgICAgICAgIHNldCByZXQyIFtwZ19leGVjICRk
YmhuZCAkU3FsXQ0KIA0KICAgICAgICAgIyBHZXQgdGhlIGVycm9yIHJlc3Vs
dCBpZiBhbnkuDQogICAgICAgICBzZXQgRGJSZXQgW3BnX3Jlc3VsdCAkcmV0
MiAtZXJyb3JdDQogICAgICAgICBpZiB7JERiUmV0ICE9ICIifSB7DQogICAg
ICAgICAgICBwdXRzICREYlJldA0KICAgICAgICAgICAgZXhpdCAxDQogICAg
ICAgICB9DQoNCiAgICAgICAgIHBnX3Jlc3VsdCAkcmV0MiAtY2xlYXINCgkg
DQoJIGluY3Igcm93Y250DQoJIGlmIHskcm93Y250ID49ICRudW1vZnRhYmxl
c30gew0KICAgICAgICAgICAgYnJlYWsJIA0KCSB9DQogICAgICB9DQoNCiAg
ICAgIHBnX3Jlc3VsdCAkcmV0IC1jbGVhcg0KICAgICAgDQogICAgICAjIERl
bGV0ZSB0aGUgZ3JvdXAgZnJvbSB0aGUgZEIuDQogICAgICBzZXQgU3FsICJk
ZWxldGUgZnJvbSBwZ19ncm91cCBcDQogICAgICAgICAgICAgICB3aGVyZSBn
cm9uYW1lPSckZ3JvdXAnIg0KICAgICAgc2V0IHJldCBbcGdfZXhlYyAkZGJo
bmQgJFNxbF0NCiANCiAgICAgICMgR2V0IHRoZSBlcnJvciByZXN1bHQgaWYg
YW55Lg0KICAgICAgc2V0IERiUmV0IFtwZ19yZXN1bHQgJHJldCAtZXJyb3Jd
DQogICAgICBpZiB7JERiUmV0ICE9ICIifSB7DQogICAgICAgICBwdXRzICRE
YlJldA0KCSBleGl0IDENCiAgICAgIH0NCiAgIH0NCg0KICAgIyBBZGQgdG8g
YSBncm91cC4NCiAgIGlmIHskb3B0aW9uID09ICJhIiB8fCAkb3B0aW9uID09
ICJyIn0gew0KICAgICAgc2V0IFNxbCAic2VsZWN0IGdyb2xpc3QgXA0KICAg
ICAgICAgICAgICAgZnJvbSBwZ19ncm91cCBcDQogICAgICAgICAgICAgICB3
aGVyZSBncm9uYW1lPSckZ3JvdXAnIg0KICAgICAgc2V0IHJldCBbcGdfZXhl
YyAkZGJobmQgJFNxbF0NCiANCiAgICAgICMgR2V0IHRoZSBlcnJvciByZXN1
bHQgaWYgYW55Lg0KICAgICAgc2V0IERiUmV0IFtwZ19yZXN1bHQgJHJldCAt
ZXJyb3JdDQogICAgICBpZiB7JERiUmV0ICE9ICIifSB7DQogICAgICAgICBw
dXRzICREYlJldA0KCSBleGl0IDENCiAgICAgIH0NCiAgICAgIA0KICAgICAg
c2V0IHVpZHMgW3BnX3Jlc3VsdCAkcmV0IC1nZXRUdXBsZSAwXQ0KICAgICAg
cGdfcmVzdWx0ICRyZXQgLWNsZWFyDQogICAgICANCiAgICAgIHNldCB1aWRz
IFtzdHJpbmcgdHJpbSAkdWlkcyAie30iXQ0KICAgICAgaWYgeyR1aWRzICE9
ICIifSB7DQogICAgICAgICBzZXQgdWlkcyAiJHVpZHMsIiAgICAgICAgIA0K
ICAgICAgfQ0KICAgfQ0KDQogICBpZiB7JG9wdGlvbiAhPSAiKyIgJiYgJG9w
dGlvbiAhPSAiLSIgJiYgJG9wdGlvbiAhPSAiciJ9IHsNCiAgICAgICMgUHJv
Y2VzcyB0aGUgdXNlciBsaXN0Lg0KICAgICAgc2V0IG5ld191aWRzIHt9DQog
ICAgICB3aGlsZSB7MX0gew0KICAgICAgICAgaWYgeyRjbnQgPiAkYXJnY30g
ew0KICAgICAgICAgICAgYnJlYWsNCiAgICAgICAgIH0NCiAgICAgICAgDQog
ICAgICAgICBzZXQgdXNlciBbbGluZGV4ICRhcmd2ICRjbnRdDQogICAgICAg
ICBpZiB7W3N0cmluZyB0cmltICR1c2VyXSA9PSAiIn0gew0KICAgICAgICAg
ICAgaW5jciBjbnQNCiAgICAgICAgICAgIGNvbnRpbnVlICAgICAgDQogICAg
ICAgICB9DQogICAgICANCiAgICAgICAgIGluY3IgY250DQoNCiAgICAgICAg
ICMgR2V0IHRoZSB1c2VyIGlkIG9mIHRoZSB1c2VyIHRvIGFkZGVkLg0KICAg
ICAgICAgc2V0IFNxbCAic2VsZWN0IHVzZXN5c2lkIFwNCiAgICAgICAgICAg
ICAgICAgIGZyb20gcGdfdXNlciBcDQogICAgICAgICAgICAgICAgICB3aGVy
ZSB1c2VuYW1lPSckdXNlciciDQogICAgICAgICBzZXQgcmV0IFtwZ19leGVj
ICRkYmhuZCAkU3FsXQ0KIA0KICAgICAgICAgIyBHZXQgdGhlIGVycm9yIHJl
c3VsdCBpZiBhbnkuDQogICAgICAgICBzZXQgRGJSZXQgW3BnX3Jlc3VsdCAk
cmV0IC1lcnJvcl0NCiAgICAgICAgIGlmIHskRGJSZXQgIT0gIiJ9IHsNCiAg
ICAgICAgICAgIHB1dHMgJERiUmV0DQogICAgICAgICAgICBleGl0IDENCiAg
ICAgICAgIH0NCg0KICAgICAgICAgIyBTZWUgaWYgdGhlIHVzZXIgZXhzaXN0
cy4NCiAgICAgICAgIGlmIHtbcGdfcmVzdWx0ICRyZXQgLW51bVR1cGxlc10g
PCAxfSB7DQogICAgICAgICAgICBwdXRzICJ1c2VyICR1c2VyIGRvZXMgbm90
IGV4c2l0cyBpbiAkZGIuIg0KICAgICAgICAgICAgY29udGludWUNCiAgICAg
ICAgIH0NCg0KICAgICAgICAgc2V0IHVpZCBbcGdfcmVzdWx0ICRyZXQgLWdl
dFR1cGxlIDBdDQogICAgICAgICBzZXQgbm9hZGQgMA0KICAgICAgIA0KICAg
ICAgICAgIyBTZWUgaWYgdGhlIHVzZXIgaXMgYWxyZWFkeSBpbiB0aGUgZ3Jv
dXAuDQogICAgICAgICBzZXQgZ3VpZHMgW3NwbGl0ICR1aWRzICIsIl0NCiAg
ICAgICAgIGZvcmVhY2ggZ3VpZCAkZ3VpZHMgew0KICAgICAgICAgICAgc2V0
IGd1aWQgW3N0cmluZyB0cmltICRndWlkXQ0KICAgICAgICAgICAgaWYgeyRn
dWlkID09ICR1aWR9IHsNCiAgICAgICAgICAgICAgIHB1dHMgInVzZXIgJHVz
ZXIgYWxyZWFkeSBpbiBncm91cCAkZ3JvdXAuIg0KICAgICAgICAgICAgICAg
c2V0IG5vYWRkIDENCiAgICAgICAgICAgICAgIGJyZWFrDQogICAgICAgICAg
ICB9DQogICAgICAgICB9DQoNCiAgICAgICAgIGlmIHshJG5vYWRkfSB7DQog
ICAgICAgICAgICBhcHBlbmQgbmV3X3VpZHMgJHVpZCAiLCINCiAgICAgICAg
IH0NCiAgICAgICANCiAgICAgICAgIHBnX3Jlc3VsdCAkcmV0IC1jbGVhcg0K
ICAgICAgfQ0KDQogICAgICAjIFJlbW92ZSB0aGUgZXh0cmEgY29tYS4NCiAg
ICAgIHNldCBuZXdfdWlkcyBbc3RyaW5nIHRyaW1yaWdodCAkbmV3X3VpZHMg
IiwgIl0NCiAgICAgIHNldCB1aWRzIFtzdHJpbmcgdHJpbXJpZ2h0ICR1aWRz
ICIsICJdDQogDQogICAgICBzZXQgdWlkc19mb3JncnAgIiINCiAgICAgIGlm
IHskdWlkcyAhPSAiIn0gew0KICAgICAgICAgc2V0IHVpZHNfZm9yZ3JwICR1
aWRzDQogICAgICB9DQogICANCiAgICAgIGlmIHskbmV3X3VpZHMgIT0gIiJ9
IHsNCiAgICAgICAgIGFwcGVuZCB1aWRzX2ZvcmdycCAiLCIgJG5ld191aWRz
DQogICAgICB9DQoNCiAgICAgIHNldCB1aWRzX2ZvcmdycCBbc3RyaW5nIHRy
aW1sZWZ0ICR1aWRzX2ZvcmdycCAiLCAiXQ0KICAgDQogICAgICAjIFVwZGF0
ZSB0aGUgZ3JvdXAgd2l0aCB0aGUgdXNlcnMuDQogICAgICBzZXQgU3FsICJ1
cGRhdGUgcGdfZ3JvdXAgXA0KICAgICAgICAgICAgICAgc2V0IGdyb2xpc3Q9
J3skdWlkc19mb3JncnB9JyBcDQogICAgICAgICAgICAgICB3aGVyZSBncm9u
YW1lPSckZ3JvdXAnIg0KICAgICAgc2V0IHJldCBbcGdfZXhlYyAkZGJobmQg
JFNxbF0NCiANCiAgICAgICMgR2V0IHRoZSBlcnJvciByZXN1bHQgaWYgYW55
Lg0KICAgICAgc2V0IERiUmV0IFtwZ19yZXN1bHQgJHJldCAtZXJyb3JdDQog
ICAgICBpZiB7JERiUmV0ICE9ICIifSB7DQogICAgICAgICBwdXRzICREYlJl
dA0KICAgICAgICAgZXhpdCAxDQogICAgICB9DQogICANCiAgICAgIHBnX3Jl
c3VsdCAkcmV0IC1jbGVhcg0KICAgfQ0KDQogICAjIFJldm9rZSBwcml2cyBm
cm9tIGEgbGlzdCBvZiB1c2Vycy4NCiAgIGlmIHskb3B0aW9uID09ICJyIn0g
ew0KICAgICAgIyBQcm9jZXNzIHRoZSB1c2VyIGxpc3QuDQogICAgICBzZXQg
bmV3X3VpZHMge30NCiAgICAgIHdoaWxlIHsxfSB7DQogICAgICAgICBpZiB7
JGNudCA+ICRhcmdjfSB7DQogICAgICAgICAgICBicmVhaw0KICAgICAgICAg
fQ0KICAgICAgICANCiAgICAgICAgIHNldCB1c2VyIFtsaW5kZXggJGFyZ3Yg
JGNudF0NCiAgICAgICAgIGlmIHtbc3RyaW5nIHRyaW0gJHVzZXJdID09ICIi
fSB7DQogICAgICAgICAgICBpbmNyIGNudA0KICAgICAgICAgICAgY29udGlu
dWUgICAgICANCiAgICAgICAgIH0NCiAgICAgIA0KICAgICAgICAgaW5jciBj
bnQNCg0KICAgICAgICAgIyBHZXQgdGhlIHVzZXIgaWQgb2YgdGhlIHVzZXIg
dG8gYWRkZWQuDQogICAgICAgICBzZXQgU3FsICJzZWxlY3QgdXNlc3lzaWQg
XA0KICAgICAgICAgICAgICAgICAgZnJvbSBwZ191c2VyIFwNCiAgICAgICAg
ICAgICAgICAgIHdoZXJlIHVzZW5hbWU9JyR1c2VyJyINCiAgICAgICAgIHNl
dCByZXQgW3BnX2V4ZWMgJGRiaG5kICRTcWxdDQogDQogICAgICAgICAjIEdl
dCB0aGUgZXJyb3IgcmVzdWx0IGlmIGFueS4NCiAgICAgICAgIHNldCBEYlJl
dCBbcGdfcmVzdWx0ICRyZXQgLWVycm9yXQ0KICAgICAgICAgaWYgeyREYlJl
dCAhPSAiIn0gew0KICAgICAgICAgICAgcHV0cyAkRGJSZXQNCiAgICAgICAg
ICAgIGV4aXQgMQ0KICAgICAgICAgfQ0KDQogICAgICAgICAjIFNlZSBpZiB0
aGUgdXNlciBleHNpc3RzLg0KICAgICAgICAgaWYge1twZ19yZXN1bHQgJHJl
dCAtbnVtVHVwbGVzXSA8IDF9IHsNCiAgICAgICAgICAgIHB1dHMgInVzZXIg
JHVzZXIgZG9lcyBub3QgZXhzaXRzIGluICRkYi4iDQogICAgICAgICAgICBj
b250aW51ZQ0KICAgICAgICAgfQ0KDQogICAgICAgICBzZXQgdWlkIFtwZ19y
ZXN1bHQgJHJldCAtZ2V0VHVwbGUgMF0NCiAgICAgICAgIHBnX3Jlc3VsdCAk
cmV0IC1jbGVhcg0KDQogICAgICAgICAjIFJlbW92ZSB0aGUgdXNlciBmcm9t
IHRoZSBsaXN0Lg0KICAgICAgICAgcmVnc3ViIC1hbGwgIiR1aWRcLHwkdWlk
IiAkdWlkcyB7fSB1aWRzDQogICAgICB9CSANCg0KICAgICAgIyBSZW1vdmUg
dGhlIGV4dHJhIGNvbWEuDQogICAgICBzZXQgdWlkc19mb3JncnAgW3N0cmlu
ZyB0cmltcmlnaHQgJHVpZHMgIiwgIl0NCiAgIA0KICAgICAgIyBVcGRhdGUg
dGhlIGdyb3VwIHdpdGggdGhlIHVzZXJzLg0KICAgICAgc2V0IFNxbCAidXBk
YXRlIHBnX2dyb3VwIFwNCiAgICAgICAgICAgICAgIHNldCBncm9saXN0PSd7
JHVpZHNfZm9yZ3JwfScgXA0KICAgICAgICAgICAgICAgd2hlcmUgZ3JvbmFt
ZT0nJGdyb3VwJyINCiAgICAgIHNldCByZXQgW3BnX2V4ZWMgJGRiaG5kICRT
cWxdDQogDQogICAgICAjIEdldCB0aGUgZXJyb3IgcmVzdWx0IGlmIGFueS4N
CiAgICAgIHNldCBEYlJldCBbcGdfcmVzdWx0ICRyZXQgLWVycm9yXQ0KICAg
ICAgaWYgeyREYlJldCAhPSAiIn0gew0KICAgICAgICAgcHV0cyAkRGJSZXQN
CiAgICAgICAgIGV4aXQgMQ0KICAgICAgfQ0KICAgDQogICAgICBwZ19yZXN1
bHQgJHJldCAtY2xlYXINCiAgIH0NCg0KICAgIyBIYW5kbGUgZ3JvdXAgZ3Jh
bnRpbmcuDQogICBpZiB7JG9wdGlvbiA9PSAiKyJ9IHsNCiAgICAgICMgUHJv
Y2VzcyB0aGUgdXNlciBsaXN0Lg0KICAgICAgc2V0IHRhYmxlcyB7fQ0KICAg
ICAgd2hpbGUgezF9IHsNCiAgICAgICAgIGlmIHskY250ID4gJGFyZ2N9IHsN
CiAgICAgICAgICAgIGJyZWFrDQogICAgICAgICB9DQogICAgICAgIA0KICAg
ICAgICAgc2V0IHRhYmxlIFtsaW5kZXggJGFyZ3YgJGNudF0NCiAgICAgICAg
IGlmIHtbc3RyaW5nIHRyaW0gJHRhYmxlXSA9PSAiIn0gew0KICAgICAgICAg
ICAgaW5jciBjbnQNCiAgICAgICAgICAgIGNvbnRpbnVlICAgICAgDQogICAg
ICAgICB9DQogICAgICANCiAgICAgICAgIGluY3IgY250DQoNCiAgICAgICAg
ICMgU2VlIGlmIHRoZSB0YWJsZSBleHNpc3RzLg0KICAgICAgICAgc2V0IFNx
bCAic2VsZWN0IHRhYmxlbmFtZSBcDQogICAgICAgICAgICAgICAgICBmcm9t
IHBnX3RhYmxlcyBcDQogICAgICAgICAgICAgICAgICB3aGVyZSB0YWJsZW5h
bWU9JyR0YWJsZSciDQogICAgICAgICBzZXQgcmV0IFtwZ19leGVjICRkYmhu
ZCAkU3FsXQ0KIA0KICAgICAgICAgIyBHZXQgdGhlIGVycm9yIHJlc3VsdCBp
ZiBhbnkuDQogICAgICAgICBzZXQgRGJSZXQgW3BnX3Jlc3VsdCAkcmV0IC1l
cnJvcl0NCiAgICAgICAgIGlmIHskRGJSZXQgIT0gIiJ9IHsNCiAgICAgICAg
ICAgIHB1dHMgJERiUmV0DQogICAgICAgICAgICBleGl0IDENCiAgICAgICAg
IH0NCg0KICAgICAgICAgaWYge1twZ19yZXN1bHQgJHJldCAtbnVtVHVwbGVz
XSA8IDF9IHsNCiAgICAgICAgICAgIHB1dHMgInRhYmxlICR0YWJsZSBkb2Vz
IG5vdCBleHNpc3QgaW4gJGRiLiINCiAgICAgICAgICAgIGNvbnRpbnVlDQog
ICAgICAgICB9DQoNCiAgICAgICAgICMgR2V0IHRoZSB1c2VyIGlkIG9mIHRo
ZSB1c2VyIHRvIGFkZGVkLg0KICAgICAgICAgc2V0IFNxbCAiZ3JhbnQgJHBy
aXZzIG9uICR0YWJsZSB0byBncm91cCAkZ3JvdXAiDQogICAgICAgICBzZXQg
cmV0IFtwZ19leGVjICRkYmhuZCAkU3FsXQ0KIA0KICAgICAgICAgIyBHZXQg
dGhlIGVycm9yIHJlc3VsdCBpZiBhbnkuDQogICAgICAgICBzZXQgRGJSZXQg
W3BnX3Jlc3VsdCAkcmV0IC1lcnJvcl0NCiAgICAgICAgIGlmIHskRGJSZXQg
IT0gIiJ9IHsNCiAgICAgICAgICAgIHB1dHMgJERiUmV0DQogICAgICAgICAg
ICBleGl0IDENCiAgICAgICAgIH0NCiAgICAgICANCiAgICAgICAgIHBnX3Jl
c3VsdCAkcmV0IC1jbGVhcg0KICAgICAgfQ0KICAgfQ0KDQogICAjIEhhbmRs
ZSBncm91cCByZXZva2luZy4NCiAgIGlmIHskb3B0aW9uID09ICItIn0gew0K
ICAgICAgIyBQcm9jZXNzIHRoZSB1c2VyIGxpc3QuDQogICAgICBzZXQgdGFi
bGVzIHt9DQogICAgICB3aGlsZSB7MX0gew0KICAgICAgICAgaWYgeyRjbnQg
PiAkYXJnY30gew0KICAgICAgICAgICAgYnJlYWsNCiAgICAgICAgIH0NCiAg
ICAgICAgDQogICAgICAgICBzZXQgdGFibGUgW2xpbmRleCAkYXJndiAkY250
XQ0KICAgICAgICAgaWYge1tzdHJpbmcgdHJpbSAkdGFibGVdID09ICIifSB7
DQogICAgICAgICAgICBpbmNyIGNudA0KICAgICAgICAgICAgY29udGludWUg
ICAgICANCiAgICAgICAgIH0NCiAgICAgIA0KICAgICAgICAgaW5jciBjbnQN
Cg0KICAgICAgICAgIyBTZWUgaWYgdGhlIHRhYmxlIGV4c2lzdHMuDQogICAg
ICAgICBzZXQgU3FsICJzZWxlY3QgdGFibGVuYW1lIFwNCiAgICAgICAgICAg
ICAgICAgIGZyb20gcGdfdGFibGVzIFwNCiAgICAgICAgICAgICAgICAgIHdo
ZXJlIHRhYmxlbmFtZT0nJHRhYmxlJyINCiAgICAgICAgIHNldCByZXQgW3Bn
X2V4ZWMgJGRiaG5kICRTcWxdDQogDQogICAgICAgICAjIEdldCB0aGUgZXJy
b3IgcmVzdWx0IGlmIGFueS4NCiAgICAgICAgIHNldCBEYlJldCBbcGdfcmVz
dWx0ICRyZXQgLWVycm9yXQ0KICAgICAgICAgaWYgeyREYlJldCAhPSAiIn0g
ew0KICAgICAgICAgICAgcHV0cyAkRGJSZXQNCiAgICAgICAgICAgIGV4aXQg
MQ0KICAgICAgICAgfQ0KDQogICAgICAgICBpZiB7W3BnX3Jlc3VsdCAkcmV0
IC1udW1UdXBsZXNdIDwgMX0gew0KICAgICAgICAgICAgcHV0cyAidGFibGUg
JHRhYmxlIGRvZXMgbm90IGV4c2lzdCBpbiAkZGIuIg0KICAgICAgICAgICAg
Y29udGludWUNCiAgICAgICAgIH0NCg0KICAgICAgICAgIyBHZXQgdGhlIHVz
ZXIgaWQgb2YgdGhlIHVzZXIgdG8gYWRkZWQuDQogICAgICAgICBzZXQgU3Fs
ICJyZXZva2UgJHByaXZzIG9uICR0YWJsZSBmcm9tIGdyb3VwICRncm91cCIN
CiAgICAgICAgIHNldCByZXQgW3BnX2V4ZWMgJGRiaG5kICRTcWxdDQogDQog
ICAgICAgICAjIEdldCB0aGUgZXJyb3IgcmVzdWx0IGlmIGFueS4NCiAgICAg
ICAgIHNldCBEYlJldCBbcGdfcmVzdWx0ICRyZXQgLWVycm9yXQ0KICAgICAg
ICAgaWYgeyREYlJldCAhPSAiIn0gew0KICAgICAgICAgICAgcHV0cyAkRGJS
ZXQNCiAgICAgICAgICAgIGV4aXQgMQ0KICAgICAgICAgfQ0KICAgICAgIA0K
ICAgICAgICAgcGdfcmVzdWx0ICRyZXQgLWNsZWFyDQogICAgICB9DQogICB9
DQoNCiAgIGV4aXQgMA0KIyBlbmQgbWFpbg0K
--1255039783-1815777390-944837355=:2750--
From bouncefilter Fri Dec 10 10:02:02 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA67368
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 10:01:11 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA20178;
Fri, 10 Dec 1999 09:59:27 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Fri, 10 Dec 1999 13:38:49 +0100 (MET)
<m11wPJx-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Fri, 10 Dec 1999 09:59:27 -0500
Message-ID: <20175.944837967@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Seems foreign key ability would be enough to justify a 6.6.
Even without foreign keys, we have enough bugfixes in place to justify
a 6.6 release, I think.
As far as I see it now, I can get the FK stuff with MATCH
FULL ready by February first. Must be enough.
If we need another feature to "justify" a release, I think I just
figured out how to do "COUNT(DISTINCT x)" with only maybe a day's work.
Watch this space...
regards, tom lane
From bouncefilter Fri Dec 10 10:12:03 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA68584
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 10:11:46 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgresql.org
id m11wRZv-0003kGC; Fri, 10 Dec 99 16:03 MET
Message-Id: <m11wRZv-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] 6.6 release
To: scrappy@hub.org (The Hermit Hacker)
Date: Fri, 10 Dec 1999 16:03:27 +0100 (MET)
Cc: vev@michvhf.com, tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us,
pgsql-hackers@postgresql.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.BSF.4.21.9912100844170.500-100000@thelab.hub.org> from "The
Hermit Hacker" at Dec 10, 99 08:56:30 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Marc G. Fournier wrote:
when we do up Release 7, which I'd like to make this one, I'd *love* to
make this a whole-hog thing...tag/branch things as REL_7, no minor
number...then its up to the developers to decide whether something is
back-patchable (like they've been doing up until now) with a periodic
release put out while Release 8 is being worked on.
I would really appreceate that. Maybe we need to go ahead in
this manner and make more use of CVS branching.
We have long standing TODO items, which require co work of
multiple developers, affect alot of the code and will take a
long time to implement. Tuple split, fmgr redesign, parsetree
overhaul to name some.
Especially the fact that noone can do them alone IMHO
requires to have a separate branch, where the sources can
stay broken for some time. For example if we change the
parsetree representation, we first change the parser and look
at the printed output's until it fits. Then work on the
planner to get them running and parallel enhance the rewriter
to integrate it again. During this time, the parser will
generate things that may make the entire system unusable, so
any other development would get stuck.
I don't think that all problems could be tackled at once. My
idea is to analyze one of these problems in depth, then
branch off and have the developers, required to get this item
done, doing it separated there. The final result will be a
patch based on an older release, that requires some manual
work to get it merged into the current tree, of course. The
benefit would be, that this long term development would not
be interfered by CURRENT improvements, nor will it delay any
subsequent releasing of funny, neat things.
Just an idea.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 10:09:02 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA68182
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 10:09:01 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA20230;
Fri, 10 Dec 1999 10:06:54 -0500 (EST)
To: The Hermit Hacker <scrappy@hub.org>
cc: Vince Vielhaber <vev@michvhf.com>, Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Fri, 10 Dec 1999 08:56:30 -0400 (AST)
<Pine.BSF.4.21.9912100844170.500-100000@thelab.hub.org>
Date: Fri, 10 Dec 1999 10:06:53 -0500
Message-ID: <20228.944838413@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
The Hermit Hacker <scrappy@hub.org> writes:
On Fri, 10 Dec 1999, Vince Vielhaber wrote:
I thought Marc decided[1] last year to drop the minor.minor version
numbers. IOW, there would be no 6.6.1, 6.6.2, etc. Make the upcoming
release 7.0 and take care of any minor glitches in it as 7.1, 7.2 and
when WAL and the other stuff is ready - or as it's ready - release 8.0
and fix any glitches as 8.1, etc. Currently every minor release is really
a major one, so why not just mark it as such and not worry about it?
when we do up Release 7, which I'd like to make this one, I'd *love* to
make this a whole-hog thing...tag/branch things as REL_7, no minor
number...
Yeah, I was thinking that if we were to call this 7.0 and have plans
for going to 8.0 as soon as WAL &etc are done, then we'd basically be
dropping one level of version number --- no need for a third number
if major revs are that close together. That's OK with me as long as
we all understand that it's a change in naming practices. There are
things we'd need to change to make it work. For example, PG_VERSION
would need to record only the top version number: 7.0 and 7.1 would be
expected to have compatible databases, not incompatible ones.
regards, tom lane
From bouncefilter Fri Dec 10 10:20:02 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA69734
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 10:19:27 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wRi9-0003kGC; Fri, 10 Dec 99 16:11 MET
Message-Id: <m11wRi9-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] 6.6 release
To: darcy@druid.net (D'Arcy" "J.M." Cain)
Date: Fri, 10 Dec 1999 16:11:56 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <m11wQZH-0000cRC@druid.net> from "D'Arcy" "J.M." Cain" at Dec 10,
99 08:58:42 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Thus spake Jan Wieck
As far as I see it now, I can get the FK stuff with MATCH
FULL ready by February first. Must be enough.Any chance of getting the FK semantics into the parser right away even
though it is ignored? As soon as it is there we can start modifying
our CREATE TABLE scripts in preparation for when the underlying code
is there.Hmm. Sounds like an argument I had with Jolly once over PKs. :-)
The current source tree only lacks the parsers part to
specify
INITIALLY DEFERRED|IMMEDIATE
[ NOT ] DEFERRABLE
in a columns REFERENCES clause. They are fully supported in a
tables CONSTRAINT clause.
All the functionality for MATCH FULL is there too already.
Though, it's not well tested up to now, but that's not your
problem I assume.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 10:24:03 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA70317
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 10:23:25 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11wRsi-000EQm-0K; Fri, 10 Dec 1999 15:22:52 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id QAA16641;
Fri, 10 Dec 1999 16:54:21 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV34P>; Fri, 10 Dec 1999 15:19:35 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF73@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Tom Lane'" <tgl@sss.pgh.pa.us>, The Hermit Hacker <scrappy@hub.org>
Cc: Vince Vielhaber <vev@michvhf.com>, Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] 6.6 release
Date: Fri, 10 Dec 1999 15:19:33 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, December 10, 1999 3:07 PM
To: The Hermit Hacker
Cc: Vince Vielhaber; Bruce Momjian; PostgreSQL-development
Subject: Re: [HACKERS] 6.6 release
Yeah, I was thinking that if we were to call this 7.0 and have plans
for going to 8.0 as soon as WAL &etc are done, then we'd basically be
dropping one level of version number --- no need for a third number
if major revs are that close together. That's OK with me as long as
we all understand that it's a change in naming practices. There are
things we'd need to change to make it work. For example, PG_VERSION
would need to record only the top version number: 7.0 and 7.1 would be
expected to have compatible databases, not incompatible ones.
PM: Actually, JDBC only has room for a single Major/Minor pair in it's
api, so it could actually help by having differing version numbers
between releases (JDBC wise).
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
From bouncefilter Fri Dec 10 10:34:03 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA75813
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 10:33:49 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from mcadnote1 (ppm226.noc.fukui.nsk.ne.jp [210.161.188.101])
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id AAA01732; Sat, 11 Dec 1999 00:33:20 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Christof Petig" <christof.petig@wtal.de>
Cc: <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] Volunteer: Large Tuples / Tuple chaining
Date: Sat, 11 Dec 1999 00:33:36 +0900
Message-ID: <NDBBIJLOILGIKBGDINDFAEHICBAA.Inoue@tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <3850299F.C86DEFD6@wtal.de>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Importance: Normal
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Christof PetigHello,
I'll donate some (read all freely available) of my spare time to
implementing tuple
chaining. It looks like this feature is most wanted and it would be a
pity to hold this until post 7.0. Personally I don't need it, yet ...
But I will definitely find a use for it once available ;-) And it looks
like a good start for hacking on pgsql.I already dived into the depth of pgsql's page and tuple structures and
it looks like it is possible. But before I start coding I would like to
hear some more experienced opinions on how to implement it.
Will you put a long tuple into a long logical page(continued multiple
phisical(?) pages) ?
I'm suspicious about the way that allows non-page-formatted page.
Anyway it would need a big change around bufmgr/smgr etc.
Could someone estimate the influence/danger before going forward ?
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Fri Dec 10 10:43:03 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA76885
for <hackers@postgreSQL.org>; Fri, 10 Dec 1999 10:42:18 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA20560;
Fri, 10 Dec 1999 10:41:12 -0500 (EST)
To: Theo Kramer <theo@flame.co.za>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] insert using select with limit
In-reply-to: Your message of Fri, 10 Dec 1999 12:57:17 +0200
<3850DC8D.C412E16C@flame.co.za>
Date: Fri, 10 Dec 1999 10:41:12 -0500
Message-ID: <20558.944840472@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Theo Kramer <theo@flame.co.za> writes:
Just noticed that limit is ignored when using a select to insert
into a table.
Eg. insert into mytable (f1, f2) select f1, f2 from myothertable limit 10;
selects all records from myothertable.
Ugh, you're right. Not sure if this will be easily fixable or not.
Worst case, the fix might have to wait for the long-planned query tree
redesign.
Or it might be a one-liner. Will look into it.
regards, tom lane
From bouncefilter Fri Dec 10 10:45:03 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA77104
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 10:44:02 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA26924;
Fri, 10 Dec 1999 15:43:31 GMT
Sender: lockhart@hub.org
Message-ID: <38511FA3.38B9A5E1@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 15:43:31 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Mount <petermount@it.maidstone.gov.uk>
CC: "'Tom Lane'" <tgl@sss.pgh.pa.us>, "'The Hermit Hacker'" <scrappy@hub.org>,
Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References:
<1B3D5E532D18D311861A00600865478C70BF6A@exchange1.nt.maidstone.gov.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I'm also confused. So far, I've been working on the premise that the
next release would be 7.0 because of the probably major additions
expected, and that I'm hitting the JDBC driver hard to get as much of
the 2.0 spec complete as is possible.
OK, now *I'm* confused too! Peter, what in your stuff *requires* a
version renumbering to 7.0? The proposal was that we consolidate
changes in the backend server for a 6.6 release. Why does JDBC need to
wait for a "7.0" in the version number to support the 2.0 spec?
That was what I was thinking also, until yesterday. I think that the
proposal on the table is simply to consolidate/debug what we've already
done and push it out the door. If you've still got substantial work
left to finish JDBC 2.0, then it'd be better left for the next release.
Right.
I know I have a lot of little loose ends dangling on stuff that's
already "done", and a long list of nitty little bugs to fix, so it
makes sense to me to spend some time in fix-bugs-and-make-a-release
mode before going back into long-haul-feature-development mode.
Now, if other people don't have that feeling, maybe the idea of
a near-term release isn't so hot after all.
Yes I've got that feeling too!! :)
Marc, I'd like to understand why we are pushing 7.0 for this "release
where we are" release. We've (perhaps) got FK support, and a rewritten
psql, and lots of bug fixes, and maybe "join syntax" but not outer
joins. If we release as 7.0, then I'll force the date/time
reunification into this release, since it is a pretty big change to
the backend tables (I've been waiting quite a while already for the
major rev jump to do this).
But we won't have WAL, outer joins, rewritten query tree, etc etc so
why are we pushing the major rev jump now? imho rewriting the query
tree, which affects the parser, planner, optimizer, and perhaps
executor, is as invasive as we'll get; that and WAL should trigger
7.0.
btw, I'm not really happy with the prospect/suggestion of going from
7.0 to 8.0 in a short time period; one of things I'm most satisfied
with in our development is that we have significant minor releases and
that we haven't succumbed to the "major rev only" marketing driven
ploys of the big guys...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 10 10:53:03 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA79508
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 10:52:55 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA26954;
Fri, 10 Dec 1999 15:56:28 GMT
Sender: lockhart@hub.org
Message-ID: <385122AC.DD64A626@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 15:56:28 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
References: <10629.944792540@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
If I allow the <constraint attributes> in column constraints,
I get 2 shift/reduce conflicts. Seems the syntax interferes
with NOT NULL. Actually I commented that part out, so the
complete syntax is available only for table constraints, not
on the column level.Well, I'm not a guru, but I looked anyway. It's a mess. The problem
is that when NOT is the next token, the grammar doesn't know whether
the NOT is starting NOT NULL, which would be a new ColConstraintElem,
or starting NOT DEFERRABLE, which would be part of the current
ColConstraintElem. So it can't decide whether it's time to reduce
the current stack contents to a finished ColConstraintElem or not.
The only way to do that is to look ahead further than the NOT.In short, we no longer have an LR(1) grammar. Yipes.
After a few minutes' thought, it seems that the least unclean way
to attack this problem is to hack up the lexer so that
"NOT<whitespace>NULL" is lexed as a single keyword. Assuming that
that's doable (I haven't tried, but I think it's possible), the
required changes in the grammar would be small. The shift/reduce
problem would go away, since we'd essentially have pushed the
required lookahead into the lexer.It's possible that making this change would even allow us to use
full a_expr rather than b_expr in DEFAULT expressions. I'm not
sure about it, but that'd be a nice side benefit if so.Does anyone see a better answer? This'd definitely be a Big Kluge
from the lexer's point of view, but I don't see an answer at the
grammar level.
I'd like a chance to fix it at the grammar level. It involves mixing
NOT DEFERRABLE and NOT NULL into the same clauses, but if I can work
it out I'd rather isolate the Big Kluges in gram.y, which seems to
collect that kind of stuff. scan.l is still fairly clean...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 10 11:07:04 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id LAA85616
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 11:06:44 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 26107 invoked by uid 1001); 10 Dec 1999 16:06:43 -0000
Date: Fri, 10 Dec 1999 11:06:43 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: Michael Meskes <meskes@postgresql.org>
cc: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] question
In-Reply-To: <19991210142751.A329@fam-meskes.de>
Message-ID: <Pine.BSF.4.05.9912101104140.26069-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, Michael Meskes wrote:
I'd like to set up a system where every employee can log into an intranet
server and enter the time he/she spend on each of the projects. At the end
of the month I'd like to create a list of time per project from this data.My idea was to use PostgreSQL as backend (of course) and a web front-end.
Does anyone have a similar system running? Or any ideas concerning how to
set this up and what software to use?
It would seem rather trivial in PHP to do that. I've done a number of
database routines with PostgreSQL and PHP and most of 'em end up as less
than a page of code (including blank lines).
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null
# include <std/disclaimers.h> Have you seen http://www.pop4.net?
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Fri Dec 10 11:13:03 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA86660
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:12:54 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA20740;
Fri, 10 Dec 1999 11:11:43 -0500 (EST)
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
In-reply-to: Your message of Fri, 10 Dec 1999 15:56:28 +0000
<385122AC.DD64A626@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 11:11:43 -0500
Message-ID: <20738.944842303@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
Does anyone see a better answer? This'd definitely be a Big Kluge
from the lexer's point of view, but I don't see an answer at the
grammar level.
I'd like a chance to fix it at the grammar level. It involves mixing
NOT DEFERRABLE and NOT NULL into the same clauses, but if I can work
it out I'd rather isolate the Big Kluges in gram.y, which seems to
collect that kind of stuff. scan.l is still fairly clean...
Bruce and I were talking about that last night. I think it could be
fixed by having the grammar treat
NOT DEFERRABLE
DEFERRABLE
INITIALLY IMMEDIATE
INITIALLY DEFERRED
as independent ColConstraintElem clauses, and then have a post-pass in
analyze.c that folds the flags into the preceding REFERENCES clause
(and complains if they don't appear right after a REFERENCES clause).
Pretty grotty, especially since you probably wouldn't want to do the
same thing for the other uses of these clauses in TableConstraint
and CreateTrigStmt ... but possibly cleaner than a lexer hack.
Another possible approach is to leave scan.l untouched and put a filter
subroutine between gram.y and scan.l. The filter would normally just
call the scanner and return the token as-is; but when it gets a NOT
token, it would call the scanner again to see if it gets a NULL token.
If so, it returns a single "NOTNULL" token to the grammar; otherwise
it stashes away the lookahead token to return on the next call.
This last approach probably involves the least amount of dirt, but
it does require being able to get in between yacc and lex. I'm not
sure whether we'd have portability problems doing that; never tried it.
regards, tom lane
From bouncefilter Fri Dec 10 11:31:04 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA91957
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:30:57 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA03111;
Fri, 10 Dec 1999 11:21:52 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101621.LAA03111@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <Pine.BSF.4.21.9912100251360.500-100000@thelab.hub.org> from The
Hermit Hacker at "Dec 10, 1999 02:55:18 am"
To: The Hermit Hacker <scrappy@hub.org>
Date: Fri, 10 Dec 1999 11:21:52 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
So we'd be looking at Beta on Feb 1st, with a release around Apr 1st, and
beta for 7 being around June 1st, with 7 release for Sept 1st?
I don't see why we couldn't plan on a Mar 1 final, with the assumption
that the beta will take one month. It may take longer, but it may not.
IMHO, 7 is waiting for Vadim/WAL...we're doing a 6.6 due to him being
indisposed until Mar/Apr, correct?
Not really. We have some big items open, but they are not very far
along, except WAL, and because he can't finish for a while, it makes
sense to release what we have done for the past six months.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 11:34:04 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA92303
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:33:21 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id QAA27037;
Fri, 10 Dec 1999 16:36:54 GMT
Sender: lockhart@hub.org
Message-ID: <38512C26.A1DB607@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 16:36:54 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
References: <20738.944842303@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bruce and I were talking about that last night. I think it could be
fixed by having the grammar treat
NOT DEFERRABLE
DEFERRABLE
INITIALLY IMMEDIATE
INITIALLY DEFERRED
as independent ColConstraintElem clauses, and then have a post-pass in
analyze.c that folds the flags into the preceding REFERENCES clause
(and complains if they don't appear right after a REFERENCES clause).
Pretty grotty, especially since you probably wouldn't want to do the
same thing for the other uses of these clauses in TableConstraint
and CreateTrigStmt ... but possibly cleaner than a lexer hack.
analyze.c already does a grotty scan of the constraint clauses to push
them out into the place Vadim's implementation expects them. We could
identify the FK clauses and push them somewhere else, no problem
(well, at least in principle ;).
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 10 11:43:05 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA93745
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:42:39 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA03615;
Fri, 10 Dec 1999 11:38:42 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101638.LAA03615@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <Pine.BSF.4.05.9912100632020.25498-100000@paprika.michvhf.com>
from Vince Vielhaber at "Dec 10, 1999 06:38:48 am"
To: Vince Vielhaber <vev@michvhf.com>
Date: Fri, 10 Dec 1999 11:38:42 -0500 (EST)
CC: The Hermit Hacker <scrappy@hub.org>, Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I thought Marc decided[1] last year to drop the minor.minor version
numbers. IOW, there would be no 6.6.1, 6.6.2, etc. Make the upcoming
release 7.0 and take care of any minor glitches in it as 7.1, 7.2 and
when WAL and the other stuff is ready - or as it's ready - release 8.0
and fix any glitches as 8.1, etc. Currently every minor release is really
a major one, so why not just mark it as such and not worry about it?Vince.
[1] Or did you do that on inn-workers and not here? It was about the same
time FreeBSD dropped the major.minor.minor for the major.minor numbering.
I don't think it was here. I never heard about it.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 11:43:04 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA93692
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:42:15 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA03630;
Fri, 10 Dec 1999 11:39:28 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101639.LAA03630@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <m11wPJx-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 10, 1999 01:38:49 pm"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 10 Dec 1999 11:39:27 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Seems foreign key ability would be enough to justify a 6.6.
Even without foreign keys, we have enough bugfixes in place to justify
a 6.6 release, I think. If Jan can get some amount of foreign key
support working before Feb, that'd be a nice bonus --- but it's not
really necessary.As far as I see it now, I can get the FK stuff with MATCH
FULL ready by February first. Must be enough.
Foreign key is quite complicated. It will take them a while even to ask
for more than that.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 11:47:04 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA94758
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:47:02 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA03992;
Fri, 10 Dec 1999 11:46:38 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101646.LAA03992@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <20228.944838413@sss.pgh.pa.us> from Tom Lane at "Dec 10,
1999 10:06:53 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 10 Dec 1999 11:46:38 -0500 (EST)
CC: The Hermit Hacker <scrappy@hub.org>, Vince Vielhaber <vev@michvhf.com>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Yeah, I was thinking that if we were to call this 7.0 and have plans
for going to 8.0 as soon as WAL &etc are done, then we'd basically be
dropping one level of version number --- no need for a third number
if major revs are that close together. That's OK with me as long as
we all understand that it's a change in naming practices. There are
things we'd need to change to make it work. For example, PG_VERSION
would need to record only the top version number: 7.0 and 7.1 would be
expected to have compatible databases, not incompatible ones.
Makes sense in that our 6.4->6.5 release is really a major release for
other people, but if we go to the new naming, we are going to get > 10
very soon, and we will start looking like GNU Emacs at version 19 or 20.
We are guilty of our own success in making such big releases.
I vote we keep it the same. Our users already know every release is a
major one, and very high release numbers > 10 look kind of strange to
me.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 11:53:04 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA95794
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:52:14 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA04090;
Fri, 10 Dec 1999 11:51:47 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101651.LAA04090@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <38511FA3.38B9A5E1@alumni.caltech.edu> from Thomas Lockhart at
"Dec 10, 1999 03:43:31 pm"
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 11:51:46 -0500 (EST)
CC: Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>, "'The Hermit Hacker'" <scrappy@hub.org>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Marc, I'd like to understand why we are pushing 7.0 for this "release
where we are" release. We've (perhaps) got FK support, and a rewritten
psql, and lots of bug fixes, and maybe "join syntax" but not outer
joins. If we release as 7.0, then I'll force the date/time
reunification into this release, since it is a pretty big change to
the backend tables (I've been waiting quite a while already for the
major rev jump to do this).
One issue is that while we all want WAL and new query structure and
stuff like that, we don't have end users asking for this repeatedly.
What we do have them asking for is foreign keys.
The major issue seems to be that the 7.0 release is going to have major
incompatibilities for prior releases in the area of date types, and
stuff like that. With all we are doing, I am not sure that is even
going to work because we can't synchonize all the incompatibility stuff
for one release.
Maybe we just call it 7.0, and have some more incompatibility stuff in
7.1. Seems waiting for some .0 release is not going to work, unless we
scrap the Feb 1 beta and just wait for all new stuff to be finished, but
that seems worse than having a 7.1 that contains some incompatiblities.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 12:01:04 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id MAA00801
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 12:00:55 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wTI8-0003kGC; Fri, 10 Dec 99 17:53 MET
Message-Id: <m11wTI8-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
To: lockhart@alumni.caltech.edu (Thomas Lockhart)
Date: Fri, 10 Dec 1999 17:53:12 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <38512C26.A1DB607@alumni.caltech.edu> from "Thomas Lockhart" at
Dec 10, 99 04:36:54 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Thomas Lockhart wrote:
Bruce and I were talking about that last night. I think it could be
fixed by having the grammar treat
NOT DEFERRABLE
DEFERRABLE
INITIALLY IMMEDIATE
INITIALLY DEFERRED
as independent ColConstraintElem clauses, and then have a post-pass in
analyze.c that folds the flags into the preceding REFERENCES clause
(and complains if they don't appear right after a REFERENCES clause).
Pretty grotty, especially since you probably wouldn't want to do the
same thing for the other uses of these clauses in TableConstraint
and CreateTrigStmt ... but possibly cleaner than a lexer hack.analyze.c already does a grotty scan of the constraint clauses to push
them out into the place Vadim's implementation expects them. We could
identify the FK clauses and push them somewhere else, no problem
(well, at least in principle ;).
I already added my own list of constraint clauses, where
foreign key ones are pushed out of the place until the index
stuff is done. Then the list is processed to add the trigger
statements to extras_after. It's enough of crippled code
there IMHO.
I like the other approach by wrapping around yylex() better.
We definitely insist on bison, and ship a prepared gram.c.
And a little test here showed, that having
static int kludge_yylex_wrapper(void);
#define yylex() kludge_yylex_wrapper()
in the top declarations section and defining
#undef yylex()
static int
kludge_yylex_wrapper(void)
{
return yylex();
}
at the very end of gram.y does a fine job, changing totally
nothing. So that's a perfect place to do exactly what Tom
suggested. I don't see any portability issues on that.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 11:56:04 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA96406
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:55:23 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id MAA28355;
Fri, 10 Dec 1999 12:54:48 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 10 Dec 1999 12:54:48 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <38511FA3.38B9A5E1@alumni.caltech.edu>
Message-ID: <Pine.BSF.4.21.9912101243170.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, Thomas Lockhart wrote:
Marc, I'd like to understand why we are pushing 7.0 for this "release
where we are" release. We've (perhaps) got FK support, and a rewritten
psql, and lots of bug fixes, and maybe "join syntax" but not outer
joins. If we release as 7.0, then I'll force the date/time
reunification into this release, since it is a pretty big change to
the backend tables (I've been waiting quite a while already for the
major rev jump to do this).But we won't have WAL, outer joins, rewritten query tree, etc etc so
why are we pushing the major rev jump now? imho rewriting the query
tree, which affects the parser, planner, optimizer, and perhaps
executor, is as invasive as we'll get; that and WAL should trigger
7.0.btw, I'm not really happy with the prospect/suggestion of going from
7.0 to 8.0 in a short time period; one of things I'm most satisfied
with in our development is that we have significant minor releases and
that we haven't succumbed to the "major rev only" marketing driven
ploys of the big guys...
FreeBSD (my role model, always has been) has two trees right now...4.0,
which is the development tree (ie. what I'm proposing as our 8.0), and,
currently, 3.3 for their stable tree. Anything new and wonderful goes
into 4.0...anything deemed "safe" gets back patched to 3.x and
periodically released.
The idea is that anyone can throw anything (within reason) into the 8.0
tree while we still have a stable branch to work on and make releases
on...so any "safe features" can be back-patched to 7.x.
Damn damn damn...I can never explain these things right. The 7.x would,
*at all times* maintain database compatibility with any 7.x release...I
could cvsup down the newest source, build and install it, without any risk
to my current databases...but still get access to a newer feature
set. After a few months of development, like now, we freeze the 7.x
branch and do up a release (7.1) that packages things up.
For instance, if you look at Hub, its running 3.4-RC right now...FreeBSD
just did a 'freeze' for a 3.4 release, and because Hub has its kernel
updated periodically through cvsup, the 'uname -a' output changes with...I
basically keep up with the latest *stable* version of FreeBSD on Hub, but
my home machine, using the same mechanism, runs 4.0-CURRENT, a totally
developmental/experimental version...
I think the project has gotten to such a size, and such a number of
developers, that this is feasible to do...we'd still have our major
releases, but only have minor, not minor.minor releases...
Instead of v6.5.1 after a month of v6.5 being released, we'd have released
v6.6 as being the more current stable version...its just taking things one
step further then what we've done recently with the release of v6.5.3...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Dec 10 11:57:04 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA96607
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 11:56:25 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id MAA28362;
Fri, 10 Dec 1999 12:56:19 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 10 Dec 1999 12:56:19 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Vince Vielhaber <vev@michvhf.com>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <199912101646.LAA03992@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.9912101255190.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, Bruce Momjian wrote:
Makes sense in that our 6.4->6.5 release is really a major release for
other people, but if we go to the new naming, we are going to get > 10
very soon, and we will start looking like GNU Emacs at version 19 or 20.
The other problem is that if we keep going with 6.5->6.6->6.x, we're gonna
hit 6.10, etc...looks funnier, IMHO...and, unless something major comes
along after WAL and all that, never go beyond 7? :)
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Dec 10 12:04:04 1999
Received: from alert.infoplease.com (range.infoplease.com [208.222.166.25])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA01371
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 12:03:16 -0500 (EST)
(envelope-from kdebisschop@range.infoplease.com)
Received: from skillet.infoplease.com (skillet [10.0.1.212])
by alert.infoplease.com (8.9.3+Sun/8.9.3) with ESMTP id MAA18419
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 12:02:40 -0500 (EST)
Received: (from kdebisschop@localhost)
by skillet.infoplease.com (8.9.3/8.9.1) id MAA27140;
Fri, 10 Dec 1999 12:02:46 -0500
Date: Fri, 10 Dec 1999 12:02:46 -0500
Message-Id: <199912101702.MAA27140@skillet.infoplease.com>
X-Authentication-Warning: skillet.infoplease.com: kdebisschop set sender to
kdebisschop@spaceheater.infoplease.com using -f
From: Karl DeBisschop <kdebisschop@range.infoplease.com>
To: pgsql-general@postgreSQL.org
Subject: \d shows all my tables twice
Reply-to: kdebisschop@range.infoplease.com
I'm using the postgresql-6.5.3-1 rpm from PostgreSQLs website on
redhat 6.0
Some time between yesterday and today postgres developed the habit of
listing all may table twice when I do \d or \dS from psql. Right now
this is only annoying, but does this mean there is a system corruption
I need to fix?
I've destroyed all my databases other than template1 and vacuumed in
template1. My next thought is to reinstall, but I'd rather not if I
don't have too.
--
Karl DeBisschop <kdebisschop@alert.infoplease.com>
617.832.0332 (Fax: 617.956.2696)
Information Please - your source for FREE online reference
http://www.infoplease.com - Your Ultimate Fact Finder
http://kids.infoplease.com - The Great Homework Helper
Netsaint Development
http://netsaintplug.sourceforge.net
From bouncefilter Fri Dec 10 12:19:04 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id MAA05188
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 12:18:20 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wTYi-0003kGC; Fri, 10 Dec 99 18:10 MET
Message-Id: <m11wTYi-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] 6.6 release
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Fri, 10 Dec 1999 18:10:20 +0100 (MET)
Cc: lockhart@alumni.caltech.edu, petermount@it.maidstone.gov.uk,
tgl@sss.pgh.pa.us, scrappy@hub.org, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912101651.LAA04090@candle.pha.pa.us> from "Bruce Momjian" at
Dec 10, 99 11:51:46 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
One issue is that while we all want WAL and new query structure and
stuff like that, we don't have end users asking for this repeatedly.
What we do have them asking for is foreign keys.The major issue seems to be that the 7.0 release is going to have major
incompatibilities for prior releases in the area of date types, and
stuff like that. With all we are doing, I am not sure that is even
going to work because we can't synchonize all the incompatibility stuff
for one release.Maybe we just call it 7.0, and have some more incompatibility stuff in
7.1. Seems waiting for some .0 release is not going to work, unless we
scrap the Feb 1 beta and just wait for all new stuff to be finished, but
that seems worse than having a 7.1 that contains some incompatiblities.
Now that you say it,
not just maybe, definitely call it 7.0!
As said on the phone, the deferred trigger queue required for
the FOREIGN KEY stuff delays all AFTER ROW trigger for
execution at least past the entire statement.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 12:16:04 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA04524
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 12:15:25 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA04476;
Fri, 10 Dec 1999 12:15:13 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101715.MAA04476@candle.pha.pa.us>
Subject: Re: [GENERAL] \d shows all my tables twice
In-Reply-To: <199912101702.MAA27140@skillet.infoplease.com> from Karl
DeBisschop at "Dec 10, 1999 12:02:46 pm"
To: kdebisschop@range.infoplease.com
Date: Fri, 10 Dec 1999 12:15:13 -0500 (EST)
CC: pgsql-general@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
You have duplicate entries in pg_shadow/pg_user table.
I'm using the postgresql-6.5.3-1 rpm from PostgreSQLs website on
redhat 6.0Some time between yesterday and today postgres developed the habit of
listing all may table twice when I do \d or \dS from psql. Right now
this is only annoying, but does this mean there is a system corruption
I need to fix?I've destroyed all my databases other than template1 and vacuumed in
template1. My next thought is to reinstall, but I'd rather not if I
don't have too.--
Karl DeBisschop <kdebisschop@alert.infoplease.com>
617.832.0332 (Fax: 617.956.2696)Information Please - your source for FREE online reference
http://www.infoplease.com - Your Ultimate Fact Finder
http://kids.infoplease.com - The Great Homework HelperNetsaint Development
http://netsaintplug.sourceforge.net************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 12:19:05 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA05133
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 12:18:08 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id RAA27158;
Fri, 10 Dec 1999 17:21:14 GMT
Sender: lockhart@hub.org
Message-ID: <3851368A.5744EC95@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 17:21:14 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: The Hermit Hacker <scrappy@hub.org>
CC: Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References: <Pine.BSF.4.21.9912101243170.500-100000@thelab.hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I think the project has gotten to such a size, and such a number of
developers, that this is feasible to do...we'd still have our major
releases, but only have minor, not minor.minor releases...
Hmm. Pretty sure I don't agree that we have enough developers to
handle this...
Instead of v6.5.1 after a month of v6.5 being released, we'd have released
v6.6 as being the more current stable version...its just taking things one
step further then what we've done recently with the release of v6.5.3...
OK, I *think* I understand your suggestion. If that is the way the
project goes, OK, but I'm not happy about it, really. If we had been
doing this scheme since v6.0, we would have gone from v6.0 to v11.3 in
2.5-3 years, with (from my saved tarballs and the release notes):
v6.0 (6.0 series)
v7.0 (6.1 series)
v7.1
v8.0 (6.2 series)
v8.1
v9.0 (6.3 series)
v9.1
v9.2
v10.0 (v6.4 series)
v10.1
v10.2
v11.0 (6.5 series)
v11.1
v11.2
v11.3
Oh, btw, virtually no minor release has new features (since they all
preserve DB contents and structure), just fixes for code breakage.
I'd like to put dates on the releases, to point out that in several
instances we went from vX.0 to vX.1 in two to four weeks :(
Actually, this is the slippery road to name and version escalation: we
should have released "PostgreSQL+", "PostgreSQL Pro", "PostgreSQL
Developers Edition", "PostgreSQL++", "PostgreSQL II", "PostgreSQL
Pro+", etc by now ;)
That way, we can have a v2.0 of a bunch of products, and people will
think we're doing real development without ever checking that we are.
Works for other folks, but I don't see what it buys us.
OK, I've had a bit of fun with this, and I'll shut up now (well,
maybe), but I don't think that escalating our version numbering fixes
problems, and just means that we have a "R10" (a la "Y2K") problem
sooner rather than later.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 10 12:23:04 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA06030
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 12:22:01 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA04951;
Fri, 10 Dec 1999 12:21:24 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101721.MAA04951@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <3851368A.5744EC95@alumni.caltech.edu> from Thomas Lockhart at
"Dec 10, 1999 05:21:14 pm"
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 12:21:24 -0500 (EST)
CC: The Hermit Hacker <scrappy@hub.org>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I think the project has gotten to such a size, and such a number of
developers, that this is feasible to do...we'd still have our major
releases, but only have minor, not minor.minor releases...Hmm. Pretty sure I don't agree that we have enough developers to
handle this...
Agreed.
OK, I've had a bit of fun with this, and I'll shut up now (well,
maybe), but I don't think that escalating our version numbering fixes
problems, and just means that we have a "R10" (a la "Y2K") problem
sooner rather than later.
Agreed.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 12:23:05 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA06126
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 12:22:19 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id NAA28773;
Fri, 10 Dec 1999 13:22:11 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Fri, 10 Dec 1999 13:22:10 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <199912101651.LAA04090@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.9912101321390.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Incompatibilities from one release to the next *has* to bump the major
version...a minor number should be a *minor* upgrade, plain and simple...
On Fri, 10 Dec 1999, Bruce Momjian wrote:
Marc, I'd like to understand why we are pushing 7.0 for this "release
where we are" release. We've (perhaps) got FK support, and a rewritten
psql, and lots of bug fixes, and maybe "join syntax" but not outer
joins. If we release as 7.0, then I'll force the date/time
reunification into this release, since it is a pretty big change to
the backend tables (I've been waiting quite a while already for the
major rev jump to do this).One issue is that while we all want WAL and new query structure and
stuff like that, we don't have end users asking for this repeatedly.
What we do have them asking for is foreign keys.The major issue seems to be that the 7.0 release is going to have major
incompatibilities for prior releases in the area of date types, and
stuff like that. With all we are doing, I am not sure that is even
going to work because we can't synchonize all the incompatibility stuff
for one release.Maybe we just call it 7.0, and have some more incompatibility stuff in
7.1. Seems waiting for some .0 release is not going to work, unless we
scrap the Feb 1 beta and just wait for all new stuff to be finished, but
that seems worse than having a 7.1 that contains some incompatiblities.-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Fri Dec 10 12:26:04 1999
Received: from alert.infoplease.com (range.infoplease.com [208.222.166.25])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA06842
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 12:25:37 -0500 (EST)
(envelope-from kdebisschop@range.infoplease.com)
Received: from skillet.infoplease.com (skillet [10.0.1.212])
by alert.infoplease.com (8.9.3+Sun/8.9.3) with ESMTP id MAA19578
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 12:25:01 -0500 (EST)
Received: (from kdebisschop@localhost)
by skillet.infoplease.com (8.9.3/8.9.1) id MAA27793;
Fri, 10 Dec 1999 12:25:06 -0500
Date: Fri, 10 Dec 1999 12:25:06 -0500
Message-Id: <199912101725.MAA27793@skillet.infoplease.com>
X-Authentication-Warning: skillet.infoplease.com: kdebisschop set sender to
kdebisschop@spaceheater.infoplease.com using -f
From: Karl DeBisschop <kdebisschop@range.infoplease.com>
To: pgsql-general@postgreSQL.org
In-reply-to: <199912101715.MAA04476@candle.pha.pa.us> (message from Bruce
Momjian on Fri, 10 Dec 1999 12:15:13 -0500 (EST))
Subject: Re: [GENERAL] \d shows all my tables twice
Reply-to: kdebisschop@range.infoplease.com
References: <199912101715.MAA04476@candle.pha.pa.us>
From: Bruce Momjian <pgman@candle.pha.pa.us>
You have duplicate entries in pg_shadow/pg_user table.
I'm using the postgresql-6.5.3-1 rpm from PostgreSQLs website on
redhat 6.0Some time between yesterday and today postgres developed the habit of
listing all may table twice when I do \d or \dS from psql. Right now
this is only annoying, but does this mean there is a system corruption
I need to fix?I've destroyed all my databases other than template1 and vacuumed in
template1. My next thought is to reinstall, but I'd rather not if I
don't have too.--
Karl DeBisschop <kdebisschop@alert.infoplease.com>
Dead on right. Duplicates for postgres itself and the two admins.
Thanks.
By the way, you guys are great. I really appreciate the work you do.
And I wanted to say the the RPM packaging was very well done in my
opinion - it installed like a dream, and the init script did a perfect
job of saving me the effort of manually initializing the DBMS. Kudos
to all involved.
--
Karl DeBisschop <kdebisschop@alert.infoplease.com>
617.832.0332 (Fax: 617.956.2696)
Information Please - your source for FREE online reference
http://www.infoplease.com - Your Ultimate Fact Finder
http://kids.infoplease.com - The Great Homework Helper
Netsaint Plugins Development
http://netsaintplug.sourceforge.net
From bouncefilter Fri Dec 10 12:25:04 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA06509
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 12:24:04 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id RAA27183;
Fri, 10 Dec 1999 17:26:59 GMT
Sender: lockhart@hub.org
Message-ID: <385137E3.ED4E145B@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 17:26:59 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: The Hermit Hacker <scrappy@hub.org>
CC: Bruce Momjian <pgman@candle.pha.pa.us>, Tom Lane <tgl@sss.pgh.pa.us>,
Vince Vielhaber <vev@michvhf.com>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References: <Pine.BSF.4.21.9912101255190.500-100000@thelab.hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The other problem is that if we keep going with 6.5->6.6->6.x, we're gonna
hit 6.10, etc...looks funnier, IMHO...and, unless something major comes
along after WAL and all that, never go beyond 7? :)
v8.0: Corba, or XML, or one of those IBM standard protocol things for
fe/be
v9.0: multiple database access
v10.0: distributed databases
v11.0: features released as M$Postgres-1.0 after M$ owns every ISP
scrappy could use, cuts off access, and takes over the sources
;) :)))
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Mon Dec 13 22:01:00 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA61914
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 22:00:03 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id RAA27215;
Fri, 10 Dec 1999 17:41:01 GMT
Sender: lockhart@hub.org
Message-ID: <38513B2D.3F132547@alumni.caltech.edu>
Date: Fri, 10 Dec 1999 17:41:01 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: The Hermit Hacker <scrappy@hub.org>
CC: Bruce Momjian <pgman@candle.pha.pa.us>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References: <Pine.BSF.4.21.9912101321390.500-100000@thelab.hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Incompatibilities from one release to the next *has* to bump the major
version...a minor number should be a *minor* upgrade, plain and simple...
Fine. But I'm happy with "minor" Postgres improvements counting as
"major" for other packages. We're doing a better job then lots of
commercial companies in improving the product; I'd hate to try
matching some of their pathetic release bumps in our version numbering
since by that standard we should be *skipping* some of the whole
numbers.
Lets see,
Solaris 2.7 == SunOS 5.5 (or is it 5.4?) == Solaris 7
JDK1.2 == Java1.2 == Java 2
Win98 != Win98 Rel2 != Win98 Rel2 Hotfix x != ...
Yuck.
imo the *only* reason we are tempted to do more major releases is that
we are too lazy/understaffed/sensible (you pick it) to support
multiple db formats for our compiled code. Other commercial DBs don't
release often, and they don't include big improvements, but they *do*
include support for multiple db formats/schemas in their product, so
you aren't forced into an initdb for each release. Instead they
include klugy workaround code to allow reading older formats with the
newer version.
Good things are being said about us, and people are noticing that the
product has improved from v6.0 to v6.5. We don't need to be at v11.0
to get noticed; in fact it may look a little silly...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 10 12:48:04 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA14416
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 12:47:19 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA20030;
Fri, 10 Dec 1999 12:47:06 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101747.MAA20030@candle.pha.pa.us>
Subject: Re: [GENERAL] \d shows all my tables twice
In-Reply-To: <199912101725.MAA27793@skillet.infoplease.com> from Karl
DeBisschop at "Dec 10, 1999 12:25:06 pm"
To: kdebisschop@range.infoplease.com
Date: Fri, 10 Dec 1999 12:47:06 -0500 (EST)
CC: pgsql-general@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Dead on right. Duplicates for postgres itself and the two admins.
Thanks.By the way, you guys are great. I really appreciate the work you do.
And I wanted to say the the RPM packaging was very well done in my
opinion - it installed like a dream, and the init script did a perfect
job of saving me the effort of manually initializing the DBMS. Kudos
to all involved.
Next release will not allow this problem to happen.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 12:53:05 1999
Received: from galileo.csun.edu (swalton@galileo.csun.edu [130.166.114.38])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA15298
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 12:52:49 -0500 (EST)
(envelope-from swalton@galileo.csun.edu)
Received: from localhost (swalton@localhost)
by galileo.csun.edu (8.8.6 (PHNE_17135)/8.8.6) with ESMTP id JAA08280
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 09:52:47 -0800 (PST)
Date: Fri, 10 Dec 1999 09:52:47 -0800 (PST)
From: Stephen Walton <swalton@galileo.csun.edu>
Reply-To: swalton@galileo.csun.edu
cc: pgsql-general@postgreSQL.org
Subject: Re: [GENERAL] \d shows all my tables twice
In-Reply-To: <199912101725.MAA27793@skillet.infoplease.com>
Message-ID: <Pine.HPX.4.03.9912100949340.7460-100000@galileo.csun.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
I second Karl DeBisschop's comments below. It took me hours to get
postgresql working on an HP/UX system, compared with minutes on Linux.
I'm using Linux as our main database server now.
By the way, I know about using pg_dump to backup the database and I do
that. Is there a good way to maintain a second identical copy of the
database on another machine? Will simply copying the dump over and
restoring it with psql do the trick? Would I need to delete an old copy
of the same database first? We have a somewhat slow Internet connection
to our Linux system's location and it would be nice to have an alternate
site with the same data.
--
Stephen Walton, Professor of Physics and Astronomy,
California State University, Northridge
stephen.walton@csun.edu
On Fri, 10 Dec 1999, Karl DeBisschop wrote:
By the way, you guys are great. I really appreciate the work you do.
And I wanted to say the the RPM packaging was very well done in my
opinion - it installed like a dream, and the init script did a perfect
job of saving me the effort of manually initializing the DBMS. Kudos
to all involved.
From bouncefilter Fri Dec 10 13:10:05 1999
Received: from alert.infoplease.com (range.infoplease.com [208.222.166.25])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA20696
for <pgsql-general@postgreSQL.org>;
Fri, 10 Dec 1999 13:09:49 -0500 (EST)
(envelope-from kdebisschop@range.infoplease.com)
Received: from skillet.infoplease.com (skillet [10.0.1.212])
by alert.infoplease.com (8.9.3+Sun/8.9.3) with ESMTP id NAA20488;
Fri, 10 Dec 1999 13:09:13 -0500 (EST)
Received: (from kdebisschop@localhost)
by skillet.infoplease.com (8.9.3/8.9.1) id NAA30180;
Fri, 10 Dec 1999 13:09:18 -0500
Date: Fri, 10 Dec 1999 13:09:18 -0500
Message-Id: <199912101809.NAA30180@skillet.infoplease.com>
X-Authentication-Warning: skillet.infoplease.com: kdebisschop set sender to
kdebisschop@spaceheater.infoplease.com using -f
From: Karl DeBisschop <kdebisschop@range.infoplease.com>
To: swalton@galileo.csun.edu
CC: pgsql-general@postgreSQL.org
In-reply-to: <Pine.HPX.4.03.9912100949340.7460-100000@galileo.csun.edu>
(message from Stephen Walton on Fri, 10 Dec 1999 09:52:47 -0800 (PST))
Subject: Mirroring a DB (was Re: [GENERAL] \d shows all my tables twice)
Reply-to: kdebisschop@range.infoplease.com
References: <Pine.HPX.4.03.9912100949340.7460-100000@galileo.csun.edu>
By the way, I know about using pg_dump to backup the database and I do
that. Is there a good way to maintain a second identical copy of the
database on another machine? Will simply copying the dump over and
restoring it with psql do the trick? Would I need to delete an old copy
of the same database first? We have a somewhat slow Internet connection
to our Linux system's location and it would be nice to have an alternate
site with the same data.
We sometimes do:
pg_dump -o -h <live> <table> | psql -h <mirror> <table>
(Note that you will probably want -z as well if pre-6.5)
This generally works, but has a habit recreating the views as actual
tables. Often you can live with this, and there may be a simple way
to prevent it. I just haven't found one yet.
--
Karl DeBisschop <kdebisschop@alert.infoplease.com>
617.832.0332 (Fax: 617.956.2696)
Information Please - your source for FREE online reference
http://www.infoplease.com - Your Ultimate Fact Finder
http://kids.infoplease.com - The Great Homework Helper
Netsaint Plugins Development
http://netsaintplug.sourceforge.net
From bouncefilter Fri Dec 10 13:42:06 1999
Received: from pacs04.infoave.net (IDENT:2420C67A@pacs04.InfoAve.Net
[165.166.0.14]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA27829
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 13:41:39 -0500 (EST)
(envelope-from JSCOTTB@InfoAve.Net)
Received: from InfoAve.Net by InfoAve.Net (PMDF V5.1-12 #23426)
id <01JJC75UWMWWA0VOKV@InfoAve.Net> for pgsql-hackers@postgreSQL.org;
Fri, 10 Dec 1999 13:41:24 EST
Date: Fri, 10 Dec 1999 13:41:24 -0500 (EST)
From: jscottb@InfoAve.Net
Subject: First draft of pg_group admin tool.
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Message-id: <Pine.PMDF.3.95.991210132947.606139951A-100000@InfoAve.Net>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII
Well this is my first post to this list, so be gentle ;-). I have
written a small utility I use and wanted to get it out and better
tested :-)
With it you should be able to do most group amin, without going into psql.
It has the following syntax:
usage: pg_group options -- dB group [user ...] || [table ...]
where options is one of:
-c create group
-d delete group
-a add user(s) to group
-r remove user(s) to group
+g give group access to tables
-g revoke group access to tables
-p privlages to grant/revoke. This is only used with the +g and -g
options.
-- end of switches.
examples:
pg_group -c -- guestbook grp_gstbook_usr nobody tux
pg_group -a -- guestbook grp_gstbook_usr webuser
pg_group -d -- guestbook grp_gstbook_usr
pg_group -r -- guestbook grp_gstbook_usr nobody
pg_group +g -p "insert,select" -- guestbook grp_gstbook_usr gstbook
pg_group -g -p "insert" -- guestbook grp_gstbook_usr gstbook
you can get it from: http://www.lowcountry.com/~jscottb/pg_group.tar.gz.
If you have any questions, comments, patches or total rewrites email me
at: jscottb@infoave.com
scott
From bouncefilter Fri Dec 10 14:01:06 1999
Received: from smtp01.infoave.net (smtp01.infoave.net [165.166.0.26])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA31081
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 14:00:45 -0500 (EST)
(envelope-from jscottb@infoave.com)
Received: from [207.144.139.136] ("port 1034"@[207.144.139.136])
by SMTP00.InfoAve.Net (PMDF V5.1-12 #23426)
with ESMTP id <01JJC7QVH4DU8ZE9ET@SMTP00.InfoAve.Net> for
pgsql-hackers@postgreSQL.org; Fri, 10 Dec 1999 13:58:29 EST
Date: Fri, 10 Dec 1999 13:52:36 -0500 (EST)
From: Scott Beasley <jscottb@infoave.com>
Subject: First draft of pg_group admin tool.
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Message-id: <Pine.LNX.4.10.9912101350100.707-100000@cowbox.infoave.com>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII
Well this is my first post to this list, so be gentle ;-). I have
written a small utility I use and wanted to get it out and better
tested :-)
With it you should be able to do most group amin, without going into psql.
It has the following syntax:
usage: pg_group options -- dB group [user ...] || [table ...]
where options is one of:
-c create group
-d delete group
-a add user(s) to group
-r remove user(s) to group
+g give group access to tables
-g revoke group access to tables
-p privlages to grant/revoke. This is only used with the +g and -g
options.
-- end of switches.
examples:
pg_group -c -- guestbook grp_gstbook_usr nobody tux
pg_group -a -- guestbook grp_gstbook_usr webuser
pg_group -d -- guestbook grp_gstbook_usr
pg_group -r -- guestbook grp_gstbook_usr nobody
pg_group +g -p "insert,select" -- guestbook grp_gstbook_usr gstbook
pg_group -g -p "insert" -- guestbook grp_gstbook_usr gstbook
you can get it from: http://www.lowcountry.com/~jscottb/pg_group.tar.gz
If you have any questions, comments, patches or total rewrites email me
at: jscottb@infoave.com
scott
From bouncefilter Fri Dec 10 14:12:06 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA33371;
Fri, 10 Dec 1999 14:11:33 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id OAA22526;
Fri, 10 Dec 1999 14:11:34 -0500
Message-ID: <3851505E.55BCD5A1@wgcr.org>
Date: Fri, 10 Dec 1999 14:11:26 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Vince Vielhaber <vev@michvhf.com>
CC: Michael Meskes <meskes@postgreSQL.org>,
PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] question
References: <Pine.BSF.4.05.9912101104140.26069-100000@paprika.michvhf.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Vince Vielhaber wrote:
On Fri, 10 Dec 1999, Michael Meskes wrote:
I'd like to set up a system where every employee can log into an intranet
server and enter the time he/she spend on each of the projects. At the end
of the month I'd like to create a list of time per project from this data.
It would seem rather trivial in PHP to do that. I've done a number of
database routines with PostgreSQL and PHP and most of 'em end up as less
than a page of code (including blank lines).
Try onShore TimeSheet, which uses PostgreSQL -- www.onshoretimesheet.org
--
Lamar Owen
WGCR Internet Radio
From bouncefilter Fri Dec 10 14:32:06 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA37833
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 14:31:11 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
OAA29438;
Fri, 10 Dec 1999 14:17:28 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912101917.OAA29438@candle.pha.pa.us>
Subject: Re: [HACKERS] Weired FK problem
In-Reply-To: <m11w9TB-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 9, 1999 08:43:17 pm"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 10 Dec 1999 14:17:28 -0500 (EST)
CC: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Looks like it works. I just tried a related item:
Now the other way round:
(S1) insert into t1 values (1);
(S1) begin;
(S2) delete from t1 where a = 1;
(S1) insert into t2 values (1);
I swapped the above two items, and the INSERT properly failed the
contraint.
(S2) -- Session is now blocked
(S1) commit;
(S2) -- Session continues without error
I was a little unsure how trigger visibility was going to handle cases
where the constraint failure happened after the other transaction
started, but it seems to work fine.
It is only the trigger that has full visibility, not the statements in
the query, right?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 15:03:07 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id PAA43649
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 15:02:45 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wVvK-0003kGC; Fri, 10 Dec 99 20:41 MET
Message-Id: <m11wVvK-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Weired FK problem
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Fri, 10 Dec 1999 20:41:50 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912101917.OAA29438@candle.pha.pa.us> from "Bruce Momjian" at
Dec 10, 99 02:17:28 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
Looks like it works. I just tried a related item:
Now the other way round:
(S1) insert into t1 values (1);
(S1) begin;(S2) delete from t1 where a = 1;
(S1) insert into t2 values (1);I swapped the above two items, and the INSERT properly failed the
contraint.(S2) -- Session is now blocked
(S1) commit;
(S2) -- Session continues without error
I was a little unsure how trigger visibility was going to handle cases
where the constraint failure happened after the other transaction
started, but it seems to work fine.
I already committed the visibility overriding by RI triggers
for time qualification. Maybe you're seeing the results of
this little hack.
It is only the trigger that has full visibility, not the statements in
the query, right?
That's the behaviour I wanted to get from it. RI triggers
need to see what's committed and what their own transaction
did so far. That's HeapTupleSatisfiesNow().
Since they lock everything they access, they simply force the
old (pre MVCC) behaviour - wait if something is actually in
use until the other transaction ends. No snapshots, no pain.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 15:10:06 1999
Received: from pille.addcom.de (qmailr@h-62.96.128.34.host.de.colt.net
[62.96.128.34]) by hub.org (8.9.3/8.9.3) with SMTP id PAA44384
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 15:09:22 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: (qmail 22111 invoked from network); 10 Dec 1999 20:09:09 -0000
Received: from f-dialin-887.addcom.de (root@62.96.142.143)
by pille.addcom.de with SMTP; 10 Dec 1999 20:09:09 -0000
Received: (from michael@localhost)
by tanja.fam-meskes.de (8.9.3/8.9.3/Debian 8.9.3-6) id UAA01480
for pgsql-hackers@postgresql.org; Fri, 10 Dec 1999 20:55:34 +0100
Date: Fri, 10 Dec 1999 20:55:34 +0100
From: Michael Meskes <meskes@postgresql.org>
To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] question
Message-ID: <19991210205534.A1433@fam-meskes.de>
Mail-Followup-To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
References: <19991210142751.A329@fam-meskes.de>
<Pine.BSF.4.05.9912101104140.26069-100000@paprika.michvhf.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0i
In-Reply-To: <Pine.BSF.4.05.9912101104140.26069-100000@paprika.michvhf.com>;
from vev@michvhf.com on Fri, Dec 10, 1999 at 11:06:43AM -0500
On Fri, Dec 10, 1999 at 11:06:43AM -0500, Vince Vielhaber wrote:
It would seem rather trivial in PHP to do that. I've done a number of
database routines with PostgreSQL and PHP and most of 'em end up as less
than a page of code (including blank lines).
That's the kind of answer I expected. But I still hope I can get along with
less programming on my part. :-)
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Fri Dec 10 15:41:07 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id PAA50359
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 15:40:37 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 26813 invoked by uid 1001); 10 Dec 1999 20:40:39 -0000
Message-ID: <XFMail.991210154039.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <19991210205534.A1433@fam-meskes.de>
Date: Fri, 10 Dec 1999 15:40:39 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: Michael Meskes <meskes@postgreSQL.org>
Subject: Re: [HACKERS] question
Cc: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
On 10-Dec-99 Michael Meskes wrote:
On Fri, Dec 10, 1999 at 11:06:43AM -0500, Vince Vielhaber wrote:
It would seem rather trivial in PHP to do that. I've done a number of
database routines with PostgreSQL and PHP and most of 'em end up as less
than a page of code (including blank lines).That's the kind of answer I expected. But I still hope I can get along with
less programming on my part. :-)
Right, but the reason I suggested doing it that way is something as small
as this is usually quicker to do it yourself than installing a package.
Alot of the packages that should be simple (and probably are) end up taking
3-4 hours to figure out, install and setup and may not fit the bill vs an
hour or so knocking something out that would be exactly what you want.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null
# include <std/disclaimers.h> Have you seen http://www.pop4.net?
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Fri Dec 10 16:01:06 1999
Received: from durham2-128.dsl.gtei.net (postfix@durham2-128.dsl.gtei.net
[4.3.2.128]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA52678;
Fri, 10 Dec 1999 16:00:10 -0500 (EST)
(envelope-from mdorman@durham2-128.dsl.gtei.net)
Received: by durham2-128.dsl.gtei.net (Postfix, from userid 1000)
id 316512B094; Fri, 10 Dec 1999 16:00:08 -0500 (EST)
Sender: mdorman@gte.net
To: Lamar Owen <lamar.owen@wgcr.org>
From: mdorman-pgsql.hackers@debian.org
Cc: Vince Vielhaber <vev@michvhf.com>, Michael Meskes <meskes@postgresql.org>,
PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] question
References: <Pine.BSF.4.05.9912101104140.26069-100000@paprika.michvhf.com>
<3851505E.55BCD5A1@wgcr.org>
Date: 10 Dec 1999 16:00:08 -0500
In-Reply-To: Lamar Owen's message of "Fri, 10 Dec 1999 14:11:26 -0500"
Message-ID: <877limwlyf.fsf@juliet.private.net>
Lines: 7
User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) Emacs/20.4
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lamar Owen <lamar.owen@wgcr.org> writes:
Try onShore TimeSheet, which uses PostgreSQL -- www.onshoretimesheet.org
It's doubly amusing that you suggest this, since the author, like
Michael himself, is a Debian developer. :-)
Mike.
From bouncefilter Fri Dec 10 16:54:07 1999
Received: from durham2-128.dsl.gtei.net (postfix@durham2-128.dsl.gtei.net
[4.3.2.128]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA63826
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 16:54:05 -0500 (EST)
(envelope-from mdorman@durham2-128.dsl.gtei.net)
Received: by durham2-128.dsl.gtei.net (Postfix, from userid 1000)
id D43F72B094; Fri, 10 Dec 1999 16:54:03 -0500 (EST)
Sender: mdorman@gte.net
To: Olivier PRENANT <ohp@pyrenet.fr>
From: mdorman-pgsql.hackers@debian.org
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] postgresql authentification for popper
References: <3847BDDC.6999B7D9@pyrenet.fr>
Date: 10 Dec 1999 16:54:03 -0500
In-Reply-To: Olivier PRENANT's message of "Fri, 03 Dec 1999 13:55:56 +0100"
Message-ID: <873dtawjgk.fsf@juliet.private.net>
Lines: 17
User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) Emacs/20.4
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Olivier PRENANT <ohp@pyrenet.fr> writes:
I have no problem with the system or sendmail. But I'm afraid that
popper (either pop3 or imap) won't be able to authentificate users the
standard way (/etc/passwd) does anyone knows if a version of imapd or
ipop3d has been modified to allow postgresql authentification.If not, could you give me some pointers.
Recent versions of UW IMAPD are PAM-enabled (on OSs that speak PAM),
and there is, I believe a PAM module for PostgreSQL authentication.
The 1.5.X cyrus IMAPD has patches to allow authentication against
PostgreSQL. 1.6.X went to using SASL, which means the patches against
1.5.X are no longer relevant, but I believe the SASL library is
PAM-enabled, so it can also use the PAM/PostgreSQL module.
Mike.
From bouncefilter Fri Dec 10 17:28:08 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA69602
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 17:27:28 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
RAA01407;
Fri, 10 Dec 1999 17:23:38 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912102223.RAA01407@candle.pha.pa.us>
Subject: Re: [HACKERS] Weired FK problem
In-Reply-To: <m11wVvK-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 10, 1999 08:41:50 pm"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 10 Dec 1999 17:23:38 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
That's the behaviour I wanted to get from it. RI triggers
need to see what's committed and what their own transaction
did so far. That's HeapTupleSatisfiesNow().Since they lock everything they access, they simply force the
old (pre MVCC) behaviour - wait if something is actually in
use until the other transaction ends. No snapshots, no pain.
Sounds good.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 18:36:08 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA83982
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 18:35:19 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wZS6-0003kGC; Sat, 11 Dec 99 00:27 MET
Message-Id: <m11wZS6-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Error in new psql
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Sat, 11 Dec 1999 00:27:54 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter,
I just noticed that the new psql doesn't handle semicolon
inside of unmatched parentheses correct any more. This is a
requirement for defining multi action rules and was properly
supported by v6.5.* psql.
The CURRENT version submits the query buffer as soon, as it
encounters the first semicolon outside of a string literal,
and that is wrong according to the definition of CREATE RULE.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 19:25:09 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA92152
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 19:24:53 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA03470;
Fri, 10 Dec 1999 19:13:53 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912110013.TAA03470@candle.pha.pa.us>
Subject: Re: [HACKERS] Error in new psql
In-Reply-To: <m11wZS6-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 00:27:54 am"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 10 Dec 1999 19:13:53 -0500 (EST)
CC: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Peter,
I just noticed that the new psql doesn't handle semicolon
inside of unmatched parentheses correct any more. This is a
requirement for defining multi action rules and was properly
supported by v6.5.* psql.The CURRENT version submits the query buffer as soon, as it
encounters the first semicolon outside of a string literal,
and that is wrong according to the definition of CREATE RULE.
I assume you mean:
test=> select (;)
ERROR: parser: parse error at or near ")"
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 19:16:09 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA90773
for <hackers@postgresql.org>; Fri, 10 Dec 1999 19:15:43 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63571 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sINSR194561>; Sat, 11 Dec 1999 01:15:25 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11waGx-0001Qr-00; Sat, 11 Dec 1999 01:20:27 +0100
Date: Sat, 11 Dec 1999 01:20:27 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Hiroshi Inoue <Inoue@tpf.co.jp>
cc: Tatsuo Ishii <t-ishii@sra.co.jp>, Tom Lane <tgl@sss.pgh.pa.us>,
hackers@postgresql.org
Subject: Re: [HACKERS] Multibyte in autoconf
In-Reply-To: <384F0001.91E17222@tpf.co.jp>
Message-ID: <Pine.LNX.4.20.9912100248460.760-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-09, Hiroshi Inoue mentioned:
As a Japanese,I don't want to specify an encoding for every initdb.
There are few selections except --with-mb=EUC_JP in Japan.
As I mentioned frequently, in a normal environment, you configure as many
times as you initdb.
Isn't it preferable that PostgreSQL doesn't need an excellent db
admin ?I do initdb frequently in current tree.
But you configure and build each time, right?
Anyway, as one who is only getting into multibyte for toyage, I guess I
will drop this topic for now.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 19:16:10 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA90760
for <hackers@postgresql.org>; Fri, 10 Dec 1999 19:15:42 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63515 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sINSN192573>; Sat, 11 Dec 1999 01:15:21 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11waH8-0001RU-00; Sat, 11 Dec 1999 01:20:38 +0100
Date: Sat, 11 Dec 1999 01:20:38 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Oliver Elphick <olly@lfix.co.uk>
cc: hackers@postgresql.org, olly@linda.lfix.co.uk
Subject: Re: [HACKERS] More initdb follies
In-Reply-To: <199912091114.LAA09862@linda.lfix.co.uk>
Message-ID: <Pine.LNX.4.20.9912100300000.760-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-09, Oliver Elphick mentioned:
I propose that I remove it, and that it instead be possible that you can
doroot# su -l postgres -c 'initdb ...'
You can already do this; this example is from the Debian package installation
It can be quite tricky, though, since there are a number of different su
versions around. I would prefer it if root were able to run initdb directly
Of course the user would actually invoke the su himself, so he better know
what his does.
and set the ownerships as part of the process. The ability to run as root
should only apply to initdb.
I don't think there is a good (let alone portable) way to set ownership of
a shell script at run time. While you could do all kinds of funny business
with file ownerships, the postgres backends will still refuse to execute.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 19:16:14 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA90774
for <hackers@postgresql.org>; Fri, 10 Dec 1999 19:15:44 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63655 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sINSX192555>; Sat, 11 Dec 1999 01:15:31 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11waHJ-0001SD-00; Sat, 11 Dec 1999 01:20:49 +0100
Date: Sat, 11 Dec 1999 01:20:49 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: hackers@postgresql.org
Subject: Re: [HACKERS] More initdb follies
In-Reply-To: <29157.944703510@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.20.9912100303100.760-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-08, Tom Lane mentioned:
Makes sense to me --- I was saying more or less the same thing, I think,
when I said that initdb should pay attention to the effective UID it's
run under *and nothing else* to determine the postgres user name/ID.
In particular, if you want to be able to run it via "su", it mustn't
assume that environment variables like LOGNAME or USER are set correctly
for the postgres user. If it needs the user name it should look it up
from the EUID.
(The odd thing is, that our installation instructions suggest to su as
postgres and do the install that way, yet this seems to work anyway. On my
system (GNU sh-utils), USER is only set if you 'su -', but it seems
relying on the user doing this right is way too much to ask.)
Hmm, portability issues. Can you be sure EUID is implemented everywhere?
(I guess so.) How do you determine the user name from a UID? That would be
the inverse of what pg_id does now.
An idea I just had would be to use
* First resort: `id -n -u`
* Second resort: `whoami`
* Third resort: --username option
The first two don't distinguish between su and su -, at least here. Not
sure if #3 is necessary though. One of those you should have.
On the other hand, one more thing to think about is that the only place
the superuser's UID and name are actually used, is to initialize the
catalogs. All the files will happily be created under which ever user you
run this as (as they should). Using the above three step approach, you can
choose to name your _database_ superuser whatever you want, independent of
the Unix filesystem concerns. Of course this is nothing to encourage, but
it's possible. I could install the system in my home directory in some
computing lab under my own user name, yet still name the superuser
postgres to have a standard environment within the database. I guess the
--username option does kind of work, just not as expected.
(The next thing would be the ability to choose the database superuser's
usesysid as well, which might not be so far-fetched either, because if
1) you already have 40000 users on your system when you install PostgreSQL
2) you assign the Unix user postgres the uid 400001
3) you add your 40000 users to the database
you end up with usesysid's 40000-80000 (+/- 1). Not the end of the world
but kind of dumb. The you could simply assign 0 (or 1 if zero is not
allowed) to the superuser at initdb time.)
There seem to be a lot of misconceptions (possibly caused by restrictions
in the past) about all the user names and ids of the installation files,
the data directory, the server process, the database users, the database
super user, etc. In fact, most of these can be chosen freely, the only
requirement is that the server process can access the data directory.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 19:50:09 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id TAA98828
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 19:49:28 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wabi-0003kGC; Sat, 11 Dec 99 01:41 MET
Message-Id: <m11wabi-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Error in new psql
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sat, 11 Dec 1999 01:41:54 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912110013.TAA03470@candle.pha.pa.us> from "Bruce Momjian" at
Dec 10, 99 07:13:53 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
Peter,
I just noticed that the new psql doesn't handle semicolon
inside of unmatched parentheses correct any more. This is a
requirement for defining multi action rules and was properly
supported by v6.5.* psql.The CURRENT version submits the query buffer as soon, as it
encounters the first semicolon outside of a string literal,
and that is wrong according to the definition of CREATE RULE.I assume you mean:
test=> select (;)
ERROR: parser: parse error at or near ")"
Kinda,
actually I meant
CREATE RULE myrule AS ON DELETE TO mytable DO (
DELETE FROM myothertab1 WHERE key = old.key;
DELETE FROM myothertab2 WHERE key = old.key;
);
ERROR: parser: parse error at or near ""
This is a possible syntax which (IIRC) got released with v6.4
and is subject to the examples in the rule system
documentation. The parser still accepts it, so breaking it
due to changes in psql is an IMHO unacceptable backward
incompatibility.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 19:58:09 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA99895
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 19:57:42 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA07320;
Fri, 10 Dec 1999 19:57:27 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912110057.TAA07320@candle.pha.pa.us>
Subject: Re: [HACKERS] Error in new psql
In-Reply-To: <m11wabi-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 01:41:54 am"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 10 Dec 1999 19:57:27 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
test=> select (;)
ERROR: parser: parse error at or near ")"Kinda,
actually I meant
CREATE RULE myrule AS ON DELETE TO mytable DO (
DELETE FROM myothertab1 WHERE key = old.key;
DELETE FROM myothertab2 WHERE key = old.key;
);
ERROR: parser: parse error at or near ""This is a possible syntax which (IIRC) got released with v6.4
and is subject to the examples in the rule system
documentation. The parser still accepts it, so breaking it
due to changes in psql is an IMHO unacceptable backward
incompatibility.
Yes, certainly this will be fixed.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 20:03:09 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA03073
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 20:02:06 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA07765;
Fri, 10 Dec 1999 20:01:08 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912110101.UAA07765@candle.pha.pa.us>
Subject: Re: [HACKERS] Error in new psql
In-Reply-To: <m11wabi-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 01:41:54 am"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 10 Dec 1999 20:01:08 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I assume you mean:
test=> select (;)
ERROR: parser: parse error at or near ")"Kinda,
actually I meant
CREATE RULE myrule AS ON DELETE TO mytable DO (
DELETE FROM myothertab1 WHERE key = old.key;
DELETE FROM myothertab2 WHERE key = old.key;
);
ERROR: parser: parse error at or near ""This is a possible syntax which (IIRC) got released with v6.4
and is subject to the examples in the rule system
documentation. The parser still accepts it, so breaking it
due to changes in psql is an IMHO unacceptable backward
incompatibility.
OK, I fixed it. Just one addition test in an _if_ statement.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 20:24:09 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id UAA05670
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 20:23:58 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wb97-0003kGC; Sat, 11 Dec 99 02:16 MET
Message-Id: <m11wb97-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Error in new psql
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sat, 11 Dec 1999 02:16:25 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912110101.UAA07765@candle.pha.pa.us> from "Bruce Momjian" at
Dec 10, 99 08:01:08 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
actually I meant
CREATE RULE myrule AS ON DELETE TO mytable DO (
DELETE FROM myothertab1 WHERE key = old.key;
DELETE FROM myothertab2 WHERE key = old.key;
);
ERROR: parser: parse error at or near ""OK, I fixed it. Just one addition test in an _if_ statement.
Thank you.
You remember, that it's not the first time multiple action
rules have been broken? The other one was due to the
EXCEPT/INTERCEPT patch.
I added a check to the rules regression test after that, to
ensure it never happens again. Unfortunately, Peter's
enforcement to use old psql for regression prevented it from
showing up.
Don't misunderstand this as some whining about it. It is a
very important issue. It shows that the changes made to psql
can cause backward incompatibilities by themself.
AFAIK, the proposed procedure to activate the new psql was to
run the regression test with an old psql, if it's O.K. run it
again with the new one and replace all expected output files.
THIS IS INADEQUATE according to the results seen in this
case.
Don't know if anyone would feel comfortable with it, but at
least, the postmaster log must be checked to show up exactly
the same too. The only alternative would be to check every
old/expected to new/results manually (what's really a whole
lot of damned stupid work).
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 20:56:14 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA11212
for <pgsql-general@postgresql.org>;
Fri, 10 Dec 1999 20:55:27 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63119 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIOvy10305>; Sat, 11 Dec 1999 02:55:10 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wbpU-0001gz-00; Sat, 11 Dec 1999 03:00:13 +0100
Date: Sat, 11 Dec 1999 03:00:12 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Karl DeBisschop <kdebisschop@range.infoplease.com>
cc: swalton@galileo.csun.edu, pgsql-general@postgresql.org
Subject: Re: Mirroring a DB
In-Reply-To: <199912101809.NAA30180@skillet.infoplease.com>
Message-ID: <Pine.LNX.4.20.9912110244240.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-10, Karl DeBisschop mentioned:
pg_dump -o -h <live> <table> | psql -h <mirror> <table>
This generally works, but has a habit recreating the views as actual
tables. Often you can live with this, and there may be a simple way
to prevent it. I just haven't found one yet.
I view *is* a table, with a ON SELECT rule on it. So writing
CREATE TABLE foo ( ... );
CREATE RULE _RETfoo AS ON SELECT DO INSTEAD SELECT your_stuff_here;
is equivalent to
CREATE VIEW foo AS SELECT your_stuff_here;
Perhaps it would be nicer if the dump contained the second version, but
you're not supposed to read these dumps (in case you didn't know :).
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 20:56:11 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA11256
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 20:55:47 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63308 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIOwC194573>; Sat, 11 Dec 1999 02:55:26 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wbpn-0001h1-00; Sat, 11 Dec 1999 03:00:31 +0100
Date: Sat, 11 Dec 1999 03:00:31 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Scott Beasley <jscottb@infoave.com>
cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] First draft of pg_group admin tool.
In-Reply-To: <Pine.LNX.4.10.9912101350100.707-100000@cowbox.infoave.com>
Message-ID: <Pine.LNX.4.20.9912110228360.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-10, Scott Beasley mentioned:
Well this is my first post to this list, so be gentle ;-). I have
written a small utility I use and wanted to get it out and better
tested :-)
So you might want to send the news to pgsql-general as well.
The proper fix for this would of course be a CREATE GROUP command, but no
one has been willing to work on that. Until then, more power to you. ;)
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 20:56:20 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA11252
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 20:55:47 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63324 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIOwF194577>; Sat, 11 Dec 1999 02:55:29 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wbq2-0001h3-00; Sat, 11 Dec 1999 03:00:46 +0100
Date: Sat, 11 Dec 1999 03:00:46 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Error in new psql
In-Reply-To: <m11wZS6-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.4.20.9912110223440.1875-200000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1060749028-944875674=:1875"
Content-ID: <Pine.LNX.4.20.9912110300420.1875@localhost.localdomain>
Sender: Peter Eisentraut <peter@hub.org>
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--8323328-1060749028-944875674=:1875
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Content-ID: <Pine.LNX.4.20.9912110300421.1875@localhost.localdomain>
On 1999-12-11, Jan Wieck mentioned:
I just noticed that the new psql doesn't handle semicolon
inside of unmatched parentheses correct any more. This is a
requirement for defining multi action rules and was properly
supported by v6.5.* psql.
Aah, I knew that there must have been a reason for this parentheses
counting. Patch attached. Backslash-escaping semicolons works as well, by
the way.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
--8323328-1060749028-944875674=:1875
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="psql-bug.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.20.9912110227540.1875@localhost.localdomain>
Content-Description: patch
Content-Disposition: ATTACHMENT; FILENAME="psql-bug.patch"
ZGlmZiAtYyAteCBNYWtlZmlsZSAteCBUQUdTIC14IENWUyAuLi9wZ3NxbC1y
ZWZlcmVuY2Uvc3JjL2Jpbi9wc3FsL21haW5sb29wLmMgc3JjL2Jpbi9wc3Fs
L21haW5sb29wLmMNCioqKiAuLi9wZ3NxbC1yZWZlcmVuY2Uvc3JjL2Jpbi9w
c3FsL21haW5sb29wLmMJU2F0IERlYyAxMSAwMjoxNzo1OSAxOTk5DQotLS0g
c3JjL2Jpbi9wc3FsL21haW5sb29wLmMJU2F0IERlYyAxMSAwMjoyMDowNSAx
OTk5DQoqKioqKioqKioqKioqKioNCioqKiAyNzQsMjgwICoqKioNCiAgICAg
ICAgICAgICAgDQogIA0KICAJCQkvKiBzZW1pY29sb24/IHRoZW4gc2VuZCBx
dWVyeSAqLw0KISAJCQllbHNlIGlmIChsaW5lW2ldID09ICc7JyAmJiAhd2Fz
X2JzbGFzaCkNCiAgCQkJew0KICAgICAgICAgICAgICAgICAgLyogZGVsZXRl
IHRoZSBvbGQgcXVlcnkgYnVmZmVyIGZyb20gbGFzdCB0aW1lIGFyb3VuZCAq
Lw0KICAgICAgICAgICAgICAgICAgaWYgKHNsYXNoQ21kU3RhdHVzID09IENN
RF9TRU5EKQ0KLS0tIDI3NCwyODAgLS0tLQ0KICAgICAgICAgICAgICANCiAg
DQogIAkJCS8qIHNlbWljb2xvbj8gdGhlbiBzZW5kIHF1ZXJ5ICovDQohIAkJ
CWVsc2UgaWYgKGxpbmVbaV0gPT0gJzsnICYmICF3YXNfYnNsYXNoICYmIHBh
cmVuX2xldmVsPT0wKQ0KICAJCQl7DQogICAgICAgICAgICAgICAgICAvKiBk
ZWxldGUgdGhlIG9sZCBxdWVyeSBidWZmZXIgZnJvbSBsYXN0IHRpbWUgYXJv
dW5kICovDQogICAgICAgICAgICAgICAgICBpZiAoc2xhc2hDbWRTdGF0dXMg
PT0gQ01EX1NFTkQpDQo=
--8323328-1060749028-944875674=:1875--
From bouncefilter Fri Dec 10 20:56:15 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA11280
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 20:55:58 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63462 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIOwW10305>; Sat, 11 Dec 1999 02:55:46 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wbqD-0001hC-00; Sat, 11 Dec 1999 03:00:57 +0100
Date: Sat, 11 Dec 1999 03:00:57 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: The Hermit Hacker <scrappy@hub.org>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <Pine.BSF.4.21.9912101243170.500-100000@thelab.hub.org>
Message-ID: <Pine.LNX.4.20.9912110204140.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-10, The Hermit Hacker mentioned:
Damn damn damn...I can never explain these things right. The 7.x would,
*at all times* maintain database compatibility with any 7.x release...I
could cvsup down the newest source, build and install it, without any risk
to my current databases...but still get access to a newer feature
In general, I like that concept, but I don't see that happening. With
every third patch "requiring initdb" you would potentially stall certain
areas of development indefinitely with your requirement. Unless we dream
up some way to dynamically adjust outdated system catalogues ...
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 20:57:17 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA11329
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 20:56:16 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63572 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIOwj16445>; Sat, 11 Dec 1999 02:55:59 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wbqP-0001hE-00; Sat, 11 Dec 1999 03:01:09 +0100
Date: Sat, 11 Dec 1999 03:01:09 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>, "'The Hermit Hacker'" <scrappy@hub.org>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <199912101651.LAA04090@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.20.9912110156400.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-10, Bruce Momjian mentioned:
Maybe we just call it 7.0, and have some more incompatibility stuff in
7.1. Seems waiting for some .0 release is not going to work, unless we
scrap the Feb 1 beta and just wait for all new stuff to be finished, but
that seems worse than having a 7.1 that contains some incompatiblities.
What kind of incompatibilities are we talking about here really? Is there
anything that can't be resolved via
* big warning signs
* pg_dump or (to be created) friends
* supporting the old stuff for a while as well
* automated conversion of the things using the old stuff
* informative documents outlining the reason of the change and how to
cope with it?
Things change all the time, that's a fact of life.
If foreign keys get done this is definitely the greatest thing in the
world for the end user, so 7.0 is a good name.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 20:57:15 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA11371
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 20:56:28 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63699 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIOws53311>; Sat, 11 Dec 1999 02:56:08 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wbqc-0001hG-00; Sat, 11 Dec 1999 03:01:22 +0100
Date: Sat, 11 Dec 1999 03:01:22 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Peter Mount <petermount@it.maidstone.gov.uk>,
"'The Hermit Hacker'" <scrappy@hub.org>,
Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <19534.944813935@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.20.9912110140190.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-10, Tom Lane mentioned:
I know I have a lot of little loose ends dangling on stuff that's
already "done", and a long list of nitty little bugs to fix, so it
makes sense to me to spend some time in fix-bugs-and-make-a-release
mode before going back into long-haul-feature-development mode.
Now, if other people don't have that feeling, maybe the idea of
a near-term release isn't so hot after all.
I do have that feeling. That's better than tying up the loose ends and
fixing the nitty little bugs half a year from now when you have no clue
where that list went ...
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 20:57:10 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA11369
for <pgsql-hackers@hub.org>; Fri, 10 Dec 1999 20:56:28 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63718 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIOwv57406>; Sat, 11 Dec 1999 02:56:11 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wbqj-0001hI-00; Sat, 11 Dec 1999 03:01:29 +0100
Date: Sat, 11 Dec 1999 03:01:29 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tatsuo Ishii <t-ishii@sra.co.jp>
cc: tgl@sss.pgh.pa.us, pgsql-hackers@hub.org
Subject: Re: [HACKERS] FreeBSD problem under heavy load
In-Reply-To: <19991210145658J.t-ishii@sra.co.jp>
Message-ID: <Pine.LNX.4.20.9912110133550.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-10, Tatsuo Ishii mentioned:
BTW, I think pgbench is usefull to detect this kind of problems. Can I
put it into contrib or somewhere?
Under src/test there already is a bench subdirectory which I'm not sure
what it is for, but pgbench might have good company there.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 20:57:11 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA11411
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 20:56:47 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63788 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIOx532832>; Sat, 11 Dec 1999 02:56:23 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wbqx-0001hK-00; Sat, 11 Dec 1999 03:01:43 +0100
Date: Sat, 11 Dec 1999 03:01:43 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] OK, what's this LDREL all about?
In-Reply-To: <16227.944807139@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.20.9912110130200.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-10, Tom Lane mentioned:
The recent QNX patches have broken current sources. I think
maybe the patches were incomplete or were not applied fully.
Every makefile now has $(LD) $(LDREL) in place of $(LD) -r,
which would be cool if only LDREL were defined as -r someplace.
But it ain't defined anywhere. Major lossage ensues.
ISTM, the proper way to do this sort of thing would be to add it to
LDFLAGS in Makefile.global.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 21:34:11 1999
Received: from email.fdn.com (email.fdn.com [216.199.0.136])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA24177
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 21:33:53 -0500 (EST)
(envelope-from mtsinc@southeast.net)
Received: from southeast.net (mail.mousetech.com [216.199.14.19] (may be
forged)) by email.fdn.com (8.9.3/8.9.3) with ESMTP id VAA28121
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 21:33:51 -0500 (EST)
Message-ID: <3851B7D1.B1E45771@southeast.net>
Date: Fri, 10 Dec 1999 21:32:49 -0500
From: Tim Holloway <mtsinc@southeast.net>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Industrial-Strength Logging
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
It's rude, it's crude, but it's finally here!
The mods for the logging subsystem have been posted to pgsql-patches
for your amusement and edification.
Or whatever.
At the moment it does nothing but start itself up, channel a message
every time a backend starts, and leave some slop hanging around the
system when you shutdown, but I hope that its potential will shine through anyway.
regards,
Tim Holloway
From bouncefilter Fri Dec 10 22:01:11 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA27903
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 22:01:00 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA11187;
Fri, 10 Dec 1999 21:42:19 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912110242.VAA11187@candle.pha.pa.us>
Subject: Re: [HACKERS] Error in new psql
In-Reply-To: <Pine.LNX.4.20.9912110223440.1875-200000@localhost.localdomain>
from Peter Eisentraut at "Dec 11, 1999 03:00:46 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 10 Dec 1999 21:42:19 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
On 1999-12-11, Jan Wieck mentioned:
I just noticed that the new psql doesn't handle semicolon
inside of unmatched parentheses correct any more. This is a
requirement for defining multi action rules and was properly
supported by v6.5.* psql.Aah, I knew that there must have been a reason for this parentheses
counting. Patch attached. Backslash-escaping semicolons works as well, by
the way.
This is the same as the patch I did. Thanks.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 22:04:11 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA30554
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 22:03:35 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA11673;
Fri, 10 Dec 1999 21:44:52 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912110244.VAA11673@candle.pha.pa.us>
Subject: Re: [HACKERS] OK, what's this LDREL all about?
In-Reply-To: <Pine.LNX.4.20.9912110130200.1875-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 11, 1999 03:01:43 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 10 Dec 1999 21:44:52 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
On 1999-12-10, Tom Lane mentioned:
The recent QNX patches have broken current sources. I think
maybe the patches were incomplete or were not applied fully.
Every makefile now has $(LD) $(LDREL) in place of $(LD) -r,
which would be cool if only LDREL were defined as -r someplace.
But it ain't defined anywhere. Major lossage ensues.ISTM, the proper way to do this sort of thing would be to add it to
LDFLAGS in Makefile.global.
We have an LDFLAGS, but this for using ld to generate SUBSYS.o. Not to
be used in normal ld linking use.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 21:41:17 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA24800
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 21:40:12 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64612 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIPZx161796>; Sat, 11 Dec 1999 03:39:57 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wcX4-0001jp-00; Sat, 11 Dec 1999 03:45:14 +0100
Date: Sat, 11 Dec 1999 03:45:14 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Error in new psql
In-Reply-To: <m11wb97-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.4.20.9912110325100.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-11, Jan Wieck mentioned:
I added a check to the rules regression test after that, to
ensure it never happens again. Unfortunately, Peter's
enforcement to use old psql for regression prevented it from
showing up.
To be completely honest, I was just waiting to see what this was good
for. As you have seen (or not), it was more or less disabled but still
there.
Regarding the regression tests, before any more of this stuff gets thrown
around, how do you regenerate the output? Easily? Do it now. As far as I'm
concerned, psql is finished. Anything else will be bug-fixing.
I'm planning on some sort of beta somewhere around Feb 1st with release on
Feb 29th (to prove Y2K compliancy). If we don't come up with a name by
then, we can always start naming it after Norse gods.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 21:41:16 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA24833
for <pgsql-hackers@postgresql.org>;
Fri, 10 Dec 1999 21:40:31 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64652 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIPa422583>; Sat, 11 Dec 1999 03:40:06 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wcXE-0001kB-00; Sat, 11 Dec 1999 03:45:24 +0100
Date: Sat, 11 Dec 1999 03:45:24 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Error in new psql
In-Reply-To: <199912110013.TAA03470@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.20.9912110336480.1875-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-10, Bruce Momjian mentioned:
I assume you mean:
test=> select (;)
ERROR: parser: parse error at or near ")"
That was actually a different bug, which must have slipped in on the
latest update. Please use the attached patch. This overlaps with the one
sent in a few minutes ago, but I think you'll easily figure out what's
going on. Just a few lines to delete.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 10 22:11:11 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA31780
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 22:10:42 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id DAA27846;
Sat, 11 Dec 1999 03:13:47 GMT
Sender: lockhart@hub.org
Message-ID: <3851C16B.ABD356AD@alumni.caltech.edu>
Date: Sat, 11 Dec 1999 03:13:47 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Jan Wieck <wieck@debis.com>
CC: Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Error in new psql
References: <m11wb97-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Don't know if anyone would feel comfortable with it, but at
least, the postmaster log must be checked to show up exactly
the same too. The only alternative would be to check every
old/expected to new/results manually (what's really a whole
lot of damned stupid work).
I've done a whole lot of dsw before, and will get to it sometime
unless someone does it first...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 10 22:26:11 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id WAA34006
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 22:25:34 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wd2O-0003kGC; Sat, 11 Dec 99 04:17 MET
Message-Id: <m11wd2O-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: psql & regression (was: Error in new psql)
To: peter_e@gmx.net (Peter Eisentraut)
Date: Sat, 11 Dec 1999 04:17:36 +0100 (MET)
Cc: wieck@debis.com, pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.LNX.4.20.9912110325100.1875-100000@localhost.localdomain>
from "Peter Eisentraut" at Dec 11, 99 03:45:14 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter Eisentraut wrote:
On 1999-12-11, Jan Wieck mentioned:
I added a check to the rules regression test after that, to
ensure it never happens again. Unfortunately, Peter's
enforcement to use old psql for regression prevented it from
showing up.To be completely honest, I was just waiting to see what this was good
for. As you have seen (or not), it was more or less disabled but still
there.
Maybe it sounded the like, but I really did not wanted to
citicize your work. It was a great job and IMHO a big leap
forward in user friendliness of psql. I expect all this tab-
completion and help stuff to be highly appreceated and
honored. Let me be the first to explicitly say CONGRATS.
What I just wanted to point out is, that such a little,
subtle change in psql's input preprocessing could distort an
existing feature. In this case, it's totally clear to me
that is was only disabled and still there. But I only
stumbled over it because I tried to create a multi action
rule by hand to evaluate some comment I was writing on a
list. Without that, the proposed procedure (I outlined) to
update expected output would have broken the "rules"
regression test and stamped the broken results into expected.
So it probably wouldn't have been noticed until after
release.
And who can guarantee that this kind of flaw cannot happen
anywhere else? There are many, very old regression tests.
Some of them go back to the roots, Postgres 4.2, and I'm not
sure anyone ever looked at the expected results lately, if
they are really what SHOULD be expected. The tenk data for
example is something where even I don't know where it was
coming from, and I already joined the Postgres community with
release 4.2 back in 1994.
All this IMHO isn't really subject to your personal
responsibility. The interface of our interactive shell
needed the now happened polishing for some time. Instead I
wanted the backend developers to handle this major change in
psql, which is a core utility of the regression suite, not as
lax as past changes to it might have been. That's all.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 10 22:43:11 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA38575
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 22:42:53 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA14601;
Fri, 10 Dec 1999 22:37:08 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912110337.WAA14601@candle.pha.pa.us>
Subject: Re: [HACKERS] Error in new psql
In-Reply-To: <Pine.LNX.4.20.9912110336480.1875-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 11, 1999 03:45:24 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 10 Dec 1999 22:37:08 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
On 1999-12-10, Bruce Momjian mentioned:
I assume you mean:
test=> select (;)
ERROR: parser: parse error at or near ")"That was actually a different bug, which must have slipped in on the
latest update. Please use the attached patch. This overlaps with the one
sent in a few minutes ago, but I think you'll easily figure out what's
going on. Just a few lines to delete.
I don't see any patch attached to this message.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 22:43:12 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA38567
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 22:42:32 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA14726;
Fri, 10 Dec 1999 22:40:52 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912110340.WAA14726@candle.pha.pa.us>
Subject: Re: psql & regression (was: Error in new psql)
In-Reply-To: <m11wd2O-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 04:17:36 am"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 10 Dec 1999 22:40:52 -0500 (EST)
CC: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
And who can guarantee that this kind of flaw cannot happen
anywhere else? There are many, very old regression tests.
Some of them go back to the roots, Postgres 4.2, and I'm not
sure anyone ever looked at the expected results lately, if
they are really what SHOULD be expected. The tenk data for
example is something where even I don't know where it was
coming from, and I already joined the Postgres community with
release 4.2 back in 1994.
Thomas is the regression man, and has checked the output to see that
it was expected in the past. I assume he will regenerate it soon.
A good point is that he can use the old psql to see any changes/breakage
in the backend code, but can _not_ use the new psql to check because the
output is different. That is a good point, and I think the one Jan was
making.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 10 23:06:11 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id XAA43487
for <pgsql-hackers@postgreSQL.org>;
Fri, 10 Dec 1999 23:05:58 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wdfd-0003kGC; Sat, 11 Dec 99 04:58 MET
Message-Id: <m11wdfd-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: psql & regression (was: Error in new psql)
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sat, 11 Dec 1999 04:58:09 +0100 (MET)
Cc: wieck@debis.com, peter_e@gmx.net, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912110340.WAA14726@candle.pha.pa.us> from "Bruce Momjian" at
Dec 10, 99 10:40:52 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
And who can guarantee that this kind of flaw cannot happen
anywhere else? There are many, very old regression tests.
Some of them go back to the roots, Postgres 4.2, and I'm not
sure anyone ever looked at the expected results lately, if
they are really what SHOULD be expected. The tenk data for
example is something where even I don't know where it was
coming from, and I already joined the Postgres community with
release 4.2 back in 1994.Thomas is the regression man, and has checked the output to see that
it was expected in the past. I assume he will regenerate it soon.
Oh yeah, I've seen his response with great pleasure. I did
not knew that there's really someone taking care for
breakage->expected glitches.
A good point is that he can use the old psql to see any changes/breakage
in the backend code, but can _not_ use the new psql to check because the
output is different. That is a good point, and I think the one Jan was
making.
Yes. The verification, if the new expected output is correct,
needs one or more eyes (and AFAIK Thomas has good ones - he's
one of a fistful who notice mistakes in my statements even if
they are between the lines :-)).
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 00:41:13 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id AAA63577
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 00:40:28 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wf9W-0003kGC; Sat, 11 Dec 99 06:33 MET
Message-Id: <m11wf9W-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: LONG
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Sat, 11 Dec 1999 06:33:06 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
I thought about the huge size variable text type a little
more. And I think I could get the following implementation
to work reliable for our upcoming release.
For any relation, having one or more LONG data type
attributes, another relation (named pg_<something>) is
created, accessible only to superusers (and internal access
routines). All LONG data items are stored as a reference
into that relation, split up automatically so the chunks fit
into the installation specific tuple limit size. Items are
added/updated/removed totally transparent.
It would not be indexable (jesus no!) and using it in a WHERE
clause will be expensive. But who ever uses a WHERE on a not
indexable (possibly containing megabytes per item) data type
is a silly fool who should get what he wanted, poor response
times.
I'd like to name it LONG, like Oracle's 2G max. data type.
Even if I intend to restrict the data size to some megabytes
for now. All the data must still be processable in memory,
and there might be multiple instances of one item in memory
at the same time. So a real 2G datatype is impossible with
this kind of approach. But isn't a 64MB #define'd limit
enough for now? This would possibly still blow away many
installations due to limited memory and/or swap space. And we
can adjust that #define in 2001 (an address space odyssey),
when 64bit hardware and plenty of GB real memory is the low
end standard *1).
I already thought that the 8K default BLKSIZE is a little out
of date for today's hardware standards. Two weeks ago I
bought a PC for my kids. It's a 433MHz Celeron, 64MB ram, 6GB
disk - costs about $500 (exactly DM 999,-- at Media Markt).
With the actual on disk cache <-> memory and cache <->
surface transfer rates, the 8K size seems a little archaic to
me.
Thus, if we can get a LONG data type in 7.0, and maybe adjust
the default BLKSIZE to something more up to date, wouldn't
the long tuple item get away silently?
Should I go ahead on this or not?
Jan
*1) Or will it be TB/PB?
I fear to estimate, because it's only a short time ago, that
a 4G hard disk was high-end. Today, IBM offers a 3.5'' disk
with 72G formatted capacity and 64M is the lowest end of real
memory, so where's the limit?
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 01:04:13 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA68378
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 01:03:24 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
BAA20309;
Sat, 11 Dec 1999 01:03:05 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912110603.BAA20309@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11wf9W-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 06:33:06 am"
To: Jan Wieck <wieck@debis.com>
Date: Sat, 11 Dec 1999 01:03:05 -0500 (EST)
CC: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I thought about the huge size variable text type a little
more. And I think I could get the following implementation
to work reliable for our upcoming release.For any relation, having one or more LONG data type
attributes, another relation (named pg_<something>) is
created, accessible only to superusers (and internal access
routines). All LONG data items are stored as a reference
into that relation, split up automatically so the chunks fit
into the installation specific tuple limit size. Items are
added/updated/removed totally transparent.
Should we use large objects for this, and beef them up. Seems that
would be a good way. I have considered putting them in a hash
bucket/directory tree for faster access to lots of large objects.
There is a lot to say about storing long tuples outside the tables
because long tuples fill cache buffers and make short fields longer to
access.
It would not be indexable (jesus no!) and using it in a WHERE
clause will be expensive. But who ever uses a WHERE on a not
indexable (possibly containing megabytes per item) data type
is a silly fool who should get what he wanted, poor response
times.
Good restriction.
I'd like to name it LONG, like Oracle's 2G max. data type.
Even if I intend to restrict the data size to some megabytes
for now. All the data must still be processable in memory,
and there might be multiple instances of one item in memory
at the same time. So a real 2G datatype is impossible with
this kind of approach. But isn't a 64MB #define'd limit
enough for now? This would possibly still blow away many
installations due to limited memory and/or swap space. And we
can adjust that #define in 2001 (an address space odyssey),
when 64bit hardware and plenty of GB real memory is the low
end standard *1).I already thought that the 8K default BLKSIZE is a little out
of date for today's hardware standards. Two weeks ago I
bought a PC for my kids. It's a 433MHz Celeron, 64MB ram, 6GB
disk - costs about $500 (exactly DM 999,-- at Media Markt).
With the actual on disk cache <-> memory and cache <->
surface transfer rates, the 8K size seems a little archaic to
me.
We use 8K blocks because that is the base size for most file systems.
When we fsync an 8k buffer, the assumption is that that buffer is
written in a single write to the disk. Larger buffers would be spread
over the disk, making a single fsync() impossible to be atomic, I think.
Also, larger buffers take more cache space per buffer, makeing the
buffer cache more corse holding fewer buffers.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 11 04:26:15 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA09043
for <pgsql-hackers@postgresql.org>;
Sat, 11 Dec 1999 04:25:48 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 491CFB1E5; Sat, 11 Dec 1999 11:28:03 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <38521922.FCEAD38E@tm.ee>
Date: Sat, 11 Dec 1999 11:28:02 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "D'Arcy J.M. Cain" <darcy@druid.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] 6.6 release
References: <m11wQZH-0000cRC@druid.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
"D'Arcy J.M. Cain" wrote:
Thus spake Jan Wieck
As far as I see it now, I can get the FK stuff with MATCH
FULL ready by February first. Must be enough.Any chance of getting the FK semantics into the parser right away even
though it is ignored?
We do have foreign key syntax in parser
hannu=> create table foreign_tab(
hannu-> f int,
hannu-> foreign key(f) references primary_tab (i)
hannu-> );
NOTICE: CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented
What do you mean by semantics here ?
Should it check that the primary table and field(s) exist ?
------------------
Hannu
From bouncefilter Sat Dec 11 07:48:17 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id HAA43837
for <hackers@postgreSQL.org>; Sat, 11 Dec 1999 07:47:39 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Krabba.DoCS.UU.SE (e99re41@Krabba.DoCS.UU.SE [130.238.9.177])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id NAA25957;
Sat, 11 Dec 1999 13:47:32 +0100
Received: from localhost (e99re41@localhost) by Krabba.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id NAA05395;
Sat, 11 Dec 1999 13:47:31 +0100
X-Authentication-Warning: Krabba.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Sat, 11 Dec 1999 13:47:31 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Oleg Bartunov <oleg@sai.msu.su>
cc: hackers@postgreSQL.org
Subject: Re: [PATCHES] pg_dump primary keys
In-Reply-To: <Pine.GSO.3.96.SK.991211124520.10383u-100000@ra>
Message-ID: <Pine.GSO.4.02A.9912111343150.5375-100000@Krabba.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sat, 11 Dec 1999, Oleg Bartunov wrote:
I have a problem with pg_dump (6.5.3) if I use
create table foo (
a text default foo_function()
);
where foo_function() is my function.
pg_dump dumps create table first and create function
later. Obvioulsy restoring doesn't works and
I have to edit dump file. It's rather annoying.
Is it fixed in current tree ?
What though if a function accesses a table? Which one goes first? Do we
have to maintain a network of dependencies in pg_dump? Eventually we'll
probably have to, with all the foreign key stuff coming up. Gloomy
prospects.
-Peter
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 11 07:56:18 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id HAA44798
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 07:56:03 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wlwh-0003kGC; Sat, 11 Dec 99 13:48 MET
Message-Id: <m11wlwh-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sat, 11 Dec 1999 13:48:19 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912110603.BAA20309@candle.pha.pa.us> from "Bruce Momjian" at
Dec 11, 99 01:03:05 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
Should we use large objects for this, and beef them up. Seems that
would be a good way. I have considered putting them in a hash
bucket/directory tree for faster access to lots of large objects.There is a lot to say about storing long tuples outside the tables
because long tuples fill cache buffers and make short fields longer to
access.
I thought to use a regular table. Of course, it will eat
buffers, but managing external files or even large objects
for it IMHO isn't that simple, if you take transaction
commit/abort and MVCC problematic into account too. And IMHO
this is something that must be covered, because I meant to
create a DATATYPE that can be used as a replacement for TEXT
if that's too small, so it must behave as a regular datatype,
without any restrictions WRT beeing able to rollback etc.
Using LO or external files would need much more testing, than
creating one other shadow table (plus an index for it) at
CREATE TABLE. This table would automatically have all the
concurrency, MVCC and visibility stuff stable. And it would
automatically split into multiple files if growing very
large, be vacuumed, ...
Let me do it this way for 7.0, and then lets collect some
feedback and own experience with it. For 8.0 we can discuss
again, if doing it the hard way would be worth the efford.
We use 8K blocks because that is the base size for most file systems.
When we fsync an 8k buffer, the assumption is that that buffer is
written in a single write to the disk. Larger buffers would be spread
over the disk, making a single fsync() impossible to be atomic, I think.Also, larger buffers take more cache space per buffer, makeing the
buffer cache more corse holding fewer buffers.
Maybe something to play with a little.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 07:49:17 1999
Received: from druid.net (root@druid.net [216.126.72.98])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA43912
for <pgsql-hackers@postgresql.org>;
Sat, 11 Dec 1999 07:48:45 -0500 (EST) (envelope-from darcy@druid.net)
Received: from localhost (1397 bytes) by druid.net
via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp
(sender: <darcy>) (ident <darcy> using unix)
id <m11wlx5-0000dTC@druid.net> for <pgsql-hackers@postgresql.org>;
Sat, 11 Dec 1999 07:48:43 -0500 (EST)
(Smail-3.2.0.104 1998-Nov-20 #4 built 1999-Apr-13)
Message-Id: <m11wlx5-0000dTC@druid.net>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <38521922.FCEAD38E@tm.ee> from Hannu Krosing at "Dec 11,
1999 11:28:02 am"
To: hannu@tm.ee (Hannu Krosing)
Date: Sat, 11 Dec 1999 07:48:43 -0500 (EST)
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
Cc: pgsql-hackers@postgresql.org
Reply-To: pgsql-hackers@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL50 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Thus spake Hannu Krosing
"D'Arcy J.M. Cain" wrote:
Any chance of getting the FK semantics into the parser right away even
though it is ignored?We do have foreign key syntax in parser
hannu=> create table foreign_tab(
hannu-> f int,
hannu-> foreign key(f) references primary_tab (i)
hannu-> );
NOTICE: CREATE TABLE/FOREIGN KEY clause ignored; not yet implementedWhat do you mean by semantics here ?
Should it check that the primary table and field(s) exist ?
Nope. That's exactly what I meant. I didn't realize that it was already
there. Sorry for the confusion.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
From bouncefilter Sat Dec 11 08:36:18 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id IAA53917
for <hackers@postgresql.org>; Sat, 11 Dec 1999 08:35:42 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgresql.org
id m11wmZP-0003kGC; Sat, 11 Dec 99 14:28 MET
Message-Id: <m11wmZP-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Re: [PATCHES] pg_dump primary keys
To: peter_e@gmx.net
Date: Sat, 11 Dec 1999 14:28:19 +0100 (MET)
Cc: oleg@sai.msu.su, hackers@postgresql.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.GSO.4.02A.9912111343150.5375-100000@Krabba.DoCS.UU.SE> from
"Peter Eisentraut" at Dec 11, 99 01:47:31 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter Eisentraut wrote:
What though if a function accesses a table? Which one goes first? Do we
have to maintain a network of dependencies in pg_dump? Eventually we'll
probably have to, with all the foreign key stuff coming up. Gloomy
prospects.
No need to worry about FOREIGN KEY stuff here. These
functions are generic builtins not dumped at all.
But need to worry about all other functions of all languages.
They can be used in a table schema and OTOH their definition
might need a relation to exist (could have tuple type as
argument). Plus, for SQL language functions (only SQL, not
PL/pgSQL or any other language) their body is checked at
CREATE time for syntax, so relations they use are required.
This can only be solved by your mentioned dependency network.
BTW: All this was one reason to dump views as CREATE TABLE
and later CREATE RULE. Because views likely contain
functions.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 08:47:18 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id IAA54815
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 08:46:23 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wmjm-0003kGC; Sat, 11 Dec 99 14:39 MET
Message-Id: <m11wmjm-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] 6.6 release
To: pgsql-hackers@postgreSQL.org
Date: Sat, 11 Dec 1999 14:39:02 +0100 (MET)
Cc: hannu@tm.ee
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <m11wlx5-0000dTC@druid.net> from "D'Arcy" "J.M." Cain" at Dec 11,
99 07:48:43 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Thus spake Hannu Krosing
"D'Arcy J.M. Cain" wrote:
Any chance of getting the FK semantics into the parser right away even
though it is ignored?We do have foreign key syntax in parser
hannu=> create table foreign_tab(
hannu-> f int,
hannu-> foreign key(f) references primary_tab (i)
hannu-> );
NOTICE: CREATE TABLE/FOREIGN KEY clause ignored; not yet implementedWhat do you mean by semantics here ?
Should it check that the primary table and field(s) exist ?Nope. That's exactly what I meant. I didn't realize that it was already
there. Sorry for the confusion.
Caution D'Arcy,
the FOREIGN KEY syntax that's in 6.5 is a little incomplete.
Doesn't allow match type and constraint attribute
specification (deferrability and initial deferred state).
Especially the match type is required, because in 7.0 only
MATCH FULL will be implemented, not the <unspecified>
default.
As I said in another post, the constraint attr spec isn't
possible in column constraint right now in 7.0, but we're
working on it. Should be ready in a few days.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 09:43:19 1999
Received: from alert.infoplease.com (range.infoplease.com [208.222.166.25])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA90622
for <pgsql-general@postgresql.org>;
Sat, 11 Dec 1999 09:42:42 -0500 (EST)
(envelope-from kdebisschop@range.infoplease.com)
Received: from skillet.infoplease.com (skillet [10.0.1.212])
by alert.infoplease.com (8.9.3+Sun/8.9.3) with ESMTP id JAA05594;
Sat, 11 Dec 1999 09:41:40 -0500 (EST)
Received: (from kdebisschop@localhost)
by skillet.infoplease.com (8.9.3/8.9.1) id JAA26603;
Sat, 11 Dec 1999 09:41:41 -0500
Date: Sat, 11 Dec 1999 09:41:41 -0500
Message-Id: <199912111441.JAA26603@skillet.infoplease.com>
X-Authentication-Warning: skillet.infoplease.com: kdebisschop set sender to
kdebisschop@spaceheater.infoplease.com using -f
From: Karl DeBisschop <kdebisschop@range.infoplease.com>
To: peter_e@gmx.net
CC: swalton@galileo.csun.edu, pgsql-general@postgresql.org
In-reply-to: <Pine.LNX.4.20.9912110244240.1875-100000@localhost.localdomain>
(message from Peter Eisentraut on Sat, 11 Dec 1999 03:00:12 +0100
(CET))
Subject: Re: Mirroring a DB
Reply-to: kdebisschop@range.infoplease.com
References: <Pine.LNX.4.20.9912110244240.1875-100000@localhost.localdomain>
From: Peter Eisentraut <peter_e@gmx.net>
On 1999-12-10, Karl DeBisschop mentioned:
pg_dump -o -h <live> <table> | psql -h <mirror> <table>
This generally works, but has a habit recreating the views as actual
tables. Often you can live with this, and there may be a simple way
to prevent it. I just haven't found one yet.I view *is* a table, with a ON SELECT rule on it. So writing
CREATE TABLE foo ( ... );
CREATE RULE _RETfoo AS ON SELECT DO INSTEAD SELECT your_stuff_here;is equivalent to
CREATE VIEW foo AS SELECT your_stuff_here;
Perhaps it would be nicer if the dump contained the second version, but
you're not supposed to read these dumps (in case you didn't know :).
I was in fact aware of everything that you mentioned here. The only
point I was trying make, albeit not clearly, is that when executing
the above pipe, the create rule provided by pg_dump is often ambiguous.
to use a real world example, this is the output from pg_dump for a
view that we have:
CREATE RULE "_RETelement_types" AS ON SELECT TO "element_types" DO INSTEAD SELECT "ref", "fcat", "ecat", "oid" AS "ecat_oid", "ord", "emin", "emax", "rows" FROM "fcat", "ecat" WHERE "ref" = "fcat";
In fact, it needs to be modified before it will parse to:
CREATE RULE "_RETelement_types" AS ON SELECT TO "element_types" DO INSTEAD SELECT "ref", fcat.fcat, "ecat", ecat.oid AS "ecat_oid", "ord", "emin", "emax", "rows" FROM "fcat", "ecat" WHERE fcat.ref = ecat.fcat;
Since the rules come at the end of the pg_dump, the transfer mostly
works. But I would not depend on it.
Now I'm not sure if this is a bug, since I think there are choices of
attribute names that will make the rule parse. But it might be a bug, and
certainly the questioner should be aware that there are common
database structures for which the above command can fail to correctly
create the views.
Please forgive the sloppiness of my nomenclature if the this was not
clear before. I had just assumed that this was a known issue, and
that a caution was justified.
--
Karl DeBisschop <kdebisschop@alert.infoplease.com>
617.832.0332 (Fax: 617.956.2696)
Information Please - your source for FREE online reference
http://www.infoplease.com - Your Ultimate Fact Finder
http://kids.infoplease.com - The Great Homework Helper
Netsaint Plugins Development
http://netsaintplug.sourceforge.net
From bouncefilter Sat Dec 11 09:52:20 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id JAA91478
for <hackers@postgresql.org>; Sat, 11 Dec 1999 09:51:56 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Krabba.DoCS.UU.SE (e99re41@Krabba.DoCS.UU.SE [130.238.9.177])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id PAA28194;
Sat, 11 Dec 1999 15:51:47 +0100
Received: from localhost (e99re41@localhost) by Krabba.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id PAA05493;
Sat, 11 Dec 1999 15:51:45 +0100
X-Authentication-Warning: Krabba.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Sat, 11 Dec 1999 15:51:44 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: hackers@postgresql.org
cc: swalton@galileo.csun.edu,
Karl DeBisschop <kdebisschop@range.infoplease.com>
Subject: Re: Mirroring a DB
In-Reply-To: <199912111441.JAA26603@skillet.infoplease.com>
Message-ID: <Pine.GSO.4.02A.9912111546350.5375-100000@Krabba.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Could the God of Rules please comment on this? It seems to be a deficiency
in the get_rule_def (sp?) backend function. Perhaps to play it safe all
attributes should be fully qualified, but that's probably not as easy as
it sounds.
On Sat, 11 Dec 1999, Karl DeBisschop wrote:
to use a real world example, this is the output from pg_dump for a
view that we have:CREATE RULE "_RETelement_types" AS ON SELECT TO "element_types" DO
INSTEAD SELECT "ref", "fcat", "ecat", "oid" AS "ecat_oid", "ord",
^^^^^^ ^^^^^
"emin", "emax", "rows" FROM "fcat", "ecat" WHERE "ref" = "fcat";
In fact, it needs to be modified before it will parse to:
CREATE RULE "_RETelement_types" AS ON SELECT TO "element_types" DO
INSTEAD SELECT "ref", fcat.fcat, "ecat", ecat.oid AS "ecat_oid",
^^^^^^^^^ ^^^^^^^^
"ord", "emin", "emax", "rows" FROM "fcat", "ecat" WHERE fcat.ref =
ecat.fcat;
[my highlightings]
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 11 10:16:19 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA96423
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 10:16:12 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id HAA23282;
Sat, 11 Dec 1999 07:15:56 -0800 (PST)
Message-Id: <3.0.1.32.19991211070928.01087c40@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Sat, 11 Dec 1999 07:09:28 -0800
To: wieck@debis.com (Jan Wieck), pgman@candle.pha.pa.us (Bruce Momjian)
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] LONG
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
In-Reply-To: <m11wlwh-0003kGC@orion.SAPserv.Hamburg.dsh.de>
References: <199912110603.BAA20309@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 01:48 PM 12/11/99 +0100, Jan Wieck wrote:
I thought to use a regular table. Of course, it will eat
buffers, but managing external files or even large objects
for it IMHO isn't that simple, if you take transaction
commit/abort and MVCC problematic into account too. And IMHO
this is something that must be covered, because I meant to
create a DATATYPE that can be used as a replacement for TEXT
if that's too small, so it must behave as a regular datatype,
without any restrictions WRT beeing able to rollback etc.
Yes, please, this is what (some of, at least) the world wants.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Sat Dec 11 10:21:20 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA96820
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 10:21:11 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA05289;
Sat, 11 Dec 1999 10:20:50 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912111520.KAA05289@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11wlwh-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 01:48:19 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sat, 11 Dec 1999 10:20:50 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
Should we use large objects for this, and beef them up. Seems that
would be a good way. I have considered putting them in a hash
bucket/directory tree for faster access to lots of large objects.There is a lot to say about storing long tuples outside the tables
because long tuples fill cache buffers and make short fields longer to
access.I thought to use a regular table. Of course, it will eat
buffers, but managing external files or even large objects
for it IMHO isn't that simple, if you take transaction
commit/abort and MVCC problematic into account too. And IMHO
this is something that must be covered, because I meant to
create a DATATYPE that can be used as a replacement for TEXT
if that's too small, so it must behave as a regular datatype,
without any restrictions WRT beeing able to rollback etc.
OK, I have thought about your idea, and I like it very much. In fact,
it borders on genius.
Our/my original idea was to chain tuple in the main table. That has
some disadvantages:
More complex tuple handling of chained tuples
Requires more tuple storage overhead for housekeeping of chaining data
Sequential scan of table has to read those large fields
Vacuum has to keep the tuples chained as they are moved
Your system would be:
CREATE TABLE pg_long (
refoid OID,
attno int2,
line int4,
attdata VARCHAR(8000);
CREATE INDEX pg_long_idx ON pg_long (refoid, attno, line);
You keep the long data out of the table. When updating the tuple, you
mark the pg_long tuples as superceeded with the transaction id, and just
keep going. No need to do anything special. Vacuum will remove
superceeded tuples automatically while processing pg_long if the
transaction was committed.
The pg_long_idx index will allow rapid access to tuple long data.
This approach seems better than tuple chaining because it uses our
existing code more efficiently. You keep long data out of the main
table, and allow use of existing tools to access the long data.
In fact, you may decide to just extent varchar() and text to allow use
of long tuples. Set the varlena VARLEN field to some special value like
-1, and when you see that, you go to pg_long to get the data. Seems
very easy. You could get fancy and keep data in the table in most
cases, but if the tuple length exceeds 8k, go to all the varlena fields
and start moving data into pg_long. That way, a table with three 4k
columns could be stored without the user even knowing pg_long is
involved, but for shorter tuples, they are stored in the main table.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 11 11:02:20 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA05666
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 11:01:39 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA05661;
Sat, 11 Dec 1999 10:38:28 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912111538.KAA05661@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11wlwh-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 01:48:19 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sat, 11 Dec 1999 10:38:28 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I thought to use a regular table. Of course, it will eat
buffers, but managing external files or even large objects
for it IMHO isn't that simple, if you take transaction
commit/abort and MVCC problematic into account too. And IMHO
this is something that must be covered, because I meant to
create a DATATYPE that can be used as a replacement for TEXT
if that's too small, so it must behave as a regular datatype,
without any restrictions WRT beeing able to rollback etc.
In fact, you could get fancy and allow an update of a non-pg_long using
column to not change pg_long at all. Just keep the same value in the
column. If the transaction fails or succeeds, the pg_long is the same
for that tuple. Of course, because an update is a delete and then an
insert, that may be hard to do. For very long fields, it would be a win
for UPDATE. You certainly couldn't do that with chained tuples.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 11 11:15:20 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id LAA06838
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 11:14:44 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Krabba.DoCS.UU.SE (e99re41@Krabba.DoCS.UU.SE [130.238.9.177])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id RAA29374;
Sat, 11 Dec 1999 17:14:42 +0100
Received: from localhost (e99re41@localhost) by Krabba.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id RAA05516;
Sat, 11 Dec 1999 17:14:41 +0100
X-Authentication-Warning: Krabba.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Sat, 11 Dec 1999 17:14:40 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG
In-Reply-To: <199912111538.KAA05661@candle.pha.pa.us>
Message-ID: <Pine.GSO.4.02A.9912111712290.5375-100000@Krabba.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sat, 11 Dec 1999, Bruce Momjian wrote:
In fact, you could get fancy and allow an update of a non-pg_long using
column to not change pg_long at all. Just keep the same value in the
column. If the transaction fails or succeeds, the pg_long is the same
for that tuple. Of course, because an update is a delete and then an
insert, that may be hard to do. For very long fields, it would be a win
for UPDATE. You certainly couldn't do that with chained tuples.
While this is great and all, what will happen when long tuples finally get
done? Will you remove this, or keep it, or just make LONG and TEXT
equivalent? I fear that elaborate structures will be put in place here
that might perhaps only be of use for one release cycle.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 11 11:29:20 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id LAA08154
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 11:29:12 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wpGy-0003kGC; Sat, 11 Dec 99 17:21 MET
Message-Id: <m11wpGy-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Last thoughts about LONG
To: wieck@debis.com
Date: Sat, 11 Dec 1999 17:21:28 +0100 (MET)
Cc: pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <m11wlwh-0003kGC@orion.SAPserv.Hamburg.dsh.de> from "Jan Wieck"
at Dec 11, 99 01:48:19 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
I wrote:
Bruce Momjian wrote:
Should we use large objects for this, and beef them up. Seems that
would be a good way. I have considered putting them in a hash
bucket/directory tree for faster access to lots of large objects.There is a lot to say about storing long tuples outside the tables
because long tuples fill cache buffers and make short fields longer to
access.I thought to use a regular table. Of course, it will eat
buffers ...
When looking at my actual implementation concept, I'm not
sure if it will win or loose compared against text itself!
Amazing, but I think it could win already on relatively small
text sizes (1-2K is IMHO small compared to what this type
could store).
Well, the implementation details. I really would like some
little comments to verify it's really complete before
starting.
- A new field "rellongrelid" type Oid is added to pg_class.
It contains the Oid of the long-value relation or the
invalid Oid for those who have no LONG attributes.
- At CREATE TABLE, a long value relation named
"_LONG<tablename>" is created for those tables who need it.
And of course dropped and truncated appropriate. The schema
of this table is
rowid Oid, -- oid of our main data row
rowattno int2, -- the attribute number in main data
chunk_seq int4, -- the part number of this data chunk
chunk text -- the content of this data chunk
There is a unique index defined on (rowid, rowattno).
- The new data type is of variable size with the following
header:
typedef struct LongData {
int32 varsize;
int32 datasize;
Oid longrelid;
Oid rowid;
int16 rowattno;
} LongData;
The types input function is very simple. Allocate
sizeof(LongData) + strlen(input), set varsize to it,
datasize to strlen(input), and the rest to invalid and 0.
Then copy the input after the struct.
The types output function determines on the longrelid, what
to do. If it's invalid, just output the bytes stored after
the struct (it must be a datum that resulted from an input
operation. If longrelid isn't invalid, it does an index
scan on that relation, fetching all tuples that match rowid
and attno. Since it knows the datasize, it doesn't need
them in the correct order, it can put them at the right
places into the allocated return buffer by their chunk_seq.
- For now (until we have enough experience to judge) I think
it would be better to forbid ALTER TABLE when LONG
attributes are involved. Sure, must be implemented
finally, but IMHO not on the first evaluation attempt.
Now how the data goes in and out of the longrel.
- On heap_insert(), we look for non NULL LONG attributes in
the tuple. If there could be any can simply be seen by
looking at the rellongrelid in rd_rel. We fetch the value
either from the memory after LongData or by using the type
output function (for fetching it from the relation where it
is!). Then we simply break it up into single chunks and
store them with our tuples information. Now we need to do
something tricky - to shrink the main data tuple size, we
form a new heap tuple with the datums of the original one.
But we replace all LongData items we stored by faked ones,
where the varsize is sizeof(LongData) and all the other
information is setup appropriate. We append that faked
tuple instead, copy the resulting information into the
original tuples header and throw it away.
This is a point, where I'm not totally sure. Could it
possibly be better or required to copy the entire faked
tuple over the one we should have stored? It could never
need more space, so that wouldn't be a problem.
- On heap_replace(), we check all LONG attributes if they are
NULL of if the information in longrelid, rowid and rowattno
doesn't match our rellongrelid, tupleid, and attno. In that
case this attribute might have an old content in the
longrel, which we need to delete first.
The rest of the operation is exactly like for
heap_insert(), except all the attributes information did
match - then it's our own OLD value that wasn't changed. So
we can simply skip it - the existing data is still valid.
- heap_delete() is so simple that I don't explain it.
Now I hear you asking "how could this overhead be a win?" :-)
That's easy to explain. As long as you don't use a LONG
column in the WHERE clause, when will the data be fetched? At
the time it's finally clear that it's needed. That's when a
result tuple is sent to the client (type output) or when a
tuple resulting from INSERT ... SELECT should be stored.
Thus, all the tuples moving around in the execution tree,
getting joined together, abused by sorts and aggregates and
filtered out again, allways contain the small LongData
struct, not the data itself. Wheren't there recently reports
about too expansive sorts due to their huge size?
Another bonus would be this: What happens on an UPDATE to a
table having LONG attributes? If the attribute is not
modified, the OLD LongData will be found in the targetlist,
and we'll not waste any space by storing the same information
again. IIRC that one was one of the biggest concerns about
storing huge data in tuples, but it disappeared without
leaving a trace - funny eh?
It is so simple, that I fear I made some mistake somewhere.
But where?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 11:54:20 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id LAA12862
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 11:53:36 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wpeb-0003kGC; Sat, 11 Dec 99 17:45 MET
Message-Id: <m11wpeb-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sat, 11 Dec 1999 17:45:53 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912111520.KAA05289@candle.pha.pa.us> from "Bruce Momjian" at
Dec 11, 99 10:20:50 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
In fact, you may decide to just extent varchar() and text to allow use
of long tuples. Set the varlena VARLEN field to some special value like
-1, and when you see that, you go to pg_long to get the data. Seems
very easy. You could get fancy and keep data in the table in most
cases, but if the tuple length exceeds 8k, go to all the varlena fields
and start moving data into pg_long. That way, a table with three 4k
columns could be stored without the user even knowing pg_long is
involved, but for shorter tuples, they are stored in the main table.
So you realized most of my explanations yourself while I
wrote the last mail. :-)
No, I don't intend to change anything on the existing data
types. Where should be the limit on which to decide to store
a datum in pg_long? Based on the datums size? On the tuple
size and attribute order, take one by one until the tuple
became small enough to fit?
Maybe we make this mechanism so general that it is
automatically applied to ALL varsize attributes? We'll end up
with on big pg_long where 90+% of the databases content will
be stored.
But as soon as an attribute stored there is used in a WHERE
or is subject to be joined, you'll see why not (as said, this
type will NOT be enabled for indexing). The operation will
probably fallback to a seq-scan on the main table and then
the attribute must be fetched from pg_long with an index scan
on every single compare etc. - no, no, no.
And it will not be one single pg_long table. Instead it will
be a separate table per table, that contains one or more LONG
attributes. IIRC, the TRUNCATE functionality was implemented
exactly to QUICKLY be able to whipe out the data from huge
relations AND get the disk space back. In the case of a
central pg_long, TRUNCATE would have to scan pg_long to mark
the tuples for deletion and vacuum must be run to really get
back the space. And a vacuum on this central pg_long would
probably take longer than the old DELETE, VACUUM of the now
truncated table itself. Again no, no, no.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 11:56:20 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id LAA15266
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 11:55:28 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Krabba.DoCS.UU.SE (e99re41@Krabba.DoCS.UU.SE [130.238.9.177])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id RAA29657;
Sat, 11 Dec 1999 17:55:27 +0100
Received: from localhost (e99re41@localhost) by Krabba.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id RAA05595;
Sat, 11 Dec 1999 17:55:24 +0100
X-Authentication-Warning: Krabba.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Sat, 11 Dec 1999 17:55:24 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Last thoughts about LONG
In-Reply-To: <m11wpGy-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.GSO.4.02A.9912111740460.5375-100000@Krabba.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sat, 11 Dec 1999, Jan Wieck wrote:
Well, the implementation details. I really would like some
little comments to verify it's really complete before
starting.
Before I start the nagging, please be aware that I'm not as smart as I
think I am. Long datatypes of some sort are clearly necessary -- more
power to you.
- A new field "rellongrelid" type Oid is added to pg_class.
It contains the Oid of the long-value relation or the
invalid Oid for those who have no LONG attributes.
I have a mixed feeling about all these "sparse" fields everywhere. Doing
it completely formally, this seems to be a one-to-many relation, so you
should put the referencing field into the pg_long table or whatever
structure you use, pointing the other way around. This is probably slower,
but it's cleaner. As I mentioned earlier, this whole arrangement will
(hopefully) not be needed for all too long, and then we wouldn't want to
be stuck with it.
- At CREATE TABLE, a long value relation named
"_LONG<tablename>" is created for those tables who need it.
Please don't forget, this would require changes to pg_dump and psql. Also,
the COPY command might not be able to get away without changes, either.
In general, it wouldn't surprise me if some sections of the code would go
nuts about the news of tuples longer than BLCKSZ coming along. (Where
"nuts" is either 'truncation' or 'segfault'.)
I guess what I'm really saying is that I'd be totally in awe of you if you
could get all of this (and RI) done by Feb 1st. Good luck.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 11 12:12:20 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id MAA19559
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 12:11:48 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wpwC-0003kGC; Sat, 11 Dec 99 18:04 MET
Message-Id: <m11wpwC-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: peter_e@gmx.net
Date: Sat, 11 Dec 1999 18:04:04 +0100 (MET)
Cc: pgman@candle.pha.pa.us, wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.GSO.4.02A.9912111712290.5375-100000@Krabba.DoCS.UU.SE> from
"Peter Eisentraut" at Dec 11, 99 05:14:40 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter Eisentraut wrote:
On Sat, 11 Dec 1999, Bruce Momjian wrote:
In fact, you could get fancy and allow an update of a non-pg_long using
column to not change pg_long at all. Just keep the same value in the
column. If the transaction fails or succeeds, the pg_long is the same
for that tuple. Of course, because an update is a delete and then an
insert, that may be hard to do. For very long fields, it would be a win
for UPDATE. You certainly couldn't do that with chained tuples.While this is great and all, what will happen when long tuples finally get
done? Will you remove this, or keep it, or just make LONG and TEXT
equivalent? I fear that elaborate structures will be put in place here
that might perhaps only be of use for one release cycle.
With the actual design explained, I don't think we aren't
that much in need for long tuples any more, that we should
introduce all the problems of chaninig tuples into the
vacuum, bufmgr, heapam, hio etc. etc. code.
The rare cases, where someone really needs larger tuples and
not beeing able to use the proposed LONG data type can be
tackled by increasing BLKSIZE for this specific installation.
Isn't there a FAQ entry about "tuple size too big" pointing
to BLKSIZE? Haven't checked, but if it is, could that be the
reason why we get lesser request on this item?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 12:33:21 1999
Received: from aurora.rg.iupui.edu (aurora.rg.iupui.edu [134.68.31.122])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA24212
for <hackers@postgreSQL.org>; Sat, 11 Dec 1999 12:33:16 -0500 (EST)
(envelope-from gunther@aurora.rg.iupui.edu)
Received: from aurora.rg.iupui.edu (ip209-183-121-23.ts.indy.net
[209.183.121.23])
by aurora.rg.iupui.edu (8.9.3/8.9.3) with ESMTP id MAA20949
for <hackers@postgreSQL.org>; Sat, 11 Dec 1999 12:32:54 -0500 (EST)
(envelope-from gunther@aurora.rg.iupui.edu)
Message-ID: <38528AD6.B186C0B7@aurora.rg.iupui.edu>
Date: Sat, 11 Dec 1999 12:33:10 -0500
From: Gunther Schadow <gunther@aurora.rg.iupui.edu>
Organization: Regenstrief Institute
X-Mailer: Mozilla 4.51 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "hackers@postgreSQL.org" <hackers@postgreSQL.org>
Subject: UNICODE characters vs. BINARY
Content-Type: multipart/mixed; boundary="------------9A5CB98B8BDDCC28D8CDDCDD"
This is a multi-part message in MIME format.
--------------9A5CB98B8BDDCC28D8CDDCDD
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
it seems to me that it's not quite clear whether pgsql makes
a consistent difference between byte and char, and if so, if
there is any way to store a small-sized array of bytes without
going right to a BLOB. If you interface pgsql with Java/JDBC
the support of UNICODE (16 bit per char) is quite essential to
avoid surprises.
A related question is whether we could support some more
standard names for data types (e.g., BIGINT, SMALLINT, etc.)
But I'm not sure there is really any standard. I would be
willing to work a little on these data types but I'd need
someone to hint me on who else is doing stuff and, if possible,
where to look first (and what known mistakes to avoid.)
regards
-Gunther
--
Gunther_Schadow-------------------------------http://aurora.rg.iupui.edu
Regenstrief Institute for Health Care
1050 Wishard Blvd., Indianapolis IN 46202, Phone: (317) 630 7960
schadow@aurora.rg.iupui.edu------------------#include <usual/disclaimer>
--------------9A5CB98B8BDDCC28D8CDDCDD
Content-Type: text/x-vcard; charset=us-ascii;
name="gunther.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Gunther Schadow
Content-Disposition: attachment;
filename="gunther.vcf"
begin:vcard
n:Schadow;Gunther
tel;fax:+1 317 630 6962
tel;home:+1 317 816 0516
tel;work:+1 317 630 7960
x-mozilla-html:FALSE
url:http://aurora.rg.iupui.edu
org:Regenstrief Institute
adr:;;1050 Wishard Blvd;Indianapolis;Indiana;46202;USA
version:2.1
email;internet:schadow_g@regenstrief.rg.iupui.edu
title:M.D.
fn:Gunther Schadow
end:vcard
--------------9A5CB98B8BDDCC28D8CDDCDD--
From bouncefilter Sat Dec 11 13:00:21 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA26681
for <hackers@postgreSQL.org>; Sat, 11 Dec 1999 13:00:08 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA23915;
Sat, 11 Dec 1999 12:58:44 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: peter_e@gmx.net, oleg@sai.msu.su, hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: [PATCHES] pg_dump primary keys
In-reply-to: Your message of Sat, 11 Dec 1999 14:28:19 +0100 (MET)
<m11wmZP-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Sat, 11 Dec 1999 12:58:44 -0500
Message-ID: <23913.944935124@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut wrote:
What though if a function accesses a table? Which one goes first? Do we
have to maintain a network of dependencies in pg_dump? Eventually we'll
probably have to, with all the foreign key stuff coming up. Gloomy
prospects.
Couldn't we solve this by the simple expedient of dumping all the
objects in the database in OID order?
Expecting pg_dump to parse function bodies to discover what
relations/types are mentioned doesn't look appetizing at all...
regards, tom lane
From bouncefilter Sat Dec 11 13:15:21 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA30539
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 13:14:25 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA24019;
Sat, 11 Dec 1999 13:13:16 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] LONG
In-reply-to: Your message of Sat, 11 Dec 1999 01:03:05 -0500 (EST)
<199912110603.BAA20309@candle.pha.pa.us>
Date: Sat, 11 Dec 1999 13:13:15 -0500
Message-ID: <24017.944935995@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
I thought about the huge size variable text type a little
more. And I think I could get the following implementation
to work reliable for our upcoming release.For any relation, having one or more LONG data type
attributes, another relation (named pg_<something>) is
created, accessible only to superusers (and internal access
routines). All LONG data items are stored as a reference
into that relation, split up automatically so the chunks fit
into the installation specific tuple limit size. Items are
added/updated/removed totally transparent.
Should we use large objects for this, and beef them up. Seems that
would be a good way.
Yes, I think what Jan is describing *is* a large object, with the
slight change that he wants to put multiple objects into the same
behind-the-scenes relation. (That'd be a good change for regular
large objects as well ... it'd cut down the umpteen-thousand-files
problem.)
The two principal tricky areas would be (1) synchronization ---
having one hidden relation per primary relation might solve the
problems there, but I'm not sure about it; and (2) VACUUM.
But I don't really see why this would be either easier to do or
more reliable than storing multiple segments of a tuple in the
primary relation itself. And I don't much care for
institutionalizing a hack like a special "LONG" datatype.
regards, tom lane
From bouncefilter Sat Dec 11 13:23:21 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA31329
for <hackers@postgreSQL.org>; Sat, 11 Dec 1999 13:22:36 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA24123;
Sat, 11 Dec 1999 13:22:03 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org, swalton@galileo.csun.edu,
Karl DeBisschop <kdebisschop@range.infoplease.com>
Subject: Re: [HACKERS] Re: Mirroring a DB
In-reply-to: Your message of Sat, 11 Dec 1999 15:51:44 +0100 (MET)
<Pine.GSO.4.02A.9912111546350.5375-100000@Krabba.DoCS.UU.SE>
Date: Sat, 11 Dec 1999 13:22:03 -0500
Message-ID: <24121.944936523@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
Could the God of Rules please comment on this? It seems to be a deficiency
in the get_rule_def (sp?) backend function. Perhaps to play it safe all
attributes should be fully qualified, but that's probably not as easy as
it sounds.
I'm not the god of rules, but I have messed with that code. Current
sources will put table prefixes on every var in a rule if more than one
table appears in the rule's rangelist. I think this should be
sufficient, but it's hard to tell from this incomplete example;
are you actually complaining about some special case that arises when
a column has the same name as its table?
It would be nice to see the original view definition (plus enough table
definitions to let us create the rule without guessing).
regards, tom lane
From bouncefilter Sat Dec 11 13:38:22 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id NAA35506
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 13:37:45 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wrHL-0003kGC; Sat, 11 Dec 99 19:29 MET
Message-Id: <m11wrHL-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Last thoughts about LONG
To: peter_e@gmx.net
Date: Sat, 11 Dec 1999 19:29:59 +0100 (MET)
Cc: wieck@debis.com, pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.GSO.4.02A.9912111740460.5375-100000@Krabba.DoCS.UU.SE> from
"Peter Eisentraut" at Dec 11, 99 05:55:24 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter Eisentraut wrote:
Before I start the nagging, please be aware that I'm not as smart as I
think I am. Long datatypes of some sort are clearly necessary -- more
power to you.
So be it. It forces me to think it over again and points to
sections, I might have forgotten so far. Also, it happend
more than one time to me, that writing a totally OBVIOUS
answer triggerd a better solution in my brain (dunno what's
wrong with that brain, but sometimes it needs to be shaken
well before use). Thus, any of your notes can help, and that
counts!
- A new field "rellongrelid" type Oid is added to pg_class.
It contains the Oid of the long-value relation or the
invalid Oid for those who have no LONG attributes.I have a mixed feeling about all these "sparse" fields everywhere. Doing
it completely formally, this seems to be a one-to-many relation, so you
should put the referencing field into the pg_long table or whatever
structure you use, pointing the other way around. This is probably slower,
but it's cleaner. As I mentioned earlier, this whole arrangement will
(hopefully) not be needed for all too long, and then we wouldn't want to
be stuck with it.
It's 4 bytes per RELATION in pg_class. As a side effect, the
information will be available at NO COST immediately after
heap_open() and in every place, where a relation is accessed.
So it is the best place to put it.
- At CREATE TABLE, a long value relation named
"_LONG<tablename>" is created for those tables who need it.Please don't forget, this would require changes to pg_dump and psql. Also,
the COPY command might not be able to get away without changes, either.
Oh yes, thanks. That was a point I forgot!
Psql must not list tables that begin with "_LONG" on the \d
request. Anything else should IMHO be transparent.
Pg_dump either uses a SELECT to build a script that INSERT's
the data via SQL, or uses COPY. In the SELECT/INSERT case, my
implementation would again be totally transparent and not
noticed by pg_dump, only that it must IGNORE "_LONG*"
relations and be aware that really big tuples can be sent,
but that's more a libpq question I think (what I already
checked because the view/rule/PL combo I created to
demonstrate a >128K tuple was done through psql). AFAIK,
pg_dump doesn't use a binary COPY, and looking at the code
tells me that this is transparent too (due to use of type
specific input/output function there).
All pg_dump would have to do is to ignore "_LONG*" relations
too.
The real problem is COPY. In the case of a COPY BINARY it
outputs the data portion of the fetched tuples directly. But
these will only contain the LongData headers, not the data
itself.
So at that point, COPY has to do the reverse process of
heap_insert(). Rebuild a faked tuple where all the not NULL
LONG values are placed in the representation, they would have
after type input. Not a big deal, must only be done with the
same care as the changes in heapam not to leave unfreed,
leaked memory around.
In general, it wouldn't surprise me if some sections of the code would go
nuts about the news of tuples longer than BLCKSZ coming along. (Where
"nuts" is either 'truncation' or 'segfault'.)
The place, where the size of a heap tuple only is checked
(and where the "tuple size too big" message is coming from)
is in hio.c, right before it is copied into the block. Up to
then, a tuple is NOT explicitly limited to any size.
So I would be glad to see crashes coming up from this change
(not after release - during BETA of course). It would help us
to get another existing bug out of the code.
I guess what I'm really saying is that I'd be totally in awe of you if you
could get all of this (and RI) done by Feb 1st. Good luck.
Thank's for the flowers, but "awe" is far too much - sorry.
During the years I had my hands on nearly every part of the
code involved in this. So I'm not a newbe in creating data
types, utility commands or doing syscat changes. The LONG
type I described will be the work of two or three nights.
I already intended to tackle the long tuples next. Missing
was the idea how to AVOID it simply. And I had this idea just
while answering a question about storing big text files in
the database in the [SQL] list - that woke me up.
In contrast to the RI stuff, this time I don't expect any
bugs, because there are absolutely no side effects I noticed
so far. On the RI stuff, we discussed for weeks (if not
months) about tuple visibility during concurrent transactions
and I finally ran into exactly these problems anyway.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 13:34:21 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA35089
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 13:33:54 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA24179;
Sat, 11 Dec 1999 13:32:46 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: peter_e@gmx.net, pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG
In-reply-to: Your message of Sat, 11 Dec 1999 18:04:04 +0100 (MET)
<m11wpwC-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Sat, 11 Dec 1999 13:32:46 -0500
Message-ID: <24177.944937166@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
The rare cases, where someone really needs larger tuples and
not beeing able to use the proposed LONG data type can be
tackled by increasing BLKSIZE for this specific installation.
This would be a more convincing argument if we supported BLCKSZ
greater than 32K, but we don't.
I think we've speculated about having a compilation flag that gets
thrown to change page offsets from shorts to longs, thereby allowing
larger page sizes. But as Bruce was just pointing out, all of the
code depends in a fundamental way on the assumption that writing a
page is an atomic action. The larger the page size, the more likely
that you'll see broken tables caused by partial page writes. So
allowing BLCKSZ large enough to accomodate any tuple wouldn't be a
very good answer.
I think the proposed LONG type is a hack, and I'd rather see us solve
the problem correctly. ISTM that allowing a tuple to be divided into
"primary" and "continuation" tuples, all stored in the same relation
file, would be a much more general answer and not significantly harder
to implement than a LONG datatype as Jan is describing it.
regards, tom lane
From bouncefilter Sat Dec 11 13:53:22 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA37419
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 13:53:19 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA24289;
Sat, 11 Dec 1999 13:52:12 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Last thoughts about LONG
In-reply-to: Your message of Sat, 11 Dec 1999 17:21:28 +0100 (MET)
<m11wpGy-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Sat, 11 Dec 1999 13:52:11 -0500
Message-ID: <24287.944938331@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Another bonus would be this: What happens on an UPDATE to a
table having LONG attributes? If the attribute is not
modified, the OLD LongData will be found in the targetlist,
and we'll not waste any space by storing the same information
again.
Won't work. If you do that, you have several generations of the
"primary" tuple pointing at the same item in the "secondary" table.
There is room in the multiple primary tuples to keep track of their
committed/uncommitted status, but there won't be enough room to
keep track in the secondary table.
I think this can only work if there are exactly as many generations
of the LONG chunks in the secondary table as there are of the primary
tuple in the main table, and all of them have the same transaction
identification info stored in them as the corresponding copies of
the primary tuple have.
Among other things, this means that an update or delete *must* scan
through the tuple, find all the LONG fields, and go over to the
secondary table to mark all the LONG chunks as deleted by the current
xact, just the same as the primary tuple gets marked. This puts a
considerable crimp in your claim that it'd be more efficient than
a multiple-tuple-segment approach.
Of course, this could be worked around if the secondary table did *not*
use standard access methods (it could be more like an index, and rely on
the primary table for all xact status info). But that makes it look
even less like a clean data-type-based solution...
regards, tom lane
From bouncefilter Sun Dec 12 13:52:38 1999
Received: from marvin.muc.de (marvin.muc.de [193.149.48.2])
by hub.org (8.9.3/8.9.3) with SMTP id NAA28610
for <hackers@postgresql.org>; Sun, 12 Dec 1999 13:51:44 -0500 (EST)
(envelope-from
moderators-muc-lists-postgres-hackers-owner@moderators.muc.de)
Received: (qmail 95042 invoked by alias); 12 Dec 1999 18:51:26 -0000
Delivered-To: moderators-muc-lists-postgres-hackers@moderators.muc.de
Received: (qmail 95037 invoked from network); 12 Dec 1999 18:51:26 -0000
Received: from mailout05.btx.dtag.de (194.25.2.153)
by marvin.muc.de with SMTP; 12 Dec 1999 18:51:26 -0000
Received: from fwd07.btx.dtag.de ([194.25.2.167])
by mailout05.btx.dtag.de with smtp
id 11xE5t-0000j2-00; Sun, 12 Dec 1999 19:51:41 +0100
Received: from news07.btx.dtag.de ([194.25.2.8])
by fwd07.btx.dtag.de with smtp
id <m11xE5J-0002MUC>; Sun, 12 Dec 1999 19:51:05 +0100
Received: from news by news07.btx.dtag.de with local (Exim 1.92 #1 (Debian))
id 11xE5J-0007Ea-00; Sun, 12 Dec 1999 19:51:05 +0100
To: muc-lists-postgres-hackers@moderators.muc.de
Path: news.btx.dtag.de!not-for-mail
From: "Morfeus" <Bob-Marley@t-online.de>
Newsgroups: muc.lists.postgres.hackers
Subject: Help
Date: Sat, 11 Dec 1999 19:53:19 +0100
Organization: T-Online
Lines: 7
Message-ID: <830qqp$r53$1@news07.btx.dtag.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news07.btx.dtag.de 945024665 27811 320000079143-0001 991212 18:51:05
X-Complaints-To: abuse@t-online.de
X-Sender: 320000079143-0001@t-dialin.net
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Well,
i am a german boy, and I want to start hacking! But I know nobody who can
help me! Perhaps someone can help me!
From bouncefilter Sat Dec 11 13:56:22 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA37766
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 13:56:08 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA24316;
Sat, 11 Dec 1999 13:55:00 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Jan Wieck <wieck@debis.com>, pgman@candle.pha.pa.us,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Last thoughts about LONG
In-reply-to: Your message of Sat, 11 Dec 1999 17:55:24 +0100 (MET)
<Pine.GSO.4.02A.9912111740460.5375-100000@Krabba.DoCS.UU.SE>
Date: Sat, 11 Dec 1999 13:55:00 -0500
Message-ID: <24314.944938500@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
I guess what I'm really saying is that I'd be totally in awe of you if you
could get all of this (and RI) done by Feb 1st. Good luck.
When Jan said this was for 7.0, I assumed he meant the release *after*
the Feb 1st one ... whatever it ends up being called. I don't believe
it's possible or reasonable to get this done by Feb 1, either.
regards, tom lane
From bouncefilter Sat Dec 11 14:11:22 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA42127
for <pgsql-hackers@postgresql.org>;
Sat, 11 Dec 1999 14:11:16 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id PAA40605;
Sat, 11 Dec 1999 15:06:26 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Sat, 11 Dec 1999 15:06:25 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Peter Eisentraut <peter_e@gmx.net>
cc: Bruce Momjian <pgman@candle.pha.pa.us>,
Thomas Lockhart <lockhart@alumni.caltech.edu>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <Pine.LNX.4.20.9912110156400.1875-100000@localhost.localdomain>
Message-ID: <Pine.BSF.4.21.9912111504250.500-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
Content-Transfer-Encoding: 8BIT
Incompatibilities is a simple concept..if it requires an initdb, its
incompatible, period...if a pg_dump has to be performed, its
incompatible...if it requires me to do more then a 'make install' and a
restart of the server, its incompatible...if it requires me to recompile
any of my binaries, its incompatible...
Not all changes that are made require changes to system tables...
On Sat, 11 Dec 1999, Peter Eisentraut wrote:
On 1999-12-10, Bruce Momjian mentioned:
Maybe we just call it 7.0, and have some more incompatibility stuff in
7.1. Seems waiting for some .0 release is not going to work, unless we
scrap the Feb 1 beta and just wait for all new stuff to be finished, but
that seems worse than having a 7.1 that contains some incompatiblities.What kind of incompatibilities are we talking about here really? Is there
anything that can't be resolved via
* big warning signs
* pg_dump or (to be created) friends
* supporting the old stuff for a while as well
* automated conversion of the things using the old stuff
* informative documents outlining the reason of the change and how to
cope with it?Things change all the time, that's a fact of life.
If foreign keys get done this is definitely the greatest thing in the
world for the end user, so 7.0 is a good name.--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Sat Dec 11 14:20:22 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA43040
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 14:20:14 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 3FC7D742E; Sat, 11 Dec 1999 21:22:30 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <3852A475.2361E57B@tm.ee>
Date: Sat, 11 Dec 1999 21:22:29 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Jan Wieck <wieck@debis.com>
Cc: peter_e@gmx.net, pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Last thoughts about LONG
References: <m11wrHL-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Jan Wieck wrote:
Peter Eisentraut wrote:
Please don't forget, this would require changes to pg_dump and psql. Also,
the COPY command might not be able to get away without changes, either.Oh yes, thanks. That was a point I forgot!
Psql must not list tables that begin with "_LONG" on the \d
request. Anything else should IMHO be transparent.
If this is the main concern then start them with "pg_L_" and they will be
ignored by the current implementation as well.
But of corse they will surface ad \dS , which may or may not be a good thing
as it makes it possible to list them without changing psql.
-----------
Hannu
From bouncefilter Sat Dec 11 14:27:22 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA43644
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 14:26:59 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 98514742E; Sat, 11 Dec 1999 21:29:15 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <3852A60B.577E39DB@tm.ee>
Date: Sat, 11 Dec 1999 21:29:15 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Jan Wieck <wieck@debis.com>
Cc: pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Last thoughts about LONG
References: <m11wpGy-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Jan Wieck wrote:
- At CREATE TABLE, a long value relation named
"_LONG<tablename>" is created for those tables who need it.
And of course dropped and truncated appropriate. The schema
of this table isrowid Oid, -- oid of our main data row
rowattno int2, -- the attribute number in main data
chunk_seq int4, -- the part number of this data chunk
chunk text -- the content of this data chunkThere is a unique index defined on (rowid, rowattno).
If you plan to use the same LONGs for multiple versions you will probably
need a refcount int4 too
--------------------
Hannu
From bouncefilter Sat Dec 11 14:37:23 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA47076
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 14:36:47 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 07EFA742E; Sat, 11 Dec 1999 21:39:06 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <3852A859.DA32BAEF@tm.ee>
Date: Sat, 11 Dec 1999 21:39:05 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] LONG
References: <24017.944935995@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
But I don't really see why this would be either easier to do or
more reliable than storing multiple segments of a tuple in the
primary relation itself. And I don't much care for
institutionalizing a hack like a special "LONG" datatype.
AFAIK the "hack" is similar to what Oracle does.
At least this is my impression from some descriptions, and it also
seems reasonable thing to do in general as we dont want to read in
500K tuples (and then sort them) just to join on int fields and filter
out on boolean and count(n) < 3.
The description referred above is about Oracle's habit to return LONG*
fields as open file descriptions ready for reading when doing FETCH 1
and as already read-in "strings" when fetching more than 1 tuple.
--------------------
Hannu
From bouncefilter Sat Dec 11 14:46:22 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA47978
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 14:46:15 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 89A03B266; Sat, 11 Dec 1999 21:48:34 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <3852AA92.23E8F9BC@tm.ee>
Date: Sat, 11 Dec 1999 21:48:34 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jan Wieck <wieck@debis.com>, peter_e@gmx.net, pgman@candle.pha.pa.us,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG
References: <24177.944937166@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
I think the proposed LONG type is a hack, and I'd rather see us solve
the problem correctly. ISTM that allowing a tuple to be divided into
"primary" and "continuation" tuples, all stored in the same relation
file, would be a much more general answer and not significantly harder
to implement than a LONG datatype as Jan is describing it.
Actually they seem to be two _different_ problems -
1) we may need bigger tuples for several reasons (I would also suggest
making index tuples twice as long as data tuples to escape the problem
of indexing text fields above 4K (2K?)
2) the LOB support should be advanced to a state where one could reasonably
use them for storing more than a few LOBs without making everything else to
crawl, even on filesystems that don't use indexes on filenames (like ext2)
After achieving 2) support could be added for on-demand migrating of LONG
types to LOBs
I guess that Jans suggestion is just a quick hack for avoiding fixing LOBs.
-----------------------
Hannu
From bouncefilter Sat Dec 11 16:11:23 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id QAA65907
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 16:10:25 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wtf9-0003kGC; Sat, 11 Dec 99 22:02 MET
Message-Id: <m11wtf9-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Last thoughts about LONG
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Sat, 11 Dec 1999 22:02:43 +0100 (MET)
Cc: wieck@debis.com, pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <24287.944938331@sss.pgh.pa.us> from "Tom Lane" at Dec 11,
99 01:52:11 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
Another bonus would be this: What happens on an UPDATE to a
table having LONG attributes? If the attribute is not
modified, the OLD LongData will be found in the targetlist,
and we'll not waste any space by storing the same information
again.Won't work. If you do that, you have several generations of the
"primary" tuple pointing at the same item in the "secondary" table.
There is room in the multiple primary tuples to keep track of their
committed/uncommitted status, but there won't be enough room to
keep track in the secondary table.
A really critical point, to think about in depth. And another
point I could have stumbled over.
But it would work anyway.
I assumed up to now, that even under MVCC, and even if
reading dirty, there could be at max one single transaction
modifying one and the same tuple - no? Ignore all the rest
and forget all my comments if your answer is no. But please
tell me how something like RI should ever work RELIABLE in
such an environment. In fact, in that case I would
immediately stop all my efford in FOREIGN KEY, because it
would be a dead end street - so I assume your answer is yes.
My concept, using regular heap access inside of heap access
to act on "secondary" table, means to stamp the same current
xact as for "primary" table into xmax of old, and into xmin
of new tuples for the "secondary" table. And it means that
this operation appears to be atomic if living in a locking
environment.
The only thing I DON'T wanted to do is to stamp xmax and
create new instances in "secondary" table, if no update is
done to the value of the old LONG attribute. Any UPDATE
modifying the LONG value, and INSERT/DELETE of course will
stamp this information and/or create new instances. So the
only thing (because the only difference) to worry about are
unstamped and uncreated instances in "secondary" table -
right?
Since INSERT/DELETE allways act synchronous to the "primary"
table, and and UPDATE modifying the LONG too, the only thing
left to worry about is an UPDATE without updating the LONG.
In this scenario, a "secondary" tuple of a not updated
"primary" LONG will have an older, but surely committed,
xmin. And it's xmax will be either infinite, or aborted. So
it is visible - no other chance. And that's good, because at
the time beeing, the updater of the "primary" tuple does a
NOOP on the "secondary". And this (extended) part of the
"primaries" tuple information is absolutely unaffected,
regardless if it's transaction will commit or rollback.
Well, your concern is again valid. This concept MIGHT need to
force a NON-MVCC locking scheme for "secondary" tables. But
as far as I learned from the RI stuff, that isn't a problem
and therefore current Jackpot value to be added to Vadim's
account.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 16:32:24 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA94569
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 16:31:31 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
QAA08585;
Sat, 11 Dec 1999 16:24:08 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912112124.QAA08585@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <Pine.GSO.4.02A.9912111712290.5375-100000@Krabba.DoCS.UU.SE> from
Peter Eisentraut at "Dec 11, 1999 05:14:40 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sat, 11 Dec 1999 16:24:08 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Sat, 11 Dec 1999, Bruce Momjian wrote:
In fact, you could get fancy and allow an update of a non-pg_long using
column to not change pg_long at all. Just keep the same value in the
column. If the transaction fails or succeeds, the pg_long is the same
for that tuple. Of course, because an update is a delete and then an
insert, that may be hard to do. For very long fields, it would be a win
for UPDATE. You certainly couldn't do that with chained tuples.While this is great and all, what will happen when long tuples finally get
done? Will you remove this, or keep it, or just make LONG and TEXT
equivalent? I fear that elaborate structures will be put in place here
that might perhaps only be of use for one release cycle.
I think the idea is that Jan's idea is better than chaining tuples.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 11 16:33:24 1999
Received: from alert.infoplease.com (range.infoplease.com [208.222.166.25])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA96138
for <hackers@postgreSQL.org>; Sat, 11 Dec 1999 16:33:01 -0500 (EST)
(envelope-from kdebisschop@range.infoplease.com)
Received: from skillet.infoplease.com (skillet [10.0.1.212])
by alert.infoplease.com (8.9.3+Sun/8.9.3) with ESMTP id QAA09690;
Sat, 11 Dec 1999 16:32:27 -0500 (EST)
Received: (from kdebisschop@localhost)
by skillet.infoplease.com (8.9.3/8.9.1) id QAA03247;
Sat, 11 Dec 1999 16:32:28 -0500
Date: Sat, 11 Dec 1999 16:32:28 -0500
Message-Id: <199912112132.QAA03247@skillet.infoplease.com>
X-Authentication-Warning: skillet.infoplease.com: kdebisschop set sender to
kdebisschop@spaceheater.infoplease.com using -f
From: Karl DeBisschop <kdebisschop@range.infoplease.com>
To: tgl@sss.pgh.pa.us
CC: peter_e@gmx.net, hackers@postgreSQL.org, swalton@galileo.csun.edu
In-reply-to: <24121.944936523@sss.pgh.pa.us> (message from Tom Lane on Sat, 11
Dec 1999 13:22:03 -0500)
Subject: Re: [HACKERS] Re: Mirroring a DB
Reply-to: kdebisschop@range.infoplease.com
References: <24121.944936523@sss.pgh.pa.us>
I'm not the god of rules, but I have messed with that code. Current
sources will put table prefixes on every var in a rule if more than one
table appears in the rule's rangelist. I think this should be
sufficient, but it's hard to tell from this incomplete example;
are you actually complaining about some special case that arises when
a column has the same name as its table?
As far as I can see, the problem has nothing to do with whether the
table has the same name as the column. The problem arises when the
two tables each have attributes with the same name. So for instance
when t1 has an attribute (say "foriegn_oid") that joins to oid in t2,
the rule gets saved as just "oid" so when recreated, the parser can't
determine which oid to join to.
It would be nice to see the original view definition (plus enough table
definitions to let us create the rule without guessing).
Sorry, I really didn't think this was an unknown issue, otherwise I
would have sent in a bug report with such details. I think the stuff
below should cover it. If there's any more info that I can provide,
just ask.
Karl
==============================================================================
create view element_types as select fcat.ref,fcat.fcat,ecat.ecat,ecat.oid as ecat_oid,ecat.ord,ecat.emin,ecat.emax,ecat.rows from fcat,ecat where fcat.ref=ecat.fcat;
------------------------------------------------------------------------------
feature=> \d fcat
Table = fcat
+----------------------------------+----------------------------------+-------+
| Field | Type | Length|
+----------------------------------+----------------------------------+-------+
| ref | int2 not null | 2 |
| owner | int2 not null | 2 |
| fcat | text not null | var |
+----------------------------------+----------------------------------+-------+
feature=> \d ecat
Table = ecat
+----------------------------------+----------------------------------+-------+
| Field | Type | Length|
+----------------------------------+----------------------------------+-------+
| fcat | int2 not null | 2 |
| ord | int2 not null | 2 |
| emin | int2 not null | 2 |
| emax | int2 | 2 |
| rows | int2 not null | 2 |
| ecat | text not null | var |
+----------------------------------+----------------------------------+-------+
Index: zecat_sf
From bouncefilter Sat Dec 11 16:46:24 1999
Received: from alert.infoplease.com (range.infoplease.com [208.222.166.25])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA97595
for <hackers@postgreSQL.org>; Sat, 11 Dec 1999 16:46:16 -0500 (EST)
(envelope-from kdebisschop@range.infoplease.com)
Received: from skillet.infoplease.com (skillet [10.0.1.212])
by alert.infoplease.com (8.9.3+Sun/8.9.3) with ESMTP id QAA09804;
Sat, 11 Dec 1999 16:45:43 -0500 (EST)
Received: (from kdebisschop@localhost)
by skillet.infoplease.com (8.9.3/8.9.1) id QAA03586;
Sat, 11 Dec 1999 16:45:44 -0500
Date: Sat, 11 Dec 1999 16:45:44 -0500
Message-Id: <199912112145.QAA03586@skillet.infoplease.com>
X-Authentication-Warning: skillet.infoplease.com: kdebisschop set sender to
kdebisschop@spaceheater.infoplease.com using -f
From: Karl DeBisschop <kdebisschop@range.infoplease.com>
To: tgl@sss.pgh.pa.us
CC: peter_e@gmx.net, hackers@postgreSQL.org, swalton@galileo.csun.edu
In-reply-to: <24121.944936523@sss.pgh.pa.us> (message from Tom Lane on Sat, 11
Dec 1999 13:22:03 -0500)
Subject: Re: [HACKERS] Re: Mirroring a DB
Reply-to: kdebisschop@range.infoplease.com
References: <24121.944936523@sss.pgh.pa.us>
I'm not the god of rules, but I have messed with that code. Current
sources will put table prefixes on every var in a rule if more than one
table appears in the rule's rangelist. I think this should be
sufficient, but it's hard to tell from this incomplete example;
are you actually complaining about some special case that arises when
a column has the same name as its table?It would be nice to see the original view definition (plus enough table
definitions to let us create the rule without guessing).regards, tom lane
I also looked back to double check versions. Unbeknownst to me, the
source database is 6.5.1 - the destination is 6.5.3
Version 6.5.3 seem to behave as you said, so I'm guessing that this
fix occurred relatively recently and I was just unaware it had been
fixed.
Karl
From bouncefilter Sat Dec 11 16:59:25 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA99585
for <hackers@postgresql.org>; Sat, 11 Dec 1999 16:58:58 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63547 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIgYM79929>; Sat, 11 Dec 1999 22:58:48 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wucc-0001va-00
for hackers@postgresql.org; Sat, 11 Dec 1999 23:04:10 +0100
Date: Sat, 11 Dec 1999 23:04:10 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: hackers@postgresql.org
Subject: createdb with alternate location
Message-ID: <Pine.LNX.4.20.9912112237160.6044-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
In my venturing into createdb/dropdb I came to that little artifact that
allows you to create databases at alternate locations using environment
variables as part of the path (CREATE DATABASE elsewhere WITH LOCATION =
'PGDATA2/foo').
The problem with this is that it doesn't work. It never could have, and
God help you if you try to use it anyway. And it's not only one isolated
problem.
First off, the paths generated by the expansion and the ones generated by
initlocation are different, so the directory will never be found unless
you tweak it by hand. This can be fixed.
Worse, however, is that the expanded path is stored in pg_database (at
least in theory, since you never get there) and once you try to reference
(e.g., remove) the database, the same expansion routine will see the now
absolute path and refuses to allow it.
What really gets me, though, is how this sort of scheme is supposed to
create security in the first place. Perhaps I can create a path based on
the environment variable HOME, or maybe SHELL? Or how about this: you take
an empty environment variable and specify VAR/usr/local/pgsql/lib as your
path. Fun ensues! You can never completely control this stuff. ISTM, this
just makes things worse and more complicated.
How could we still keep this feature but select another method of
specifying the list of allowed paths? The Unix file permissions should
help, but that doesn't necessarily prevent anyone from frying your
existing databases, if you exercise a little imagination when specifying
the paths. How about a) something in some options file (lot of work), or
b) some environment variable of the form PGSQL_ALTLOC=path:path:path?
This is of course barring the potential fact that parts of the code which
I don't completely understand or which I haven't read yet prevent this
whole concept from working in other ways.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 11 17:44:24 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id RAA09392
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 17:43:45 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wv7m-0003kGC; Sat, 11 Dec 99 23:36 MET
Message-Id: <m11wv7m-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sat, 11 Dec 1999 23:36:22 +0100 (MET)
Cc: peter_e@gmx.net, wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912112124.QAA08585@candle.pha.pa.us> from "Bruce Momjian" at
Dec 11, 99 04:24:08 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
While this is great and all, what will happen when long tuples finally get
done? Will you remove this, or keep it, or just make LONG and TEXT
equivalent? I fear that elaborate structures will be put in place here
that might perhaps only be of use for one release cycle.I think the idea is that Jan's idea is better than chaining tuples.
Just as Tom already pointed out, it cannot completely replace
tuple chaining because of the atomicy assumption of single
fsync(2) operation in current code. Due to this, we cannot
get around the cases LONG will leave open by simply raising
BLKSIZE, we instead need to tackle that anyways.
But I believe LONG would still be something worth the efford.
It will lower the pressure on chained tuples, giving us more
time to build a really good solution, and I think LONG can
survive tuple chaining and live in coexistance with it. As
said in my last mail, I still believe that not touching LONG
values at UPDATE can avoid storing the same huge value again.
And that's a benefit, tuple chaining will never give us.
Remember: If your only tool is a hammer, anything MUST look
like a nail. So why not provide a richer set of tools?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 18:13:25 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA14316
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 18:13:01 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wva5-0003kGC; Sun, 12 Dec 99 00:05 MET
Message-Id: <m11wva5-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: hannu@tm.ee (Hannu Krosing)
Date: Sun, 12 Dec 1999 00:05:37 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, wieck@debis.com,
pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <3852A859.DA32BAEF@tm.ee> from "Hannu Krosing" at Dec 11,
99 09:39:05 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hannu Krosing wrote:
Tom Lane wrote:
But I don't really see why this would be either easier to do or
more reliable than storing multiple segments of a tuple in the
primary relation itself. And I don't much care for
institutionalizing a hack like a special "LONG" datatype.AFAIK the "hack" is similar to what Oracle does.
At least this is my impression from some descriptions, and it also
seems reasonable thing to do in general as we dont want to read in
500K tuples (and then sort them) just to join on int fields and filter
out on boolean and count(n) < 3.
Even if this is a side effect I haven't seen at the
beginning, it would be one of the best side effect's I've
ever seen. A really tempting one that's worth to try it
anyway.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 18:26:25 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA15638
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 18:25:34 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
SAA13157;
Sat, 11 Dec 1999 18:25:12 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912112325.SAA13157@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11wv7m-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 11:36:22 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sat, 11 Dec 1999 18:25:12 -0500 (EST)
CC: peter_e@gmx.net, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
While this is great and all, what will happen when long tuples finally get
done? Will you remove this, or keep it, or just make LONG and TEXT
equivalent? I fear that elaborate structures will be put in place here
that might perhaps only be of use for one release cycle.I think the idea is that Jan's idea is better than chaining tuples.
Just as Tom already pointed out, it cannot completely replace
tuple chaining because of the atomicy assumption of single
fsync(2) operation in current code. Due to this, we cannot
get around the cases LONG will leave open by simply raising
BLKSIZE, we instead need to tackle that anyways.
Actually, in looking at the fsync() system call, it does write the
entire file descriptor before marking the transaction as complete, so
there is no hard reason not to raise it, but because the OS has to do
two reads to get 16k, I think we are better keeping 8k as our base block
size.
Jan's idea is not to chain tuples, but to keep tuples at 8k, and instead
chain out individual fields into 8k tuple chunks, as needed. This seems
like it makes much more sense. It uses the database to recreate the
chains.
Let me mention a few things. First, I would like to avoid a LONG data
type if possible. Seems a new data type is just going to make things
more confusing for users.
My ideas is a much more limited one than Jan's. It is to have a special
-1 varlena length when the data is chained on the long relation. I
would do:
-1|oid|attno
in 12 bytes. That way, you can pass this around as long as you want,
and just expand it in the varlena textout and compare routines when you
need the value. That prevents the tuples from changing size while being
processed. As far as I remember, there is no need to see the data in
the tuple except in the type comparison/output routines.
Now it would be nice if we could set the varlena length to 12, it's
actual length, and then just somehow know that the varlena of 12 was a
long data entry. Our current varlena has a maximum length of 64k. I
wonder if we should grab a high bit of that to trigger long. I think we
may be able to do that, and just do a AND mask to remove the bit to see
the length. We don't need the high bit because our varlena's can't be
over 32k. We can modify VARSIZE to strip it off, and make another
macro like ISLONG to check for that high bit.
Seems this could be done with little code.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 11 18:32:25 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA18739
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 18:31:28 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
SAA13267;
Sat, 11 Dec 1999 18:28:07 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912112328.SAA13267@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11wva5-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 12, 1999 00:05:37 am"
To: Jan Wieck <wieck@debis.com>
Date: Sat, 11 Dec 1999 18:28:07 -0500 (EST)
CC: Hannu Krosing <hannu@tm.ee>, tgl@sss.pgh.pa.us,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
At least this is my impression from some descriptions, and it also
seems reasonable thing to do in general as we dont want to read in
500K tuples (and then sort them) just to join on int fields and filter
out on boolean and count(n) < 3.Even if this is a side effect I haven't seen at the
beginning, it would be one of the best side effect's I've
ever seen. A really tempting one that's worth to try it
anyway.
Or make struct varlena vl_len a 15-bit field, and make islong a 1-bit
field. I don't remember if using & manually or bit fields is faster.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 11 18:55:25 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA22881
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 18:55:16 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
SAA13695;
Sat, 11 Dec 1999 18:54:58 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912112354.SAA13695@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11wpeb-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 05:45:53 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sat, 11 Dec 1999 18:54:58 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Maybe we make this mechanism so general that it is
automatically applied to ALL varsize attributes? We'll end up
with on big pg_long where 90+% of the databases content will
be stored.
If most joins, comparisons are done on the 10% in the main table, so
much the better.
But as soon as an attribute stored there is used in a WHERE
or is subject to be joined, you'll see why not (as said, this
type will NOT be enabled for indexing). The operation will
probably fallback to a seq-scan on the main table and then
the attribute must be fetched from pg_long with an index scan
on every single compare etc. - no, no, no.
Let's fact it. Most long tuples are store/retrieve, not ordered on or
used in WHERE clauses. Moving them out of the main table speeds up
things. It also prevents expansion of rows that never end up in the
result set.
In your system, a sequential scan of the table will pull in all this
stuff because you are going to expand the tuple. That could be very
costly. In my system, the expansion only happens on output if they LONG
field does not appear in the WHERE or ORDER BY clauses.
Also, my idea was to auto-enable longs for all varlena types, so short
values stay in the table, while longer chained ones that take up lots of
space and are expensive to expand are retrieved only when needed.
I see this as much better than chained tuples.
And it will not be one single pg_long table. Instead it will
be a separate table per table, that contains one or more LONG
attributes. IIRC, the TRUNCATE functionality was implemented
exactly to QUICKLY be able to whipe out the data from huge
relations AND get the disk space back. In the case of a
central pg_long, TRUNCATE would have to scan pg_long to mark
the tuples for deletion and vacuum must be run to really get
back the space. And a vacuum on this central pg_long would
probably take longer than the old DELETE, VACUUM of the now
truncated table itself. Again no, no, no.
I guess a separate pg_long_ per table would be good.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 11 19:02:26 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA26473
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 19:02:07 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA14030;
Sat, 11 Dec 1999 19:01:49 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912120001.TAA14030@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11wpeb-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 11, 1999 05:45:53 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sat, 11 Dec 1999 19:01:49 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Maybe we make this mechanism so general that it is
automatically applied to ALL varsize attributes? We'll end up
with on big pg_long where 90+% of the databases content will
be stored.But as soon as an attribute stored there is used in a WHERE
or is subject to be joined, you'll see why not (as said, this
type will NOT be enabled for indexing). The operation will
probably fallback to a seq-scan on the main table and then
the attribute must be fetched from pg_long with an index scan
on every single compare etc. - no, no, no.
A field value over 8k is not going to be something you join on,
restrict, or order by in most cases. It is going to be some long
narrative or field that is just for output to the user, usually not used
to process the query.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 11 20:41:26 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id UAA42455
for <pgsql-hackers@postgreSQL.org>;
Sat, 11 Dec 1999 20:41:03 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11wxsq-0003kJC; Sun, 12 Dec 99 02:33 MET
Message-Id: <m11wxsq-0003kJC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Jesus, what have I done (was: LONG)
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sun, 12 Dec 1999 02:33:08 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912112354.SAA13695@candle.pha.pa.us> from "Bruce Momjian" at
Dec 11, 99 06:54:58 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote (in several messages):
Actually, in looking at the fsync() system call, it does write the
entire file descriptor before marking the transaction as complete, so
there is no hard reason not to raise it, but because the OS has to do
two reads to get 16k, I think we are better keeping 8k as our base block
size.
Agreed. Let's stay with the 8K default.
-1|oid|attno
Actually I think you need two more informations to move it
around independently. As you agreed somewhere else (on my
TRUNCATE issue), it would be better to keep the long values
in a per table expansion relation. Thus, you need the Oid of
that too at least. Also, it would be good to know the size of
the data before fetching it, so you need that to.
But that's not the important issue, there's also an (IMHO
dangerous) assumption on it, see below.
Now it would be nice if we could set the varlena length to 12, it's
actual length, and then just somehow know that the varlena of 12 was a
long data entry. Our current varlena has a maximum length of 64k.Or make struct varlena vl_len a 15-bit field, and make islong a 1-bit
field. I don't remember if using & manually or bit fields is faster.
I don't see vl_len as a 15-bit field. In the current sources
(in postgres.h), it is an int32. And I'm sure that not any
code is aware that some magic bit's in it contain a special
meaning. At least the types I added recently (numeric and
lztext) aren't. Nor am I sure, a variable length Datum is
never duplicated somewhere, just by using the information
from vl_len, with or without using the macro. Thus we would
have to visit alot of code to make sure this new variable
length Datum can be passed around as you like.
And the IMHO most counting drawback is, that existing user
type definitions treat the first 32 bits in a variable length
data type just as I interpreted the meaning up to now. So we
could occationally break more than we are aware of.
In your system, a sequential scan of the table will pull in all this
stuff because you are going to expand the tuple. That could be very
costly. In my system, the expansion only happens on output if they LONG
field does not appear in the WHERE or ORDER BY clauses.
In my system, it would do exactly as in your's, because they are mostly the
same. The modification done to the tuple in heap_insert() and heap_replace(),
just before the call to RelationPutHeapTupleAtEnd(), makes each
LONG Datum of varsize 20. Just that the first 32 bits don't contain any
magic information.
Maybe we make this mechanism so general that it is
automatically applied to ALL varsize attributes? We'll end up
with on big pg_long where 90+% of the databases content will
be stored.If most joins, comparisons are done on the 10% in the main table, so
much the better.
Yes, but how would you want to judge which varsize value to
put onto the "secondary" relation, and which one to keep in
the "primary" table for fast comparisions?
I think you forgot one little detail. In our model, you can
only move around the Datum's extended information around as
is. It will never be expanded in place, so it must be fetched
(index scan) again at any place, the value itself is
required.
The installed base currently uses varsize attributes with
indices on them to condition, sort and group on them. Now
pushing such a field into "secondary" occationally will cause
a substantial loss of performance.
So again, how do you determine which of the attributes is a
candidate to push into "secondary"? It is a such generic
approach, that I cannot imagine any fail safe method.
I'd better like to have another LONG data type, that enables
me to store huge string into but where I exactly know what I
can't do with, than having some automatic detection process
that I cannot force to do what I want. It happened just to
often to me, that these "user friendly better knowing what I
might want" systems got me by the ball's. I'm a real
programmer, so there's allway a way out for me, but what
shoud a real user do?
Let's fact it. Most long tuples are store/retrieve, not ordered on or
used in WHERE clauses. Moving them out of the main table speeds up
things. It also prevents expansion of rows that never end up in the
result set.
Having a tuple consisting of 30+ attributes, where 20 of them
are varsize ones (CHAR, VARCHAR, NUMERIC etc.), what makes it
a long tuple? Yes, I'm repeating this question once again,
because we're talking about a "one must fit all cases" here.
stuff because you are going to expand the tuple. That could be very
costly. In my system, the expansion only happens on output if they LONG
field does not appear in the WHERE or ORDER BY clauses.
No I won't. As explained, I would return a tuple as is, just
with the LONG reference information. It will only, but then
allways again, be expanded if needed to compare, store again
or beeing output to the client. This "allways again" is one
of my drawbacks against your "treating all varsize pushable"
concept. In one of my early projects, I had to manage a
microVax for a year, and I love systems that can be fine
tuned since then, really! Auto detection is a nice feature,
but if that failes and you don't have any override option,
you're hosed.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sat Dec 11 21:02:26 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA46971
for <hackers@postgresql.org>; Sat, 11 Dec 1999 21:01:44 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:61385 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sIk5x192575>; Sun, 12 Dec 1999 03:01:33 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11wyPR-00033X-00; Sun, 12 Dec 1999 03:06:49 +0100
Date: Sun, 12 Dec 1999 03:06:49 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Jan Wieck <wieck@debis.com>, oleg@sai.msu.su, hackers@postgresql.org
Subject: Re: [HACKERS] Re: [PATCHES] pg_dump primary keys
In-Reply-To: <23913.944935124@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.20.9912120121530.6044-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-11, Tom Lane mentioned:
Peter Eisentraut wrote:
What though if a function accesses a table? Which one goes first? Do we
have to maintain a network of dependencies in pg_dump? Eventually we'll
probably have to, with all the foreign key stuff coming up. Gloomy
prospects.Couldn't we solve this by the simple expedient of dumping all the
objects in the database in OID order?
Wow, great idea! That might actually solve all (well, most) pg_dump
related problems once and for all. Of course how you get all objects in
the database in oid order is to be determined.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sun Dec 12 00:55:30 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA83724
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 00:54:34 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA17817;
Sun, 12 Dec 1999 00:39:31 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912120539.AAA17817@candle.pha.pa.us>
Subject: Re: Jesus, what have I done (was: LONG)
In-Reply-To: <m11wxsq-0003kJC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 12, 1999 02:33:08 am"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 00:39:31 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
OK, I think I can take your ideas and polish this into a killer feature,
so I will keep going on this discussion.
Bruce Momjian wrote (in several messages):
Actually, in looking at the fsync() system call, it does write the
entire file descriptor before marking the transaction as complete, so
there is no hard reason not to raise it, but because the OS has to do
two reads to get 16k, I think we are better keeping 8k as our base block
size.Agreed. Let's stay with the 8K default.
OK. I am worried about performance problems with increasing this for
non-large tuples. That is why I was liking to keep 8k. We are never
going to be able to configure 8MB tuples, so I figured 8k was good
enough.
-1|oid|attno
Actually I think you need two more informations to move it
around independently. As you agreed somewhere else (on my
TRUNCATE issue), it would be better to keep the long values
in a per table expansion relation. Thus, you need the Oid of
that too at least. Also, it would be good to know the size of
the data before fetching it, so you need that to.
Yes, I see your point that you don't know the relation oid in those adt
routintes. Yes, you would need the oid too. New structure would be:
1-bit long flag|31-bit length|long relid|tuple oid|attno
Now it would be nice if we could set the varlena length to 12, it's
actual length, and then just somehow know that the varlena of 12 was a
long data entry. Our current varlena has a maximum length of 64k.Or make struct varlena vl_len a 15-bit field, and make islong a 1-bit
field. I don't remember if using & manually or bit fields is faster.I don't see vl_len as a 15-bit field. In the current sources
(in postgres.h), it is an int32. And I'm sure that not any
Sorry, 32-bit field. I thought 16-bit because there is no need for
values >8k for length. Seems we have >16 unused bits in the length.
code is aware that some magic bit's in it contain a special
meaning. At least the types I added recently (numeric and
lztext) aren't. Nor am I sure, a variable length Datum is
never duplicated somewhere, just by using the information
from vl_len, with or without using the macro. Thus we would
have to visit alot of code to make sure this new variable
length Datum can be passed around as you like.
I just checked vl_len is used only in varlena.c inv_api.c and in the
VARSIZE define. I make sure of that several releases ago, so they all
use the macro.
And the IMHO most counting drawback is, that existing user
type definitions treat the first 32 bits in a variable length
data type just as I interpreted the meaning up to now. So we
could occationally break more than we are aware of.
OK, the solution is that we never pass back this type with the long bit
set. We always expand it on return to user applications.
We can restrict type expansion to only certain data types. Not all
varlena types have to be expanded.
In your system, a sequential scan of the table will pull in all this
stuff because you are going to expand the tuple. That could be very
costly. In my system, the expansion only happens on output if they LONG
field does not appear in the WHERE or ORDER BY clauses.In my system, it would do exactly as in your's, because they are mostly the
same. The modification done to the tuple in heap_insert() and heap_replace(),
just before the call to RelationPutHeapTupleAtEnd(), makes each
LONG Datum of varsize 20. Just that the first 32 bits don't contain any
magic information.
OK. I just want to get this working in a seamless way with our existing
types.
Maybe we make this mechanism so general that it is
automatically applied to ALL varsize attributes? We'll end up
with on big pg_long where 90+% of the databases content will
be stored.If most joins, comparisons are done on the 10% in the main table, so
much the better.Yes, but how would you want to judge which varsize value to
put onto the "secondary" relation, and which one to keep in
the "primary" table for fast comparisions?
There is only one place in heap_insert that checks for tuple size and
returns an error if it exceeds block size. I recommend when we exceed
that we scan the tuple, and find the largest varlena type that is
supported for long relations, and set the long bit and copy the data
into the long table. Keep going until the tuple is small enough, and if
not, throw an error on tuple size exceeded. Also, prevent indexed
columns from being made long.
I think you forgot one little detail. In our model, you can
only move around the Datum's extended information around as
is. It will never be expanded in place, so it must be fetched
(index scan) again at any place, the value itself is
required.
Yes, I agree, but in most cases it will only be expanded to return to
user application because long fields, as used above only when needed,
are usually not used in WHERE or ORDER BY. If only a few values exceed
the 8k limit, those would have to be retrieved to meet the WHERE or
ORDER BY. If many are long, it would be a lot of lookups, but I think
this solution would be the best for most uses.
The installed base currently uses varsize attributes with
indices on them to condition, sort and group on them. Now
pushing such a field into "secondary" occationally will cause
a substantial loss of performance.
Really? Do people really group/order by on >8k value often? I question
this.
So again, how do you determine which of the attributes is a
candidate to push into "secondary"? It is a such generic
approach, that I cannot imagine any fail safe method.
Outlined above in heap_insert(). Seems it would be a small loop.
I'd better like to have another LONG data type, that enables
me to store huge string into but where I exactly know what I
can't do with, than having some automatic detection process
that I cannot force to do what I want. It happened just to
often to me, that these "user friendly better knowing what I
might want" systems got me by the ball's. I'm a real
programmer, so there's allway a way out for me, but what
shoud a real user do?
Automatic is better, I think. We already have too many character types,
and another one is going to be confusing. Also, if you have data that
is mostly under 8k, but a few are over, how do you store that. Make
them all LONG and have the overhead for each row? This seems like a
situation many people are in. Also, by making it automatic, we can
change the implentation later without having to re-teach people how to
store long tuples.
Let's fact it. Most long tuples are store/retrieve, not ordered on or
used in WHERE clauses. Moving them out of the main table speeds up
things. It also prevents expansion of rows that never end up in the
result set.Having a tuple consisting of 30+ attributes, where 20 of them
are varsize ones (CHAR, VARCHAR, NUMERIC etc.), what makes it
a long tuple? Yes, I'm repeating this question once again,
because we're talking about a "one must fit all cases" here.
Again, scan tuple and move to long table until tuple fits.
stuff because you are going to expand the tuple. That could be very
costly. In my system, the expansion only happens on output if they LONG
field does not appear in the WHERE or ORDER BY clauses.No I won't. As explained, I would return a tuple as is, just
with the LONG reference information. It will only, but then
allways again, be expanded if needed to compare, store again
or beeing output to the client. This "allways again" is one
of my drawbacks against your "treating all varsize pushable"
concept. In one of my early projects, I had to manage a
microVax for a year, and I love systems that can be fine
tuned since then, really! Auto detection is a nice feature,
but if that failes and you don't have any override option,
you're hosed.
I am confused here. With my code, you only have to:
add code to write/read from long tables
add code to expand long values in varlen access routines
add code to heap_insert() to move data to long tables
add code to heap_delete() to invalidate long tuples
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 00:55:29 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA83734
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 00:54:45 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA18133;
Sun, 12 Dec 1999 00:53:27 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912120553.AAA18133@candle.pha.pa.us>
Subject: Re: Jesus, what have I done (was: LONG)
In-Reply-To: <m11wxsq-0003kJC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 12, 1999 02:33:08 am"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 00:53:27 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
around independently. As you agreed somewhere else (on my
TRUNCATE issue), it would be better to keep the long values
in a per table expansion relation. Thus, you need the Oid of
that too at least. Also, it would be good to know the size of
the data before fetching it, so you need that to.
Yes, I guess you could store the size, but the length is known by
looking at the long relation. We already have an index to get them in
order, so there is no need to load them in random order.
The installed base currently uses varsize attributes with
indices on them to condition, sort and group on them. Now
pushing such a field into "secondary" occationally will cause
a substantial loss of performance.
We could allow indexes on long values by storing only 4k of the value.
If there is no other index value with a matching 4k value, the index of
4k length is fine. If no, you fail the insert with an error.
I'd better like to have another LONG data type, that enables
me to store huge string into but where I exactly know what I
can't do with, than having some automatic detection process
that I cannot force to do what I want. It happened just to
often to me, that these "user friendly better knowing what I
might want" systems got me by the ball's. I'm a real
programmer, so there's allway a way out for me, but what
shoud a real user do?
Automatic allows small values to be inline, and long values to be moved
to long tables in the same column. This is a nice feature. It
maximizes performance and capabilities. I can't imagine why someone
would want a LONG column if they can have a column that does both inline
and long automatically and efficiently.
No I won't. As explained, I would return a tuple as is, just
with the LONG reference information. It will only, but then
allways again, be expanded if needed to compare, store again
or beeing output to the client. This "allways again" is one
of my drawbacks against your "treating all varsize pushable"
concept. In one of my early projects, I had to manage a
microVax for a year, and I love systems that can be fine
tuned since then, really! Auto detection is a nice feature,
but if that failes and you don't have any override option,
you're hosed.
So you expand it when you need it? That's fine. We can do that, except
if you are accessing a real in-buffer tuple, and I am not sure you are
going to know that at the time in all routines. By looking up each time
it is needed and not changing the tuple, you make changes to the system
minimal. And in my system, you have long entries only when the data
requires it.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 01:04:29 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA87481
for <hackers@postgreSQL.org>; Sun, 12 Dec 1999 01:04:00 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA25500;
Sun, 12 Dec 1999 01:03:12 -0500 (EST)
To: kdebisschop@range.infoplease.com
cc: peter_e@gmx.net, hackers@postgreSQL.org, swalton@galileo.csun.edu
Subject: Re: [HACKERS] Re: Mirroring a DB
In-reply-to: Your message of Sat, 11 Dec 1999 16:45:44 -0500
<199912112145.QAA03586@skillet.infoplease.com>
Date: Sun, 12 Dec 1999 01:03:12 -0500
Message-ID: <25498.944978592@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Karl DeBisschop <kdebisschop@range.infoplease.com> writes:
Current
sources will put table prefixes on every var in a rule if more than one
table appears in the rule's rangelist. I think this should be
sufficient, but it's hard to tell from this incomplete example;
Version 6.5.3 seem to behave as you said, so I'm guessing that this
fix occurred relatively recently and I was just unaware it had been
fixed.
Actually, 6.5.3 just unconditionally prefixes all vars in a decompiled
rule, all the time. That was a quick-patch solution to the type of
problem you are complaining of. Current sources (6.6/7.0-to-be) try to
be smarter by only prefixing vars when there is possible ambiguity (ie,
more than one table in the rangelist). That's why I was concerned about
the details of your example --- I was wondering if this "improvement"
might fail under the right special case...
regards, tom lane
From bouncefilter Sun Dec 12 01:14:30 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA89150
for <hackers@postgreSQL.org>; Sun, 12 Dec 1999 01:14:04 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA25601;
Sun, 12 Dec 1999 01:13:31 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] createdb with alternate location
In-reply-to: Your message of Sat, 11 Dec 1999 23:04:10 +0100 (CET)
<Pine.LNX.4.20.9912112237160.6044-100000@localhost.localdomain>
Date: Sun, 12 Dec 1999 01:13:31 -0500
Message-ID: <25599.944979211@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
[ CREATE DATABASE WITH LOCATION shouldn't depend on environment vars ]
I agree, this oughta be flushed. Is the expansion routine used in any
other contexts where depending on an environment var *would* make sense?
What really gets me, though, is how this sort of scheme is supposed to
create security in the first place.
I doubt security was foremost in the mind of whoever did that. Still,
the environment vars in question are those created by the dbadmin before
starting the postmaster; it's not like unprivileged users can affect
them. So I'd say it's just a chance to shoot yourself in the foot,
not a question of exposing yourself to enemy fire...
regards, tom lane
From bouncefilter Sun Dec 12 01:54:30 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA98709
for <hackers@postgreSQL.org>; Sun, 12 Dec 1999 01:53:54 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id BAA25721;
Sun, 12 Dec 1999 01:52:42 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Jan Wieck <wieck@debis.com>, oleg@sai.msu.su, hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: [PATCHES] pg_dump primary keys
In-reply-to: Your message of Sun, 12 Dec 1999 03:06:49 +0100 (CET)
<Pine.LNX.4.20.9912120121530.6044-100000@localhost.localdomain>
Date: Sun, 12 Dec 1999 01:52:41 -0500
Message-ID: <25719.944981561@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
Couldn't we solve this by the simple expedient of dumping all the
objects in the database in OID order?
Wow, great idea! That might actually solve all (well, most) pg_dump
related problems once and for all. Of course how you get all objects in
the database in oid order is to be determined.
I think it would take some restructuring in pg_dump: instead of
processing each type of database object separately, it would have to
grab some info (at least the OIDs and types) for all the different
objects in the DB, then sort this info by OID, and finally get the
details and produce the output for each object in OID order.
This would still fail in some pathological cases involving ALTER --- for
example, make a table, later create a new datatype, and then ALTER TABLE
ADD COLUMN of that datatype. So the next refinement would be to examine
dependencies and do a topological sort rather than a simple sort by OID.
We'd still have to restructure pg_dump as above, though, and "examining
dependencies" is not exactly trivial for function bodies in unknown PL
languages...
If we had ALTER FUNCTION, which we don't but should, I think it would
actually be possible to create circular dependencies for which there is
*no* dump order that will work :-(. So I'm not sure it's worth the
trouble to add dependency extraction and a topological sort algorithm
to pg_dump rather than just sorting by OID. Dumping in OID order will
solve 99% of the problem with a fraction of the work.
regards, tom lane
From bouncefilter Sun Dec 12 06:12:33 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id GAA48856
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 06:12:04 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11x6nh-0003kGC; Sun, 12 Dec 99 12:04 MET
Message-Id: <m11x6nh-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: Jesus, what have I done (was: LONG)
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sun, 12 Dec 1999 12:04:25 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912120539.AAA17817@candle.pha.pa.us> from "Bruce Momjian" at
Dec 12, 99 00:39:31 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
No I won't. As explained, I would return a tuple as is, just
with the LONG reference information. It will only, but then
allways again, be expanded if needed to compare, store again
or beeing output to the client. This "allways again" is one
of my drawbacks against your "treating all varsize pushable"
concept. In one of my early projects, I had to manage a
microVax for a year, and I love systems that can be fine
tuned since then, really! Auto detection is a nice feature,
but if that failes and you don't have any override option,
you're hosed.I am confused here. With my code, you only have to:
add code to write/read from long tables
add code to expand long values in varlen access routines
add code to heap_insert() to move data to long tables
add code to heap_delete() to invalidate long tuples
Add code to expand long values in varlen access routines,
you're joking - no?
How many functions are there, called via the fmgr with a
Datum as argument, and only knowing by themself (and a system
catalog) that they receive a variable length attribute?
So you would better do the fetching in the fmgr. Then again,
there are many places in the code (and possibly in user
extensions too), that call builtin functions like textout()
directly, passing it the Datum they got from somewhere.
I can understand why you would like to automatically pull out
varsize values as needed. But I see really a bunch of
problems coming with it.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 07:03:33 1999
Received: from sunpine.krs.ru (SunPine.krs.ru [195.161.16.37])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA57590
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 07:02:40 -0500 (EST) (envelope-from vadim@krs.ru)
Received: from krs.ru (dune.krs.ru [195.161.16.38])
by sunpine.krs.ru (8.8.8/8.8.8) with ESMTP id SAA06332;
Sun, 12 Dec 1999 18:55:40 +0700 (KRS)
Sender: root@sunpine.krs.ru
Message-ID: <38538D3A.85FD8D32@krs.ru>
Date: Sun, 12 Dec 1999 18:55:38 +0700
From: Vadim Mikheev <vadim@krs.ru>
Organization: OJSC Rostelecom (Krasnoyarsk)
X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-RELEASE i386)
X-Accept-Language: ru, en
MIME-Version: 1.0
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
CC: Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>, "'The Hermit Hacker'" <scrappy@hub.org>,
Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References:
<1B3D5E532D18D311861A00600865478C70BF6A@exchange1.nt.maidstone.gov.uk>
<38511FA3.38B9A5E1@alumni.caltech.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Thomas Lockhart wrote:
btw, I'm not really happy with the prospect/suggestion of going from
7.0 to 8.0 in a short time period; one of things I'm most satisfied
^^^^^^^^^^
with in our development is that we have significant minor releases and
that we haven't succumbed to the "major rev only" marketing driven
ploys of the big guys...
I agreed! I propose to name the next release as 6.6
and the "WAL" release as 7.0 or 6.7, but not 8.0...
Vadim
From bouncefilter Sun Dec 12 07:22:34 1999
Received: from sunpine.krs.ru (SunPine.krs.ru [195.161.16.37])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA58863
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 07:22:10 -0500 (EST) (envelope-from vadim@krs.ru)
Received: from krs.ru (dune.krs.ru [195.161.16.38])
by sunpine.krs.ru (8.8.8/8.8.8) with ESMTP id TAA06450
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 19:22:09 +0700 (KRS)
Sender: root@sunpine.krs.ru
Message-ID: <38539371.37B706DC@krs.ru>
Date: Sun, 12 Dec 1999 19:22:09 +0700
From: Vadim Mikheev <vadim@krs.ru>
Organization: OJSC Rostelecom (Krasnoyarsk)
X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-RELEASE i386)
X-Accept-Language: ru, en
MIME-Version: 1.0
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References:
<1B3D5E532D18D311861A00600865478C70BF6A@exchange1.nt.maidstone.gov.uk>
<38511FA3.38B9A5E1@alumni.caltech.edu> <38538D3A.85FD8D32@krs.ru>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Vadim Mikheev wrote:
Thomas Lockhart wrote:
btw, I'm not really happy with the prospect/suggestion of going from
7.0 to 8.0 in a short time period; one of things I'm most satisfied^^^^^^^^^^
with in our development is that we have significant minor releases and
that we haven't succumbed to the "major rev only" marketing driven
ploys of the big guys...I agreed! I propose to name the next release as 6.6
^^^
or 7.0
and the "WAL" release as 7.0 or 6.7, but not 8.0...
^^^
and 7.1
Vadim
From bouncefilter Sun Dec 12 10:01:36 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA90719
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 10:01:00 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
JAA03874;
Sun, 12 Dec 1999 09:42:50 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912121442.JAA03874@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: Jesus, what have I done (was: LONG)
In-Reply-To: <m11x6nh-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 12, 1999 12:04:25 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 09:42:50 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I am confused here. With my code, you only have to:
add code to write/read from long tables
add code to expand long values in varlen access routines
add code to heap_insert() to move data to long tables
add code to heap_delete() to invalidate long tuplesAdd code to expand long values in varlen access routines,
you're joking - no?
No, I am not joking. Why not expand them there? If we look at textout,
it returns a character string for the text field. Why not do the lookup
of long there and return a very long value?
If we look at texteq, we expand any long values into a palloc'ed area
and do the compare. Here, I can see the advantage of knowing the length
of the long string.
How many functions are there, called via the fmgr with a
Datum as argument, and only knowing by themself (and a system
catalog) that they receive a variable length attribute?So you would better do the fetching in the fmgr. Then again,
there are many places in the code (and possibly in user
extensions too), that call builtin functions like textout()
directly, passing it the Datum they got from somewhere.
I see what you are suggesting, that we expand in fmgr, but we don't know
the arg types in there, do we? I was suggesting we create an
expand_long() function that takes a long varlena and returns the long
value in palloc'ed memory, and sprinkle the calls in varlena.c and
varchar.c, etc.
If you prefer to expand the tuple itself, you can do that, but I think
doing it only when needed is easier because of in-buffer tuples that you
have to process without modification.
I can understand why you would like to automatically pull out
varsize values as needed. But I see really a bunch of
problems coming with it.
These are the only comments you have? Does that mean the other things I
said are OK, or that you are humoring me?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 10:01:35 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA90672
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 10:00:58 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
JAA04151;
Sun, 12 Dec 1999 09:56:16 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912121456.JAA04151@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: Jesus, what have I done (was: LONG)
In-Reply-To: <m11x6nh-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 12, 1999 12:04:25 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 09:56:16 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
add code to write/read from long tables
add code to expand long values in varlen access routines
add code to heap_insert() to move data to long tables
add code to heap_delete() to invalidate long tuplesAdd code to expand long values in varlen access routines,
you're joking - no?How many functions are there, called via the fmgr with a
Datum as argument, and only knowing by themself (and a system
catalog) that they receive a variable length attribute?So you would better do the fetching in the fmgr. Then again,
there are many places in the code (and possibly in user
extensions too), that call builtin functions like textout()
directly, passing it the Datum they got from somewhere.
You may be able to expand the in-tuple copy if you had a bit on the
tuple that said long fields exist, and do a heap_tuplecopy() only in
those cases.
You also could cache recently lookuped expand_long value so repeated
calls could return the value without reconstructing the long value.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 13:01:38 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA21377
for <pgsql-hackers@postgresql.org>;
Sun, 12 Dec 1999 13:01:32 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id OAA52945;
Sun, 12 Dec 1999 14:01:20 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Sun, 12 Dec 1999 14:01:20 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Vadim Mikheev <vadim@krs.ru>
cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <38539371.37B706DC@krs.ru>
Message-ID: <Pine.BSF.4.21.9912121401110.49729-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
7.0 and 7.1 I could live with...
On Sun, 12 Dec 1999, Vadim Mikheev wrote:
Vadim Mikheev wrote:
Thomas Lockhart wrote:
btw, I'm not really happy with the prospect/suggestion of going from
7.0 to 8.0 in a short time period; one of things I'm most satisfied^^^^^^^^^^
with in our development is that we have significant minor releases and
that we haven't succumbed to the "major rev only" marketing driven
ploys of the big guys...I agreed! I propose to name the next release as 6.6
^^^
or 7.0and the "WAL" release as 7.0 or 6.7, but not 8.0...
^^^
and 7.1Vadim
************
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Sun Dec 12 13:03:38 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA21532
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 13:03:26 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA26629;
Sun, 12 Dec 1999 13:02:14 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG
In-reply-to: Your message of Sat, 11 Dec 1999 18:54:58 -0500 (EST)
<199912112354.SAA13695@candle.pha.pa.us>
Date: Sun, 12 Dec 1999 13:02:13 -0500
Message-ID: <26627.945021733@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Also, my idea was to auto-enable longs for all varlena types, so short
values stay in the table, while longer chained ones that take up lots of
space and are expensive to expand are retrieved only when needed.
I missed most of yesterday's discussion (was off fighting a different
fire...). This morning in the shower I had a brilliant idea, which
I now see Bruce has beaten me to ;-)
The idea of doing tuple splitting by pushing "long" fields out of line,
rather than just cutting up the tuple at arbitrary points, is clearly
a win for the reasons Bruce and Jan point out. But I like Bruce's
approach (automatically do it for any overly-long varlena attribute)
much better than Jan's (invent a special LONG datatype). A special
datatype is bad for several reasons:
* it forces users to kluge up their database schemas;
* inevitably, users will pick the wrong columns to make LONG (it's
a truism that programmers seldom guess right about what parts of
their programs consume the most resources; users would need a
"profiler" to make the right decisions);
* it doesn't solve the problems for arrays, which desperately need it;
* we'd need to add a whole bunch of operations on the special datatype;
I could live with all of those limitations if a "clean" datatype-based
solution were possible, ie, all the special code is in the datatype
functions. But we already know that that's not possible --- there would
have to be special hacks for the LONG datatype in other places. So I
think we ought to handle the problem as part of the tuple access
machinery, not as a special datatype.
I think that the right place to implement this is in heapam, and that
it should go more or less like this:
1. While writing out a tuple, if the total tuple size is "too big"
(threshold would be some fraction of BLCKSZ, yet to be chosen),
then the tuple manager would go through the tuple to find the longest
varlena attribute, and convert same into an out-of-line attribute.
Repeat if necessary until tuple size fits within threshold.
2. While reading a tuple, fastgetattr() automatically fetches the
out-of-line value if it sees the requested attribute is out-of-line.
(I'd be inclined to mark out-of-line attributes in the same way that
NULL attributes are marked: one bit in the tuple header shows if any
out-of-line attrs are present, and if so there is a bitmap to show
which ones are out-of-line. We could also use Bruce's idea of
commandeering the high-order bit of the varlena length word, but
I think that's a much uglier and more fragile solution.)
I think that these two changes would handle 99% of the problem.
VACUUM would still need work, but most normal access to tuples would
just work automatically, because all access to varlena fields must go
through fastgetattr().
An as-yet-unsolved issue is how to avoid memory leaks of out-of-line
values after they have been read in by fastgetattr(). However, I think
that's going to be a nasty problem with Jan's approach as well. The
best answer might be to solve this in combination with addressing the
problem of leakage of temporary results during expression evaluation,
say by adding some kind of reference-count convention to all varlena
values.
BTW, I don't see any really good reason to keep the out-of-line values
in a separate physical file (relation) as Jan originally proposed.
Why not keep them in the same file, but mark them as being something
different than a normal tuple? Sequential scans would have to know to
skip over them (big deal), and VACUUM would have to handle them
properly, but I think VACUUM is going to have to have special code to
support this feature no matter what. If we do make them a new primitive
kind-of-a-tuple on disk, we could sidestep the problem of marking all
the out-of-line values associated with a tuple when the tuple is
outdated by a transaction. The out-of-line values wouldn't have
transaction IDs in them at all; they'd just be labeled with the CTID
and/or OID of the primary tuple they belong to. VACUUM would consult
that tuple to determine whether to keep or discard an out-of-line value.
regards, tom lane
From bouncefilter Sun Dec 12 13:11:38 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA22469
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 13:11:26 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA26687;
Sun, 12 Dec 1999 13:10:22 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG
In-reply-to: Your message of Sat, 11 Dec 1999 19:01:49 -0500 (EST)
<199912120001.TAA14030@candle.pha.pa.us>
Date: Sun, 12 Dec 1999 13:10:22 -0500
Message-ID: <26685.945022222@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
A field value over 8k is not going to be something you join on,
restrict, or order by in most cases. It is going to be some long
narrative or field that is just for output to the user, usually not used
to process the query.
Not necessarily. The classic example in my mind is a text field that
the user will want to do LIKE or regexp matching searches on. When
he does so (and only when he does so), we'd have no choice but to pull
in the out-of-line value for each tuple in order to check the WHERE
clause. But we'd have to do that no matter how you slice the problem.
I think the case that is actually worth thinking about is where some
values of the column are long and some are not so long. We should avoid
a solution that imposes out-of-line storage on *every* tuple even when
the particular tuple isn't large enough to cause a problem.
I believe all of the proposals made so far have the ability to keep a
short value in-line, but the data-type-based approach has a significant
disadvantage: the decision has to be made by a data-type-specific
routine that wouldn't have information about the rest of the tuple that
the data will end up in. So it would have to err on the side of caution
and put anything more than a fairly short value out-of-line. If the
decision is made by the tuple storage routine, then it can examine the
whole tuple and make a more nearly optimal choice about what to put
out-of-line.
regards, tom lane
From bouncefilter Sun Dec 12 13:29:38 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA24274
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 13:29:05 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA26789;
Sun, 12 Dec 1999 13:28:01 -0500 (EST)
To: Vadim Mikheev <vadim@krs.ru>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Sun, 12 Dec 1999 19:22:09 +0700
<38539371.37B706DC@krs.ru>
Date: Sun, 12 Dec 1999 13:28:01 -0500
Message-ID: <26787.945023281@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Vadim Mikheev <vadim@krs.ru> writes:
I agreed! I propose to name the next release as 6.6
^^^
or 7.0and the "WAL" release as 7.0 or 6.7, but not 8.0...
^^^
and 7.1
7.0 and 7.1 seem like the worst choice of names to me. We are not
planning any major new features for the Feb release (except for whatever
part of foreign key support Jan has working by then). There will be
some major new features for the release-after-that: WAL, some kind of
answer for the long-tuple problem, etc. etc. So it'd be very confusing
to users to call this one a "major" version bump, when it will have less
new stuff in it than the "minor" version bumps before and after.
I could live with 7.0 and then 8.0, if we were going to switch to
two-part instead of three-part version numbering. But I agree with
Thomas that I'd rather stick to the convention we have been using.
If we are going to be consistent with the way we have named prior
releases, it seems to me that there is no choice: the Feb release
is 6.6, and the one after it will be 7.0 (or maybe even 6.7).
I also would rather do it that way because I think the idea is to
wrap up *what we have now* and get it out. If we call the Feb release
7.0, then Thomas will want to cram in date/time type consolidation work
that (AFAIK) he hasn't even started on, and there'll be great temptation
to try to squeeze in other half-baked stuff in order to try to justify
calling this a major version bump. That's completely at odds with what
I thought the proposal of a near-term release was all about.
Basically, if people insist that the next release should be called 7.0,
I'd be inclined to forget about a near-term release and go back to
Plan A: keep working on it until we have enough stuff done to justify
calling it 7.0.
regards, tom lane
From bouncefilter Sun Dec 12 14:16:38 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA33079
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 14:16:22 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id OAA26847
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 14:15:47 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: Work plan: aggregate(DISTINCT ...)
Date: Sun, 12 Dec 1999 14:15:47 -0500
Message-ID: <26844.945026147@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
As I mentioned in passing a day or two ago, I've figured out how to
support aggregates whose input is flagged DISTINCT without too much
pain. Basically it can all be done inside nodeAgg.c, once we teach
the parser to put the DISTINCT flag bit into Aggref querytree nodes.
(a) If DISTINCT is not specified for a particular aggregate, then
nodeAgg.c runs the aggregate's transition function(s) as each input
tuple is presented, same as now.
(b) If DISTINCT is specified, then nodeAgg.c evaluates the aggregate's
input expression at each input tuple, and passes the resulting datum
into a sort operation that it's started. (Now that tuplesort.c has
a fairly clean object-based interface, it will be easy to start up
a separate sort operation for each DISTINCT aggregate.)
(c) At the end of the input table (or row group), nodeAgg.c does this
for each DISTINCT aggregate:
* finish the pending sort operation;
* scan the sort output, drop adjacent duplicate values (the code for
this can be borrowed from nodeUnique), and run the aggregate's
transition function(s) for each remaining value.
Finally, the aggregate result values can be computed for all the
aggregates (both DISTINCT and regular), and then the output tuple
can be formed.
This is looking like a day's work at most, and considering how often
it gets asked for, I think it's well worth doing.
A limitation of this approach is that an explicit sort of the aggregate
input values will always be done, even when the input is or could be
delivered in the right order anyway. It is certainly *necessary* that
nodeAgg.c be able to do internal sorts on-the-fly, in order to cope with
multiple DISTINCT aggregates, eg
SELECT COUNT(DISTINCT foo), AVG(DISTINCT bar) FROM table;
since there is no way to scan the table in an order that's sorted for
both simultaneously. But in simpler cases it might be a win if the
optimizer generated a plan that delivered the data in the right order
and nodeAgg.c could be told to skip the internal sort for a DISTINCT
aggregate. I'm not going to worry about that now, but it's a possible
future improvement.
regards, tom lane
From bouncefilter Sun Dec 12 14:53:40 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA38708
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 14:53:19 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id A0C1AB353; Sun, 12 Dec 1999 21:55:37 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <3853FDB8.DA34A6E0@tm.ee>
Date: Sun, 12 Dec 1999 21:55:36 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: Jesus, what have I done (was: LONG)
References: <199912120539.AAA17817@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
If most joins, comparisons are done on the 10% in the main table, so
much the better.Yes, but how would you want to judge which varsize value to
put onto the "secondary" relation, and which one to keep in
the "primary" table for fast comparisions?There is only one place in heap_insert that checks for tuple size and
returns an error if it exceeds block size. I recommend when we exceed
that we scan the tuple, and find the largest varlena type that is
supported for long relations, and set the long bit and copy the data
into the long table. Keep going until the tuple is small enough, and if
not, throw an error on tuple size exceeded. Also, prevent indexed
columns from being made long.
And prevent indexes from being created later if fields in some recorde
are made long ?
Or would it be enogh here to give out a warning ?
Or should one try to re-pack these tuples ?
Or, for tables that have mosty 10-char fields bu an occasional 10K field
we could possibly approach the indexes as currently proposed for tables,
i.e. make the index's data part point to the same LONG relation ?
The latter would probably open another can of worms.
---------
Hannu
From bouncefilter Sun Dec 12 15:53:39 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id PAA49205
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 15:53:33 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xFsS-0003kGC; Sun, 12 Dec 99 21:45 MET
Message-Id: <m11xFsS-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Sun, 12 Dec 1999 21:45:56 +0100 (MET)
Cc: pgman@candle.pha.pa.us, wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <26627.945021733@sss.pgh.pa.us> from "Tom Lane" at Dec 12,
99 01:02:13 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Also, my idea was to auto-enable longs for all varlena types, so short
values stay in the table, while longer chained ones that take up lots of
space and are expensive to expand are retrieved only when needed.I missed most of yesterday's discussion (was off fighting a different
fire...). This morning in the shower I had a brilliant idea, which
I now see Bruce has beaten me to ;-)The idea of doing tuple splitting by pushing "long" fields out of line,
rather than just cutting up the tuple at arbitrary points, is clearly
a win for the reasons Bruce and Jan point out. But I like Bruce's
approach (automatically do it for any overly-long varlena attribute)
much better than Jan's (invent a special LONG datatype). A special
datatype is bad for several reasons:
* it forces users to kluge up their database schemas;
* inevitably, users will pick the wrong columns to make LONG (it's
a truism that programmers seldom guess right about what parts of
their programs consume the most resources; users would need a
"profiler" to make the right decisions);
* it doesn't solve the problems for arrays, which desperately need it;
* we'd need to add a whole bunch of operations on the special datatype;
O.K.,
you two got me now.
I think that the right place to implement this is in heapam, and that
it should go more or less like this:1. While writing out a tuple, if the total tuple size is "too big"
(threshold would be some fraction of BLCKSZ, yet to be chosen),
then the tuple manager would go through the tuple to find the longest
varlena attribute, and convert same into an out-of-line attribute.
Repeat if necessary until tuple size fits within threshold.
Yepp. But it does NOT mangle up the tuple handed to it in
place. The flat values in the tuple are sometimes used AFTER
heap_insert() and heap_update(), for example for
index_insert. So that might break other places.
2. While reading a tuple, fastgetattr() automatically fetches the
out-of-line value if it sees the requested attribute is out-of-line.
(I'd be inclined to mark out-of-line attributes in the same way that
NULL attributes are marked: one bit in the tuple header shows if any
out-of-line attrs are present, and if so there is a bitmap to show
which ones are out-of-line. We could also use Bruce's idea of
commandeering the high-order bit of the varlena length word, but
I think that's a much uglier and more fragile solution.)I think that these two changes would handle 99% of the problem.
VACUUM would still need work, but most normal access to tuples would
just work automatically, because all access to varlena fields must go
through fastgetattr().
And I like Bruce's idea with the high order bit of vl_len.
This is IMHO the only chance, to tell on UPDATE if the value
wasn't changed.
To detect that an UPDATE did not touch the out of line value,
you need the complete long reference information in the
RESULT tuple. The executor must not expand the value while
building them up already.
But Tom is right, there is a visibility problem I haven't
seen before. It is that when fetching the out of line
attribute (for example in the type output function) is done
later than fetching the reference information. Then a
transaction reading dirty or committed might see wrong
content, or worse, see different contents at different
fetches.
The solution I see is to give any out of line datum another
Oid, that is part of it's header and stamped into the
reference data. That way, the long attribute lookup can use
SnapshotAny using this Oid, there can only be one that
exists, so SnapshotAny is safe here and forces that only the
visibility of the master tuple in the main table counts at
all.
Since this Values Oid is known in the Values reference of the
tuple, we only need two indices on the out of line data. One
on this Oid, on on the referencing row's oid|attrno|seq to
be fast in heap_delete() and heap_update().
An as-yet-unsolved issue is how to avoid memory leaks of out-of-line
values after they have been read in by fastgetattr(). However, I think
that's going to be a nasty problem with Jan's approach as well. The
best answer might be to solve this in combination with addressing the
problem of leakage of temporary results during expression evaluation,
say by adding some kind of reference-count convention to all varlena
values.
At the point we decide to move an attribute out of the tuple,
we make a lookup in an array consisting of type Oid's. Thus,
we have plenty of time to add one datatype after another and
enable them separately for long processing, but get the ones
enabled ASAP (next release) out of the door.
As Bruce suggested, we implement a central function that
fetches back the long value. This is used in all the type
specific funcitons in adt. Now that we have an Oid
identifier per single value, it's easy to implement a cache
there, that can manage a LRU table of the last fetched values
and cache smaller ones for fast access.
It's the response of the types adt functions, to free the
returned (old VARLENA looking) memory. Since we enable the
types one-by-one, there's no need to hurry on this.
BTW, I don't see any really good reason to keep the out-of-line values
in a separate physical file (relation) as Jan originally proposed.
Why not keep them in the same file, but mark them as being something
different than a normal tuple? Sequential scans would have to know to
skip over them (big deal), and VACUUM would have to handle them
The one I see is that a sequential scan would not benefit
from this, it still has to read the entire relation, even if
looking only on small, fixed size items in the tuple. Will be
a big win for count(*). And with the mentioned value cache
for relatively small (yet to define what that is) values,
there will be very little overhead in a sort, if the tuples
in it are sorted by an attribute where some long values
occationally appear.
properly, but I think VACUUM is going to have to have special code to
support this feature no matter what. If we do make them a new primitive
kind-of-a-tuple on disk, we could sidestep the problem of marking all
the out-of-line values associated with a tuple when the tuple is
outdated by a transaction. The out-of-line values wouldn't have
transaction IDs in them at all; they'd just be labeled with the CTID
and/or OID of the primary tuple they belong to. VACUUM would consult
that tuple to determine whether to keep or discard an out-of-line value.
AFAIK, VACUUM consults single attributes of a tuple only to
produce the statistical informations for them on ANALYZE.
Well, statistical information for columns containing LONG
values aren't good for the WHERE clause (I think we all agree
on that). So it doesn't matter if these informations aren't
totally accurate, or if VACUUM counts them but uses only the
first couple of bytes for the min/max etc. info.
Also, the new long data relations should IMHO have their own
relkind. So VACUUM can easily detect them. This I think is
required, so VACUUM can place an exclusive lock on the main
table first before starting to vacuum the long values (which
can be done as is since it is in fact a normal relation -
just not visible to the user). This should avoid race
conditions as explained above on the visibility problem.
I'll start to play around with this approach for a while,
using lztext as test candidate (with custom compression
parameters that force uncompressed storage). When I have some
reasonable result ready to look at, I'll send a patch here,
so we can continue the discussion while looking at some test
implementation.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 16:01:40 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA52407
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 16:01:06 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
PAA07970;
Sun, 12 Dec 1999 15:59:27 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912122059.PAA07970@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <26787.945023281@sss.pgh.pa.us> from Tom Lane at "Dec 12,
1999 01:28:01 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 12 Dec 1999 15:59:27 -0500 (EST)
CC: Vadim Mikheev <vadim@krs.ru>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=UNKNOWN-8BIT
Content-Transfer-Encoding: 8bit
Vadim Mikheev <vadim@krs.ru> writes:
I agreed! I propose to name the next release as 6.6
^^^
or 7.0and the "WAL" release as 7.0 or 6.7, but not 8.0...
^^^
and 7.17.0 and 7.1 seem like the worst choice of names to me. We are not
planning any major new features for the Feb release (except for whatever
part of foreign key support Jan has working by then). There will be
some major new features for the release-after-that: WAL, some kind of
answer for the long-tuple problem, etc. etc. So it'd be very confusing
to users to call this one a "major" version bump, when it will have less
new stuff in it than the "minor" version bumps before and after.I could live with 7.0 and then 8.0, if we were going to switch to
two-part instead of three-part version numbering. But I agree with
Thomas that I'd rather stick to the convention we have been using.
If we are going to be consistent with the way we have named prior
releases, it seems to me that there is no choice: the Feb release
is 6.6, and the one after it will be 7.0 (or maybe even 6.7).I also would rather do it that way because I think the idea is to
wrap up *what we have now* and get it out. If we call the Feb release
7.0, then Thomas will want to cram in date/time type consolidation work
that (AFAIK) he hasn't even started on, and there'll be great temptation
to try to squeeze in other half-baked stuff in order to try to justify
calling this a major version bump. That's completely at odds with what
I thought the proposal of a near-term release was all about.Basically, if people insist that the next release should be called 7.0,
I'd be inclined to forget about a near-term release and go back to
Plan A: keep working on it until we have enough stuff done to justify
calling it 7.0.
Let's look at the 7.0 features list:
Foreign Keys - Jan
WAL - Vadim
Function args - Tom
System indexes - Bruce
Date/Time types - Thomas
Optimizer - Tom
Outer Joins - Thomas?
Long Tuples - ?
We have foreign keys and long tuples in Feb 1. Jan says on���long tuples:
I thought about the huge size variable text type a little
more. And I think I could get the following implementation
to work reliable for our upcoming release.
The more we explore long tuples, it seems easier than expected.
Chaining tuples was going to be hard. The new way is more efficient, and
easier.
I assume Thomas may do the date/time for Feb 1 because it mostly
removing old types, I think.
So, we will not have WAL for Feb 1, but people are clammoring for
foreign keys and long tuples. I think 7.0 is good for Feb 1. We can add
WAL in 7.1.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 16:13:40 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA54225
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 16:12:42 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
QAA08216;
Sun, 12 Dec 1999 16:11:17 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912122111.QAA08216@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: Jesus, what have I done (was: LONG)
In-Reply-To: <m11x6nh-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 12, 1999 12:04:25 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 16:11:17 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I am confused here. With my code, you only have to:
add code to write/read from long tables
add code to expand long values in varlen access routines
add code to heap_insert() to move data to long tables
add code to heap_delete() to invalidate long tuplesAdd code to expand long values in varlen access routines,
you're joking - no?
Here is a patch to textout() that allows it to handle long tuples. It
checks the long bit, and calls the proper expansion function, and
pfree()'s it on exit.
It is a minimal amount of code that could be added to all the varlena
access routines. I would be glad to do it.
By doing it there, we expand only when we access the varlena value, not
on every tuple.
---------------------------------------------------------------------------
*** varlena.c Sun Nov 7 18:08:24 1999
--- varlena.c.new Sun Dec 12 15:49:35 1999
***************
*** 176,181 ****
--- 176,182 ----
{
int len;
char *result;
+ bool islong = false;
if (vlena == NULL)
{
***************
*** 184,189 ****
--- 185,197 ----
result[1] = '\0';
return result;
}
+
+ if (VARISLONG(vlena)) /* checks long bit */
+ {
+ vlena = expand_long(vlena); /* returns palloc long */
+ islong = true;
+ }
+
len = VARSIZE(vlena) - VARHDRSZ;
result = (char *) palloc(len + 1);
memmove(result, VARDATA(vlena), len);
***************
*** 192,197 ****
--- 200,208 ----
#ifdef CYR_RECODE
convertstr(result, len, 1);
#endif
+
+ if (islong)
+ pfree(vlena);
return result;
}
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 16:46:40 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA60098
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 16:46:32 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
QAA08726;
Sun, 12 Dec 1999 16:44:28 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912122144.QAA08726@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <26627.945021733@sss.pgh.pa.us> from Tom Lane at "Dec 12,
1999 01:02:13 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 12 Dec 1999 16:44:27 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
2. While reading a tuple, fastgetattr() automatically fetches the
out-of-line value if it sees the requested attribute is out-of-line.
(I'd be inclined to mark out-of-line attributes in the same way that
NULL attributes are marked: one bit in the tuple header shows if any
out-of-line attrs are present, and if so there is a bitmap to show
which ones are out-of-line. We could also use Bruce's idea of
commandeering the high-order bit of the varlena length word, but
I think that's a much uglier and more fragile solution.)
Not sure if fastgetattr() is the place for this. I thought the varlena
access routines themselves would work. It is nice and clean to do it in
fastgetattr, but how do you know to pfree it? I suppose if you kept the
high bit set, you could try cleaning up, but where?
My idea was to expand the out-of-line varlena, and unset the 'long' bit.
long-bit|length|reloid|tupleoid|attno|longlen
Unexpanded would be:
1|20|10032|23123|5|20000
unexpanded is:
0|20000|data
I think that these two changes would handle 99% of the problem.
VACUUM would still need work, but most normal access to tuples would
just work automatically, because all access to varlena fields must go
through fastgetattr().An as-yet-unsolved issue is how to avoid memory leaks of out-of-line
values after they have been read in by fastgetattr(). However, I think
that's going to be a nasty problem with Jan's approach as well. The
best answer might be to solve this in combination with addressing the
problem of leakage of temporary results during expression evaluation,
say by adding some kind of reference-count convention to all varlena
values.
That's why I was going to do the expansion only in the varlena access
routines. Patch already posted.
BTW, I don't see any really good reason to keep the out-of-line values
in a separate physical file (relation) as Jan originally proposed.
Why not keep them in the same file, but mark them as being something
different than a normal tuple? Sequential scans would have to know to
skip over them (big deal), and VACUUM would have to handle them
properly, but I think VACUUM is going to have to have special code to
support this feature no matter what. If we do make them a new primitive
kind-of-a-tuple on disk, we could sidestep the problem of marking all
the out-of-line values associated with a tuple when the tuple is
outdated by a transaction. The out-of-line values wouldn't have
transaction IDs in them at all; they'd just be labeled with the CTID
and/or OID of the primary tuple they belong to. VACUUM would consult
that tuple to determine whether to keep or discard an out-of-line value.
I disagree. By moving to another table, we don't have non-standard
tuples in the main table. We can create normal tuples in the long*
table, of identical format, and access them just like normal tuples.
Having special long tuples in the main table that don't follow the
format of the other tuples it a certain mess. The long* tables also
move the long data out of the main table so it is not accessed in
sequential scans. Why keep them in the main table?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 17:02:40 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id RAA64129
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:02:13 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xGwt-0003kGC; Sun, 12 Dec 99 22:54 MET
Message-Id: <m11xGwt-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sun, 12 Dec 1999 22:54:35 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912122144.QAA08726@candle.pha.pa.us> from "Bruce Momjian" at
Dec 12, 99 04:44:27 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
I disagree. By moving to another table, we don't have non-standard
tuples in the main table. We can create normal tuples in the long*
table, of identical format, and access them just like normal tuples.
Having special long tuples in the main table that don't follow the
format of the other tuples it a certain mess. The long* tables also
move the long data out of the main table so it is not accessed in
sequential scans. Why keep them in the main table?
More ugly and complicated (especially for VACUUM) seems to
me, the we need an index on these nonstandard tuples, that
doesn't see the standard ones, while the regular indices
ignore the new long tuples. At least if we want to delay
reading of long values until they're explicitly requested.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 17:05:40 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA64495
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:05:20 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
RAA09403;
Sun, 12 Dec 1999 17:04:54 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912122204.RAA09403@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11xGwt-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 12, 1999 10:54:35 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 17:04:54 -0500 (EST)
CC: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
I disagree. By moving to another table, we don't have non-standard
tuples in the main table. We can create normal tuples in the long*
table, of identical format, and access them just like normal tuples.
Having special long tuples in the main table that don't follow the
format of the other tuples it a certain mess. The long* tables also
move the long data out of the main table so it is not accessed in
sequential scans. Why keep them in the main table?More ugly and complicated (especially for VACUUM) seems to
me, the we need an index on these nonstandard tuples, that
doesn't see the standard ones, while the regular indices
ignore the new long tuples. At least if we want to delay
reading of long values until they're explicitly requested.
Yes, good point. No reason to create non-standard tuples if you can
avoid it. And a separate table has performance advantages, especially
because the long tuples are by definition long and take up lots of
blocks.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 17:21:40 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA67336
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:20:44 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id OAA13068
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 14:20:34 -0800 (PST)
Message-Id: <3.0.1.32.19991212141847.010487e0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Sun, 12 Dec 1999 14:18:47 -0800
To: pgsql-hackers@postgreSQL.org
From: Don Baccus <dhogaza@pacifier.com>
Subject: libpq questions...when threads collide
In-Reply-To: <199912122144.QAA08726@candle.pha.pa.us>
References: <26627.945021733@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
I'm working on bullet-proofing AOLserver's postgres driver.
I've fixed a bunch of weaknesses, but am stumped by the
following...
AOLserver's a multithreaded server, and libpq's database
connection routines aren't threadsafe. It turns out the
environment in which the driver lives doesn't allow me
to ensure that only one thread executes a PQsetdb at a
time, at least without resorting to the specific operating
system's mutexes and cond primitives. The server provides
a nice portable interface for such things but they're
not available to database drivers because in general the
server's not interested in having database drivers do such
things.
That's not a problem for this group, but I'm curious. People
have been using this driver for years, and some use it
heavily (Lamar Owen, for one). Despite the thread unsafeness
of PQsetdb et al, I've never seen a failure in this environment
and I've never heard of folks experiencing such a failure.
So my question's simple - what exactly makes PQsetdb et al
thread unsafe? I'm asking in order to attempt to get a handle
on just how vulnerable the routines are when two threads attempt
to open a database connection simultaneously.
The other question's simple, too - are the implications predictable,
i.e. will (for instance) one of the attemps simply crash or
fail when two or more threads attempt to make a connection? Or
am I looking at something more evil, like silent building of a
connection messed up in some subtle way?
I suspect the answer to the last question is that the result of
doing this is unpredictable, but thought I'd ask.
AOLserver supports external drivers called by a proxy with a
separate process provided for each database connection, but
there are unfortunate performance implications with this
approach. It's designed explicitly for dbs with no threadsafe
C API. This includes Sybase, and in my testing the internal
Postgres driver can feed bytes to the server about three times
as fast as the external driver written for Sybase, so you
can see why I'm reluctant to rewrite the Postgres driver simply
because building a connection's not threadsafe. After all,
unless a backend crashes they only happen when the server's
first fired up. And people aren't seeing problems.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Sun Dec 12 17:43:41 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA74366
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:42:53 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA04557;
Sun, 12 Dec 1999 17:41:50 -0500 (EST)
To: Don Baccus <dhogaza@pacifier.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] libpq questions...when threads collide
In-reply-to: Your message of Sun, 12 Dec 1999 14:18:47 -0800
<3.0.1.32.19991212141847.010487e0@mail.pacifier.com>
Date: Sun, 12 Dec 1999 17:41:50 -0500
Message-ID: <4555.945038510@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Don Baccus <dhogaza@pacifier.com> writes:
Despite the thread unsafeness
of PQsetdb et al, I've never seen a failure in this environment
and I've never heard of folks experiencing such a failure.
The *only* thing that's actually thread-unsafe, AFAIR, is
PQconnectdb's use of a global array for connection parameters.
PQsetdb/setdbLogin are thread-safe; so just use them instead.
At least that was true before the async-connection code got added.
I haven't looked at that to see if it introduces any problems.
regards, tom lane
From bouncefilter Sun Dec 12 17:47:41 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA75005
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:47:15 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id SAA90190;
Sun, 12 Dec 1999 18:46:51 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Sun, 12 Dec 1999 18:46:51 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Vadim Mikheev <vadim@krs.ru>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <199912122059.PAA07970@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.9912121839070.3883-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
Content-Transfer-Encoding: 8BIT
Okay, this whole thread could continue going back and forth for the next 6
months and we may as well wait for WAL :)
It is agreed that Feb 1st is the beta date...it will not include WAL, but
will be numbered v7.0, with v7.1 going BETA as soon as Vadim feels
prepared with the WAL code...
Altho I would personally like to get rid of the major.minor.minor
numbering scheme, and just have it major.minor, the arguments against vs
for outweigh, so we'll stick with what we've always had in that regard...
On Feb 1st, the CVS repository will be branched, like we did on the last
release, so that we can beta/debug 7.0 *without* interfering with
development on 7.1. This has proven to work quite well with v6.5.x, as
far as I'm concerned...since, once we go beta, there are to be no new
features, only bug fixes, this shouldn't affect anyone, eh? :)
On Sun, 12 Dec 1999, Bruce Momjian wrote:
Vadim Mikheev <vadim@krs.ru> writes:
I agreed! I propose to name the next release as 6.6
^^^
or 7.0and the "WAL" release as 7.0 or 6.7, but not 8.0...
^^^
and 7.17.0 and 7.1 seem like the worst choice of names to me. We are not
planning any major new features for the Feb release (except for whatever
part of foreign key support Jan has working by then). There will be
some major new features for the release-after-that: WAL, some kind of
answer for the long-tuple problem, etc. etc. So it'd be very confusing
to users to call this one a "major" version bump, when it will have less
new stuff in it than the "minor" version bumps before and after.I could live with 7.0 and then 8.0, if we were going to switch to
two-part instead of three-part version numbering. But I agree with
Thomas that I'd rather stick to the convention we have been using.
If we are going to be consistent with the way we have named prior
releases, it seems to me that there is no choice: the Feb release
is 6.6, and the one after it will be 7.0 (or maybe even 6.7).I also would rather do it that way because I think the idea is to
wrap up *what we have now* and get it out. If we call the Feb release
7.0, then Thomas will want to cram in date/time type consolidation work
that (AFAIK) he hasn't even started on, and there'll be great temptation
to try to squeeze in other half-baked stuff in order to try to justify
calling this a major version bump. That's completely at odds with what
I thought the proposal of a near-term release was all about.Basically, if people insist that the next release should be called 7.0,
I'd be inclined to forget about a near-term release and go back to
Plan A: keep working on it until we have enough stuff done to justify
calling it 7.0.Let's look at the 7.0 features list:
Foreign Keys - Jan
WAL - Vadim
Function args - Tom
System indexes - Bruce
Date/Time types - Thomas
Optimizer - TomOuter Joins - Thomas?
Long Tuples - ?We have foreign keys and long tuples in Feb 1. Jan says on���long tuples:
I thought about the huge size variable text type a little
more. And I think I could get the following implementation
to work reliable for our upcoming release.The more we explore long tuples, it seems easier than expected.
Chaining tuples was going to be hard. The new way is more efficient, and
easier.I assume Thomas may do the date/time for Feb 1 because it mostly
removing old types, I think.So, we will not have WAL for Feb 1, but people are clammoring for
foreign keys and long tuples. I think 7.0 is good for Feb 1. We can add
WAL in 7.1.-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026************
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Sun Dec 12 17:53:41 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA76016
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:52:56 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA04663;
Sun, 12 Dec 1999 17:50:48 -0500 (EST)
To: The Hermit Hacker <scrappy@hub.org>
cc: Bruce Momjian <pgman@candle.pha.pa.us>, Vadim Mikheev <vadim@krs.ru>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Sun, 12 Dec 1999 18:46:51 -0400 (AST)
<Pine.BSF.4.21.9912121839070.3883-100000@thelab.hub.org>
Date: Sun, 12 Dec 1999 17:50:48 -0500
Message-ID: <4661.945039048@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
The Hermit Hacker <scrappy@hub.org> writes:
It is agreed that Feb 1st is the beta date...it will not include WAL, but
will be numbered v7.0, with v7.1 going BETA as soon as Vadim feels
prepared with the WAL code...
OK, it's decided. Let's quit arguing.
On Feb 1st, the CVS repository will be branched, like we did on the last
release, so that we can beta/debug 7.0 *without* interfering with
development on 7.1. This has proven to work quite well with v6.5.x,
Actually, I thought what worked well was to postpone the branch as long
as possible. Double-patching is no fun...
regards, tom lane
From bouncefilter Sun Dec 12 17:55:42 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA76518
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:55:14 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id OAA20694;
Sun, 12 Dec 1999 14:55:03 -0800 (PST)
Message-Id: <3.0.1.32.19991212145313.0104edb0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Sun, 12 Dec 1999 14:53:13 -0800
To: Tom Lane <tgl@sss.pgh.pa.us>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] libpq questions...when threads collide
Cc: pgsql-hackers@postgreSQL.org
In-Reply-To: <4555.945038510@sss.pgh.pa.us>
References: <Your message of Sun, 12 Dec 1999 14:18:47 -0800
<3.0.1.32.19991212141847.010487e0@mail.pacifier.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 05:41 PM 12/12/99 -0500, Tom Lane wrote:
Don Baccus <dhogaza@pacifier.com> writes:
Despite the thread unsafeness
of PQsetdb et al, I've never seen a failure in this environment
and I've never heard of folks experiencing such a failure.The *only* thing that's actually thread-unsafe, AFAIR, is
PQconnectdb's use of a global array for connection parameters.
PQsetdb/setdbLogin are thread-safe; so just use them instead.
Cool! I am using setdbLogin but the documentation sez they,
too, aren't threadsafe...maybe this should be changed? This
is great news.
At least that was true before the async-connection code got added.
I haven't looked at that to see if it introduces any problems.
For the moment, I'm happy to believe that it hasn't, it makes my
immediate future much simpler if I do so...
Also, the documentation describes two routines, PQoidStatus and
PQoidValue, but the libpq source seem to only define PQoidStatus.
(some user asked for a routine to feed back the oid of an insert,
so I looked into it while simultaneously suggesting he study
"sequence" and its associated "nextval" and "currval" functions
and ponder on why it's really a bad idea to related tables by
storing oids rather than generated keys)
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Sun Dec 12 17:55:41 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA76504
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:55:07 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
RAA09994;
Sun, 12 Dec 1999 17:54:06 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912122254.RAA09994@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <4661.945039048@sss.pgh.pa.us> from Tom Lane at "Dec 12,
1999 05:50:48 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 12 Dec 1999 17:54:06 -0500 (EST)
CC: The Hermit Hacker <scrappy@hub.org>, Vadim Mikheev <vadim@krs.ru>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
The Hermit Hacker <scrappy@hub.org> writes:
It is agreed that Feb 1st is the beta date...it will not include WAL, but
will be numbered v7.0, with v7.1 going BETA as soon as Vadim feels
prepared with the WAL code...OK, it's decided. Let's quit arguing.
On Feb 1st, the CVS repository will be branched, like we did on the last
release, so that we can beta/debug 7.0 *without* interfering with
development on 7.1. This has proven to work quite well with v6.5.x,Actually, I thought what worked well was to postpone the branch as long
as possible. Double-patching is no fun...
Ditto. Look at the 6_5 branch and you will see it was done far into the
6.5 release, not at the 6.5.0 release. I don't want to continue
mentioning this for every release.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 17:59:41 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA77405
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 17:59:15 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA04735;
Sun, 12 Dec 1999 17:58:12 -0500 (EST)
To: Don Baccus <dhogaza@pacifier.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] libpq questions...when threads collide
In-reply-to: Your message of Sun, 12 Dec 1999 14:53:13 -0800
<3.0.1.32.19991212145313.0104edb0@mail.pacifier.com>
Date: Sun, 12 Dec 1999 17:58:12 -0500
Message-ID: <4733.945039492@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Don Baccus <dhogaza@pacifier.com> writes:
Cool! I am using setdbLogin but the documentation sez they,
too, aren't threadsafe...maybe this should be changed?
I guess so. Submit a patch...
Also, the documentation describes two routines, PQoidStatus and
PQoidValue, but the libpq source seem to only define PQoidStatus.
PQoidValue is new in current sources --- you must be looking at
current-snapshot docs, rather than what was released with 6.5.
regards, tom lane
From bouncefilter Sun Dec 12 18:04:41 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA80806
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 18:03:45 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id PAA22603;
Sun, 12 Dec 1999 15:03:35 -0800 (PST)
Message-Id: <3.0.1.32.19991212150119.0104ec00@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Sun, 12 Dec 1999 15:01:19 -0800
To: Tom Lane <tgl@sss.pgh.pa.us>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] libpq questions...when threads collide
Cc: pgsql-hackers@postgreSQL.org
In-Reply-To: <4733.945039492@sss.pgh.pa.us>
References: <Your message of Sun, 12 Dec 1999 14:53:13 -0800
<3.0.1.32.19991212145313.0104edb0@mail.pacifier.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 05:58 PM 12/12/99 -0500, Tom Lane wrote:
PQoidValue is new in current sources --- you must be looking at
current-snapshot docs, rather than what was released with 6.5.
I'm using the docs at www.postgresql.org, which I assumed would
be matched to the current release.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Sun Dec 12 18:12:41 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA82211
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 18:12:24 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id SAA04799;
Sun, 12 Dec 1999 18:11:15 -0500 (EST)
To: Don Baccus <dhogaza@pacifier.com>
cc: pgsql-hackers@postgreSQL.org, Vince Vielhaber <vev@michvhf.com>
Subject: Re: [HACKERS] libpq questions...when threads collide
In-reply-to: Your message of Sun, 12 Dec 1999 15:01:19 -0800
<3.0.1.32.19991212150119.0104ec00@mail.pacifier.com>
Date: Sun, 12 Dec 1999 18:11:15 -0500
Message-ID: <4797.945040275@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Don Baccus <dhogaza@pacifier.com> writes:
PQoidValue is new in current sources --- you must be looking at
current-snapshot docs, rather than what was released with 6.5.
I'm using the docs at www.postgresql.org, which I assumed would
be matched to the current release.
I believe the on-line manual is a nightly snapshot. This is awfully
handy for developers but not so good for ordinary users. What we
should probably do is have both the snapshot and the last release's
docs on the website ... clearly marked ;-)
regards, tom lane
From bouncefilter Sun Dec 12 18:27:41 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id SAA87040
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 18:27:01 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 6884 invoked by uid 1001); 12 Dec 1999 23:27:04 -0000
Message-ID: <XFMail.991212182704.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <4797.945040275@sss.pgh.pa.us>
Date: Sun, 12 Dec 1999 18:27:04 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [HACKERS] libpq questions...when threads collide
Cc: pgsql-hackers@postgreSQL.org, Don Baccus <dhogaza@pacifier.com>
On 12-Dec-99 Tom Lane wrote:
Don Baccus <dhogaza@pacifier.com> writes:
PQoidValue is new in current sources --- you must be looking at
current-snapshot docs, rather than what was released with 6.5.I'm using the docs at www.postgresql.org, which I assumed would
be matched to the current release.I believe the on-line manual is a nightly snapshot. This is awfully
handy for developers but not so good for ordinary users. What we
should probably do is have both the snapshot and the last release's
docs on the website ... clearly marked ;-)
Last I looked the docs for every particular version were included with
the tarball. No matter how clearly you mark anything it still won't be
seen and someone will complain. Either we should keep the current docs
or the release docs online - not both.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null
# include <std/disclaimers.h> Have you seen http://www.pop4.net?
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Sun Dec 12 18:40:41 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA90862
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 18:40:18 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id PAA00115;
Sun, 12 Dec 1999 15:39:02 -0800 (PST)
Message-Id: <3.0.1.32.19991212153712.010165e0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Sun, 12 Dec 1999 15:37:12 -0800
To: Vince Vielhaber <vev@michvhf.com>, Tom Lane <tgl@sss.pgh.pa.us>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] libpq questions...when threads collide
Cc: pgsql-hackers@postgreSQL.org
In-Reply-To: <XFMail.991212182704.vev@michvhf.com>
References: <4797.945040275@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 06:27 PM 12/12/99 -0500, Vince Vielhaber wrote:
Last I looked the docs for every particular version were included with
the tarball. No matter how clearly you mark anything it still won't be
seen and someone will complain.
I'm not complaining, I'm explaining where I found the definition of
PQoidValue. And, yes, I know the docs are in the tarball. As it
happens I have a permanent, high-speed internet connection and find
it convenient to use the docs at postgres.org. If that makes me an
idiot in your book I could care less.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Sun Dec 12 18:46:41 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA91393
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 18:46:04 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id TAA12729;
Sun, 12 Dec 1999 19:41:37 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Sun, 12 Dec 1999 19:41:36 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Vadim Mikheev <vadim@krs.ru>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <199912122254.RAA09994@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.9912121939080.3883-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sun, 12 Dec 1999, Bruce Momjian wrote:
The Hermit Hacker <scrappy@hub.org> writes:
It is agreed that Feb 1st is the beta date...it will not include WAL, but
will be numbered v7.0, with v7.1 going BETA as soon as Vadim feels
prepared with the WAL code...OK, it's decided. Let's quit arguing.
On Feb 1st, the CVS repository will be branched, like we did on the last
release, so that we can beta/debug 7.0 *without* interfering with
development on 7.1. This has proven to work quite well with v6.5.x,Actually, I thought what worked well was to postpone the branch as long
as possible. Double-patching is no fun...Ditto. Look at the 6_5 branch and you will see it was done far into the
6.5 release, not at the 6.5.0 release. I don't want to continue
mentioning this for every release.
The branch should be created on release, not after the release, else the
branch is useless...sorry, think I said something wrong
originally...didn't mean 'on beta', meant 'on release'...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Sun Dec 12 18:47:41 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id SAA91594
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 18:47:39 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 6935 invoked by uid 1001); 12 Dec 1999 23:47:43 -0000
Message-ID: <XFMail.991212184743.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <3.0.1.32.19991212153712.010165e0@mail.pacifier.com>
Date: Sun, 12 Dec 1999 18:47:43 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] libpq questions...when threads collide
Cc: pgsql-hackers@postgreSQL.org, Tom Lane <tgl@sss.pgh.pa.us>
On 12-Dec-99 Don Baccus wrote:
At 06:27 PM 12/12/99 -0500, Vince Vielhaber wrote:
Last I looked the docs for every particular version were included with
the tarball. No matter how clearly you mark anything it still won't be
seen and someone will complain.I'm not complaining, I'm explaining where I found the definition of
PQoidValue. And, yes, I know the docs are in the tarball. As it
happens I have a permanent, high-speed internet connection and find
it convenient to use the docs at postgres.org. If that makes me an
idiot in your book I could care less.
Now where the hell did I call you an idiot? Tom said we should have
current and release docs online clearly marked. Reread my reply. Are
you volunteering to be that special "someone"?
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null
# include <std/disclaimers.h> Have you seen http://www.pop4.net?
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Sun Dec 12 19:26:43 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id TAA97640
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 19:26:24 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xJCs-0003kGC; Mon, 13 Dec 99 01:19 MET
Message-Id: <m11xJCs-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: generic LONG VARLENA
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Mon, 13 Dec 1999 01:19:14 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Well,
first I want to summarize some details, to see if we all
agree so far in the discussion.
- The implementation should be generic for all variable size
types, but can be enabled/disabled per type.
- Large values are moved out of the main tuple until it fit's
a yet to be defined size.
- The moved off values are kept in another relation per
table, using regular tuples where the value is split into
chunks. The new "expansion" relations get another relkind,
so they can be hidden from the user and the system can
easily identify them as such.
- The type specific functions call a central support function
to get the usual VARLENA format, which is taken from a LRU
cache or fetched from the extension relation. They are
responsible for freeing the memory after they're done with
the value. Some macro's should make it fairly simple to
handle.
I don't think it is a good idea to create the expansion
relation all the time. Some keyword in CREATE TABLE, and/or
another ALTER TABLE should do it instead, so the DB admin can
activate the LONG feature on a per table base as needed. In
the first implementation there will be no command to
deactivate it again. Workaround is rename table and select
into as usual.
Also I would like to say that system relations cannot have
expansion relations. At least not until we have enough
experience with this stuff.
Is that now what we initially want to give a try? If so, I
would like to start soon to get the generic part ready ASAP.
Others could then join in and contribute by adding LONG
support for all the VARLENA data types we have.
Would really be a big leap if we can get this finished for a
reasonable number of VARLENA types by February 1.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 20:25:42 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA23644
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 20:25:17 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id KAA02340; Mon, 13 Dec 1999 10:22:12 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Tom Lane" <tgl@sss.pgh.pa.us>, "Bruce Momjian" <pgman@candle.pha.pa.us>,
"Jan Wieck" <wieck@debis.com>
Cc: <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] LONG
Date: Mon, 13 Dec 1999 10:27:10 +0900
Message-ID: <000b01bf4509$2cf8fa80$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <26627.945021733@sss.pgh.pa.us>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
There are so many mails for me to follow about this issue.
For example,what's the conclusion about the following ?
Please teach me.
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Tom LaneBTW, I don't see any really good reason to keep the out-of-line values
in a separate physical file (relation) as Jan originally proposed.
Why not keep them in the same file, but mark them as being something
different than a normal tuple? Sequential scans would have to know to
skip over them (big deal), and VACUUM would have to handle them
properly, but I think VACUUM is going to have to have special code to
support this feature no matter what. If we do make them a new primitive
kind-of-a-tuple on disk, we could sidestep the problem of marking all
the out-of-line values associated with a tuple when the tuple is
outdated by a transaction. The out-of-line values wouldn't have
transaction IDs in them at all; they'd just be labeled with the CTID
What is wong if out-of-line values have their own XIDs ?
If an out-of-line is newer than corresponding row in "primary" table
it's bad but could it occur ?
Because (rowid) of "secondary" table references "primary" table(oid)
on delete cascade,XID_MAXs of them would be synchronized.
Why is CTID needed ? Is it necessary to know "primary" tuples from
out-of-lines values ?
and/or OID of the primary tuple they belong to. VACUUM would consult
that tuple to determine whether to keep or discard an out-of-line value.
What is wrong with separate VACUUM ?
VACUUM never changes OIDs and XIDs(after MVCC).
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Sun Dec 12 20:58:43 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA29247
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 20:57:54 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA12071;
Sun, 12 Dec 1999 20:56:30 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130156.UAA12071@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <Pine.BSF.4.21.9912121939080.3883-100000@thelab.hub.org> from The
Hermit Hacker at "Dec 12, 1999 07:41:36 pm"
To: The Hermit Hacker <scrappy@hub.org>
Date: Sun, 12 Dec 1999 20:56:30 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Vadim Mikheev <vadim@krs.ru>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Ditto. Look at the 6_5 branch and you will see it was done far into the
6.5 release, not at the 6.5.0 release. I don't want to continue
mentioning this for every release.The branch should be created on release, not after the release, else the
branch is useless...sorry, think I said something wrong
originally...didn't mean 'on beta', meant 'on release'...
No.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 21:03:43 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA32338
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 21:02:53 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA07235;
Sun, 12 Dec 1999 21:01:54 -0500 (EST)
To: Vince Vielhaber <vev@michvhf.com>
cc: pgsql-hackers@postgreSQL.org, Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] libpq questions...when threads collide
In-reply-to: Your message of Sun, 12 Dec 1999 18:27:04 -0500 (EST)
<XFMail.991212182704.vev@michvhf.com>
Date: Sun, 12 Dec 1999 21:01:53 -0500
Message-ID: <7233.945050513@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Vince Vielhaber <vev@michvhf.com> writes:
Either we should keep the current docs
or the release docs online - not both.
I disagree, because they serve different audiences. The snapshot docs
are very useful to developers, particularly those of us who don't have
SGML tools installed but still want to know whether the docs we
committed recently look right or not ;-). Meanwhile, current-release
documents are clearly the right thing to provide for ordinary users.
I think a reasonable choice would be to provide current-release docs
as the most readily accessible set of docs on the website, and to put
the snapshot docs somewhere less obvious where only developers would
normally go (preferably, accessed off a page that is clearly about
development sources).
If I can't have both, I'd reluctantly say that the release docs are
the right ones to have on the website.
regards, tom lane
From bouncefilter Sun Dec 12 21:25:43 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA34738
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 21:25:09 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA12723;
Sun, 12 Dec 1999 21:22:11 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130222.VAA12723@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <199912122254.RAA09994@candle.pha.pa.us> from Bruce Momjian at
"Dec 12, 1999 05:54:06 pm"
To: Bruce Momjian <pgman@candle.pha.pa.us>
Date: Sun, 12 Dec 1999 21:22:11 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, The Hermit Hacker <scrappy@hub.org>,
Vadim Mikheev <vadim@krs.ru>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
The Hermit Hacker <scrappy@hub.org> writes:
It is agreed that Feb 1st is the beta date...it will not include WAL, but
will be numbered v7.0, with v7.1 going BETA as soon as Vadim feels
prepared with the WAL code...OK, it's decided. Let's quit arguing.
On Feb 1st, the CVS repository will be branched, like we did on the last
release, so that we can beta/debug 7.0 *without* interfering with
development on 7.1. This has proven to work quite well with v6.5.x,Actually, I thought what worked well was to postpone the branch as long
as possible. Double-patching is no fun...Ditto. Look at the 6_5 branch and you will see it was done far into the
6.5 release, not at the 6.5.0 release. I don't want to continue
mentioning this for every release.
6_5 branch was after 6.5.1 release.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 21:24:43 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA34660
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 21:24:17 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA07295;
Sun, 12 Dec 1999 21:23:42 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Subject: Re: [HACKERS] generic LONG VARLENA
In-reply-to: Your message of Mon, 13 Dec 1999 01:19:14 +0100 (MET)
<m11xJCs-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Sun, 12 Dec 1999 21:23:42 -0500
Message-ID: <7293.945051822@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
first I want to summarize some details, to see if we all
agree so far in the discussion.
I snipped everything I agreed with ;-)
- The implementation should be generic for all variable size
types, but can be enabled/disabled per type.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Per-type control doesn't strike me as interesting or useful. If there
needs to be a control at all, which I doubt, per-table would be the
way to go. But how many users will really say, "Oh yes, I *want* the
thing to fail if my tuple's too big!"? I say: make it automatically
apply whenever needed, don't force users to think about it.
- The type specific functions call a central support function
to get the usual VARLENA format, which is taken from a LRU
cache or fetched from the extension relation. They are
responsible for freeing the memory after they're done with
the value.
If we are going to do this, we ought also think about solving the
generic memory-leakage problem at the same time. No point in having
to revisit all the same code later to deal with that issue.
I don't think it is a good idea to create the expansion
relation all the time. Some keyword in CREATE TABLE, and/or
another ALTER TABLE should do it instead, so the DB admin can
activate the LONG feature on a per table base as needed.
I don't believe it. See above: people will complain that it's a bug
that the system doesn't handle their long data values. Saying "oh, you
have to turn it on" will not appease them. My objection is really the
same as for the specialized LONG datatype: I do *not* want people to
have to put nonstandard junk into their database schema declarations
in order to activate this feature. I think it should Just Work and
stay out of users' faces.
Creating the expansion relation isn't that big a deal, but if you
don't want to do it always, why not do it on first use?
Also I would like to say that system relations cannot have
expansion relations. At least not until we have enough
experience with this stuff.
I'd really, really, really like to have this work for rules, though.
Why shouldn't we allow it for system relations? Most of the critical
ones have fixed-width tuples anyway, so it won't matter for them.
BTW, it strikes me we should drop the "lztext" special datatype, and
instead have compression automatically applied to any varlena that
we are contemplating putting out-of-line. (If we're really lucky,
that saves us having to put the value out-of-line!)
Is that now what we initially want to give a try? If so, I
would like to start soon to get the generic part ready ASAP.
Others could then join in and contribute by adding LONG
support for all the VARLENA data types we have.
Yes, if we don't do it inside fastgetattr then there's a lot of code
that will have to change.
Would really be a big leap if we can get this finished for a
reasonable number of VARLENA types by February 1.
The more I think about this the more I think that it's a bad, bad idea
to try to have it ready by Feb 1. There's not really enough time to
get it right and test it. I don't want to be putting out an unstable
release, and that's what I'm afraid we'll have if we try to rush in
such a major change as this. Particularly when we have nontrivial
amounts of unfinished business elsewhere that we shouldn't neglect.
(Jan, do you really think you can make this happen *and* bring foreign
keys to a finished status before February? If you are going to leave
stuff undone in foreign keys, I think you are making the wrong choice.)
Furthermore, we can save ourselves some time if we tackle this change
in combination with the fmgr revision and the memory-leak-elimination
issue. We will be touching all the same per-data-type code for each
of these issues, so why not touch it once instead of several times?
In short, I like this design but I think we should plan it for 7.1.
regards, tom lane
From bouncefilter Sun Dec 12 21:56:43 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA40405
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 21:56:15 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA13410;
Sun, 12 Dec 1999 21:38:16 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130238.VAA13410@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11xFsS-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 12, 1999 09:45:56 pm"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 21:38:15 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
The solution I see is to give any out of line datum another
Oid, that is part of it's header and stamped into the
reference data. That way, the long attribute lookup can use
SnapshotAny using this Oid, there can only be one that
exists, so SnapshotAny is safe here and forces that only the
visibility of the master tuple in the main table counts at
all.
This is a great idea. Get rid of my use of the attribute number. Make
the varlena long value be:
long-bit|length|longrelid|longoid|longlen
No need for attno in there anymore.
Having a separate oid for the long value is great. You can then have
multiple versions of the long attribute in the long table and can
control when updating a tuple.
I liked Hiroshi's idea of allowing long values in an index by just
pointing to the long table. Seems that would work too. varlena access
routines make that possible.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 21:46:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA39590
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 21:46:29 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA07401;
Sun, 12 Dec 1999 21:44:20 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: The Hermit Hacker <scrappy@hub.org>, Vadim Mikheev <vadim@krs.ru>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-reply-to: Your message of Sun, 12 Dec 1999 20:56:30 -0500 (EST)
<199912130156.UAA12071@candle.pha.pa.us>
Date: Sun, 12 Dec 1999 21:44:20 -0500
Message-ID: <7399.945053060@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Ditto. Look at the 6_5 branch and you will see it was done far into the
6.5 release, not at the 6.5.0 release. I don't want to continue
mentioning this for every release.The branch should be created on release, not after the release, else the
branch is useless...sorry, think I said something wrong
originally...didn't mean 'on beta', meant 'on release'...
No.
Bruce is right: we should delay making a branch for REL7_0 patches
until people are ready to start committing new features for 7.1.
I'm guessing that would be a month or two after formal release of 7.0.
We did that after the 6.5 release (IIRC, we didn't make the branch
until around the time of 6.5.2) and I thought it worked just great;
saved a lot of double-patching.
regards, tom lane
From bouncefilter Sun Dec 12 22:02:45 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id WAA43612
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:01:46 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xLdD-0003kGC; Mon, 13 Dec 99 03:54 MET
Message-Id: <m11xLdD-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] generic LONG VARLENA
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Mon, 13 Dec 1999 03:54:35 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <7293.945051822@sss.pgh.pa.us> from "Tom Lane" at Dec 12,
99 09:23:42 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
Per-type control doesn't strike me as interesting or useful. If there
needs to be a control at all, which I doubt, per-table would be the
Isn't intended to be a runtime configuration. Just a
temporary feature to restrict the attributes that can be
moved off to those types, where WE know that the adt
functions are prepared for them. If we finally have all
builtin types finished for LONG handling, it will be removed,
making user defined types LONGable too.
I don't think it is a good idea to create the expansion
relation all the time. Some keyword in CREATE TABLE, and/or
another ALTER TABLE should do it instead, so the DB admin can
activate the LONG feature on a per table base as needed.I don't believe it. See above: people will complain that it's a bug
that the system doesn't handle their long data values. Saying "oh, you
have to turn it on" will not appease them. My objection is really the
same as for the specialized LONG datatype: I do *not* want people to
have to put nonstandard junk into their database schema declarations
in order to activate this feature. I think it should Just Work and
stay out of users' faces.Creating the expansion relation isn't that big a deal, but if you
don't want to do it always, why not do it on first use?
So you want to do a heap_create_with_catalog() plus
index_create()'s from inside the heap_insert() or
heap_update(). Cannot be done from anywhere else, because
that's the point where we recognize the need. I don't think
that's a good idea. What would happen if
Xact 1 needs expansion relation and creates it.
Xact 2 needs expansion relation too and uses that one
Xact 1 aborts
Xact 2 commits
Better to put out an explanative error message if tuple too
big and no expansion relation exists, than dealing with
trouble when autocreating it. If it later turns out that it
can safely work as an automated process, we can do it in a
subsequent release.
Also I would like to say that system relations cannot have
expansion relations. At least not until we have enough
experience with this stuff.I'd really, really, really like to have this work for rules, though.
Why shouldn't we allow it for system relations? Most of the critical
ones have fixed-width tuples anyway, so it won't matter for them.
Me too, and for function source text again.
But this time, you include the syscache into the entire
approach too.
BTW, it strikes me we should drop the "lztext" special datatype, and
instead have compression automatically applied to any varlena that
we are contemplating putting out-of-line. (If we're really lucky,
that saves us having to put the value out-of-line!)
Nice idea, and should be technically easy since the
compressor itself is separated from the lztext type. OTOH the
user then will have no choice to prevent compression tries
for performance reasons.
So this feature again is something that IMHO should go into a
configurable option.
Is that now what we initially want to give a try? If so, I
would like to start soon to get the generic part ready ASAP.
Others could then join in and contribute by adding LONG
support for all the VARLENA data types we have.Yes, if we don't do it inside fastgetattr then there's a lot of code
that will have to change.
That's why I'd like a small number of types involved at
first.
And there we're back on the "release what we have now"
discussion again. Some like to get new functionality out in
a couple of smaller steps, than doing the big all-in-one
roll. Some not. Seems we can never get a consensus on that
:-(
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 21:56:44 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA40384
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 21:56:00 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA13602;
Sun, 12 Dec 1999 21:54:41 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130254.VAA13602@candle.pha.pa.us>
Subject: Re: [HACKERS] generic LONG VARLENA
In-Reply-To: <7293.945051822@sss.pgh.pa.us> from Tom Lane at "Dec 12,
1999 09:23:42 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 12 Dec 1999 21:54:41 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
wieck@debis.com (Jan Wieck) writes:
first I want to summarize some details, to see if we all
agree so far in the discussion.I snipped everything I agreed with ;-)
- The implementation should be generic for all variable size
types, but can be enabled/disabled per type.^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Per-type control doesn't strike me as interesting or useful. If there
needs to be a control at all, which I doubt, per-table would be the
way to go. But how many users will really say, "Oh yes, I *want* the
thing to fail if my tuple's too big!"? I say: make it automatically
apply whenever needed, don't force users to think about it.
Agreed. Who wouldn't want it.
- The type specific functions call a central support function
to get the usual VARLENA format, which is taken from a LRU
cache or fetched from the extension relation. They are
responsible for freeing the memory after they're done with
the value.If we are going to do this, we ought also think about solving the
generic memory-leakage problem at the same time. No point in having
to revisit all the same code later to deal with that issue.
I have a good fix for this. My patch suggested the varlena routine
pfree the pointer returned from expand_long(). No need for that. With
an LRU cache, we can have the cache itself free the old values. This
would be a nice optimization. Just add the lines below:
+
+ if (VARISLONG(vlena)) /* checks long bit */
+ vlena = expand_long(vlena); /* returns palloc long */
+
There aren't any cases where the varlena access routines access more
than two varlena values at the same time. If the expansion cache is at
least two values, you can just expand it and return memory. When that
cache entry is expired, the memory is freed. Wow, this makes the
varlena changes very compact. All the action is in expand_long().
Basically, don't have the access routines free the memory, have the old
cache entries be pfreed.
I don't think it is a good idea to create the expansion
relation all the time. Some keyword in CREATE TABLE, and/or
another ALTER TABLE should do it instead, so the DB admin can
activate the LONG feature on a per table base as needed.I don't believe it. See above: people will complain that it's a bug
that the system doesn't handle their long data values. Saying "oh, you
have to turn it on" will not appease them. My objection is really the
same as for the specialized LONG datatype: I do *not* want people to
have to put nonstandard junk into their database schema declarations
in order to activate this feature. I think it should Just Work and
stay out of users' faces.
Creating the expansion relation isn't that big a deal, but if you
don't want to do it always, why not do it on first use?
Yes, why not just create it the first time it is needed. Seems pretty
small performance-wise.
Also I would like to say that system relations cannot have
expansion relations. At least not until we have enough
experience with this stuff.I'd really, really, really like to have this work for rules, though.
Why shouldn't we allow it for system relations? Most of the critical
ones have fixed-width tuples anyway, so it won't matter for them.
Oh, that's a good point. Seems that is a big reason for expansion of
types.
BTW, it strikes me we should drop the "lztext" special datatype, and
instead have compression automatically applied to any varlena that
we are contemplating putting out-of-line. (If we're really lucky,
that saves us having to put the value out-of-line!)
Ooh, very smart. You would need another bit to say whether the varlena
is compressed or now. If you take it from 4-byte header, we are down to
a 1 GB length limit. You could do all the compression/decompression in
the two expansion functions, though compressing and then not using the
long_ table would be a little tricky to code, but do-able. You would
compress, then if still too large, move to long table.
Is that now what we initially want to give a try? If so, I
would like to start soon to get the generic part ready ASAP.
Others could then join in and contribute by adding LONG
support for all the VARLENA data types we have.Yes, if we don't do it inside fastgetattr then there's a lot of code
that will have to change.
See above. It looks like only a few lines per function now. If we do
it in fastgetattr, is there less code to change? How do we pfree()?
Would really be a big leap if we can get this finished for a
reasonable number of VARLENA types by February 1.The more I think about this the more I think that it's a bad, bad idea
to try to have it ready by Feb 1. There's not really enough time to
get it right and test it. I don't want to be putting out an unstable
release, and that's what I'm afraid we'll have if we try to rush in
such a major change as this. Particularly when we have nontrivial
amounts of unfinished business elsewhere that we shouldn't neglect.
(Jan, do you really think you can make this happen *and* bring foreign
keys to a finished status before February? If you are going to leave
stuff undone in foreign keys, I think you are making the wrong choice.)Furthermore, we can save ourselves some time if we tackle this change
in combination with the fmgr revision and the memory-leak-elimination
issue. We will be touching all the same per-data-type code for each
of these issues, so why not touch it once instead of several times?In short, I like this design but I think we should plan it for 7.1.
Not sure on this one. Jan will have to comment.
I am excited about the long data type. This is _the_ way to do long
data types. Have any of the commercial databases figured out this way
to do it. I can't imagine a better system.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 22:02:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA43699
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:02:35 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA07477;
Sun, 12 Dec 1999 22:00:16 -0500 (EST)
To: "Hiroshi Inoue" <Inoue@tpf.co.jp>
cc: "Bruce Momjian" <pgman@candle.pha.pa.us>, "Jan Wieck" <wieck@debis.com>,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG
In-reply-to: Your message of Mon, 13 Dec 1999 10:27:10 +0900
<000b01bf4509$2cf8fa80$2801007e@cadzone.tpf.co.jp>
Date: Sun, 12 Dec 1999 22:00:16 -0500
Message-ID: <7475.945054016@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
There are so many mails for me to follow about this issue.
For example,what's the conclusion about the following ?
I don't think it's concluded yet...
Why is CTID needed ? Is it necessary to know "primary" tuples from
out-of-lines values ?
It seems to me that the primary tuple should store CTIDs of the
out-of-line segment(s) it's using. That way, we need no index at
all on the expansion relation, which would clearly be a win.
My thought was that if the expansion tuples stored CTIDs of their
primary tuples, then it would be practical to have VACUUM consult
the primary tuples' xact status while vacuuming the expansion.
That way, we'd have no need to update expansion tuples when changing
xact status of primary tuples. But I think Jan has something else
in mind for that.
It would be a little tricky to write out a tuple plus its expansion
tuples and have them all know each others' CTIDs; the CTIDs would
have to be assigned before anything got written. And VACUUM would
need a little extra logic to update these things. But those are
very localized and IMHO solvable problems, and I think the performance
advantages would be significant...
What is wrong with separate VACUUM ?
VACUUM never changes OIDs and XIDs(after MVCC).
I believe VACUUM does assign its own XID to tuples that it moves,
so that a crash during VACUUM doesn't corrupt the table by leaving
multiple apparently-valid copies of a tuple. We'd have to figure out
how to accomplish the same result for expansion tuples.
regards, tom lane
From bouncefilter Sun Dec 12 22:10:44 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id WAA44782
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:09:51 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xLkJ-0003kGC; Mon, 13 Dec 99 04:01 MET
Message-Id: <m11xLkJ-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Mon, 13 Dec 1999 04:01:55 +0100 (MET)
Cc: wieck@debis.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912130238.VAA13410@candle.pha.pa.us> from "Bruce Momjian" at
Dec 12, 99 09:38:15 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
The solution I see is to give any out of line datum another
Oid, that is part of it's header and stamped into the
reference data. That way, the long attribute lookup can use
SnapshotAny using this Oid, there can only be one that
exists, so SnapshotAny is safe here and forces that only the
visibility of the master tuple in the main table counts at
all.This is a great idea. Get rid of my use of the attribute number. Make
the varlena long value be:long-bit|length|longrelid|longoid|longlen
No need for attno in there anymore.
I still need it to explicitly remove one long value on
update, while the other one is untouched. Otherwise I would
have to drop all long values for the row together and
reinsert all new ones.
Having a separate oid for the long value is great. You can then have
multiple versions of the long attribute in the long table and can
control when updating a tuple.I liked Hiroshi's idea of allowing long values in an index by just
pointing to the long table. Seems that would work too. varlena access
routines make that possible.
Maybe possible, but not that good IMHO. Would cause another
index scan from inside index scan to get at the value. An we
all agree that indexing huge values isn't that a good thing
at all.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 22:19:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA46303
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:18:56 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA07567;
Sun, 12 Dec 1999 22:17:52 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] generic LONG VARLENA
In-reply-to: Your message of Sun, 12 Dec 1999 21:54:41 -0500 (EST)
<199912130254.VAA13602@candle.pha.pa.us>
Date: Sun, 12 Dec 1999 22:17:51 -0500
Message-ID: <7565.945055071@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
If we are going to do this, we ought also think about solving the
generic memory-leakage problem at the same time. No point in having
to revisit all the same code later to deal with that issue.
I have a good fix for this. My patch suggested the varlena routine
pfree the pointer returned from expand_long(). No need for that. With
an LRU cache, we can have the cache itself free the old values.
Oooh, that's a thought. Sort of like applying TupleTableSlot to
individual datum values.
There aren't any cases where the varlena access routines access more
than two varlena values at the same time.
Huh? The standard operators on varlena types access at least three (two
inputs and a result), and multi-argument functions could access more.
Also think about functions written in PLs: they could invoke a large
amount of computation, and would still expect to be able to access their
original input arguments.
I'd feel more comfortable with explicit reference counting. Perhaps
we could make an exception for function return values: the cache
guarantees to hold onto a function return value for a little while
even though no one is holding a refcount on it at the instant it's
returned. Functions (including PL functions) that want to access
varlena values across any significant amount of computation would
have to bump the refcount on those values somehow.
I am excited about the long data type. This is _the_ way to do long
data types. Have any of the commercial databases figured out this way
to do it. I can't imagine a better system.
I think we are working on some really cool ideas here. But I *don't*
think we have a solid enough hold on all the details that we can expect
to implement it and ship it out one-two-three. Thus my feeling that
this is for 7.1 not 7.0...
regards, tom lane
From bouncefilter Sun Dec 12 22:25:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA47094
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:24:52 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA07600;
Sun, 12 Dec 1999 22:23:42 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgman@candle.pha.pa.us (Bruce Momjian), pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG
In-reply-to: Your message of Mon, 13 Dec 1999 04:01:55 +0100 (MET)
<m11xLkJ-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Sun, 12 Dec 1999 22:23:42 -0500
Message-ID: <7598.945055422@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
I liked Hiroshi's idea of allowing long values in an index by just
pointing to the long table. Seems that would work too. varlena access
routines make that possible.
Maybe possible, but not that good IMHO. Would cause another
index scan from inside index scan to get at the value. An we
all agree that indexing huge values isn't that a good thing
at all.
Well, no, you shouldn't make indexes on fields that are usually big.
But it'd be awfully nice if the system could cope with indexing fields
that just had a long value once in a while. Right now, our answer is
to refuse to let you insert a long value into an indexed field; I don't
think that's very satisfactory.
What do you think of my idea of not using any index on the expansion
table at all, but instead having the primary tuple reference the
expansion tuples via their CTIDs? More work at VACUUM time, for sure,
but a lot less work elsewhere.
regards, tom lane
From bouncefilter Sun Dec 12 22:27:44 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA47445
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:27:15 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA14266;
Sun, 12 Dec 1999 22:25:54 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130325.WAA14266@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <7475.945054016@sss.pgh.pa.us> from Tom Lane at "Dec 12,
1999 10:00:16 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 12 Dec 1999 22:25:54 -0500 (EST)
CC: Hiroshi Inoue <Inoue@tpf.co.jp>, Jan Wieck <wieck@debis.com>,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
There are so many mails for me to follow about this issue.
For example,what's the conclusion about the following ?I don't think it's concluded yet...
Why is CTID needed ? Is it necessary to know "primary" tuples from
out-of-lines values ?It seems to me that the primary tuple should store CTIDs of the
out-of-line segment(s) it's using. That way, we need no index at
all on the expansion relation, which would clearly be a win.
That could be bad. Vacuum moving expired entries in long_ tables would
need to update the ctids in the primary relation, which would be a mess.
Also, I can see an 16MB relation using 8k of stored ctids. Entries over
16MB would be overflow, causing problems. I think an index and
tradition access will be just fine.
My thought was that if the expansion tuples stored CTIDs of their
primary tuples, then it would be practical to have VACUUM consult
the primary tuples' xact status while vacuuming the expansion.
That way, we'd have no need to update expansion tuples when changing
xact status of primary tuples. But I think Jan has something else
in mind for that.
Then you need to have a way to point back to the primary table from the
long_ table. Doesn't seem worth it.
Also, I am questioning the use of compressed for long tuples. I often
don't want some compression happening behind the scenes.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 22:34:44 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id WAA50992
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:34:18 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xM8h-0003kGC; Mon, 13 Dec 99 04:27 MET
Message-Id: <m11xM8h-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] generic LONG VARLENA
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Mon, 13 Dec 1999 04:27:07 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <7635.945055904@sss.pgh.pa.us> from "Tom Lane" at Dec 12,
99 10:31:44 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
Nice idea, and should be technically easy since the
compressor itself is separated from the lztext type. OTOH the
user then will have no choice to prevent compression tries
for performance reasons.
So this feature again is something that IMHO should go into a
configurable option.Good point. You're right, there should be a per-datatype "don't
bother to try to compress this type" flag. (Is per-datatype the
right granularity?)
Per column!
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 22:32:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA50659
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:32:17 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA07637;
Sun, 12 Dec 1999 22:31:44 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] generic LONG VARLENA
In-reply-to: Your message of Mon, 13 Dec 1999 03:54:35 +0100 (MET)
<m11xLdD-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Sun, 12 Dec 1999 22:31:44 -0500
Message-ID: <7635.945055904@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Tom Lane wrote:
Per-type control doesn't strike me as interesting or useful.
Isn't intended to be a runtime configuration. Just a
temporary feature to restrict the attributes that can be
moved off to those types, where WE know that the adt
functions are prepared for them.
Oh, I see. Yeah, if we wanted to make an interim release where only
some datatypes were ready for long values, that would be a necessary
safety measure. But I'd rather plan on just getting it done in one
release.
BTW, it strikes me we should drop the "lztext" special datatype, and
instead have compression automatically applied to any varlena that
we are contemplating putting out-of-line. (If we're really lucky,
that saves us having to put the value out-of-line!)
Nice idea, and should be technically easy since the
compressor itself is separated from the lztext type. OTOH the
user then will have no choice to prevent compression tries
for performance reasons.
So this feature again is something that IMHO should go into a
configurable option.
Good point. You're right, there should be a per-datatype "don't
bother to try to compress this type" flag. (Is per-datatype the
right granularity?)
regards, tom lane
From bouncefilter Sun Dec 12 22:53:47 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA53028
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 22:52:48 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id MAA02430; Mon, 13 Dec 1999 12:51:10 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Jan Wieck" <wieck@debis.com>
Cc: <tgl@sss.pgh.pa.us>, <pgsql-hackers@postgreSQL.org>,
"Bruce Momjian" <pgman@candle.pha.pa.us>
Subject: RE: [HACKERS] LONG
Date: Mon, 13 Dec 1999 12:56:08 +0900
Message-ID: <005401bf451d$fcc99260$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <m11xLkJ-0003kGC@orion.SAPserv.Hamburg.dsh.de>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Jan WieckHaving a separate oid for the long value is great. You can then have
multiple versions of the long attribute in the long table and can
control when updating a tuple.I liked Hiroshi's idea of allowing long values in an index by just
pointing to the long table. Seems that would work too. varlena access
routines make that possible.Maybe possible, but not that good IMHO. Would cause another
index scan from inside index scan to get at the value. An we
all agree that indexing huge values isn't that a good thing
at all.
What I need is an unqiue index (rowid,rowattno,chunk_seq) on
"secondary" table.
Is it different from your orginal idea ?
I don't need any index on primary table.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Sun Dec 12 23:05:44 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id XAA57097
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 23:05:10 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xMca-0003kGC; Mon, 13 Dec 99 04:58 MET
Message-Id: <m11xMca-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: update_pg_pwd
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Mon, 13 Dec 1999 04:58:00 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
actually the opr_sanity regression test complains about a
proc update_pg_pwd(). It has a return type of Opaque and is
declared as void return type in commands/user.c. It seems to
be nowhere directly called, nor does it appear to be a
trigger function.
I wonder if it is properly defined. Shouldn't it return at
least a valid type to be callable via SQL?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 23:12:45 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id XAA58073
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 23:11:55 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xMj6-0003kGC; Mon, 13 Dec 99 05:04 MET
Message-Id: <m11xMj6-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] generic LONG VARLENA
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Mon, 13 Dec 1999 05:04:44 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <7293.945051822@sss.pgh.pa.us> from "Tom Lane" at Dec 12,
99 09:23:42 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane asked:
(Jan, do you really think you can make this happen *and* bring foreign
keys to a finished status before February? If you are going to leave
stuff undone in foreign keys, I think you are making the wrong choice.)
Except for the file buffering of the trigger event queue,
FOREIGN KEY is completely implemented as I proposed, MATCH
FULL.
Thus I HAVE the time.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Sun Dec 12 23:13:45 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA58209
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 23:12:48 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA15261;
Sun, 12 Dec 1999 23:12:19 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130412.XAA15261@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11xLkJ-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 13, 1999 04:01:55 am"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 23:12:19 -0500 (EST)
CC: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
The solution I see is to give any out of line datum another
Oid, that is part of it's header and stamped into the
reference data. That way, the long attribute lookup can use
SnapshotAny using this Oid, there can only be one that
exists, so SnapshotAny is safe here and forces that only the
visibility of the master tuple in the main table counts at
all.This is a great idea. Get rid of my use of the attribute number. Make
the varlena long value be:long-bit|length|longrelid|longoid|longlen
No need for attno in there anymore.
I still need it to explicitly remove one long value on
update, while the other one is untouched. Otherwise I would
have to drop all long values for the row together and
reinsert all new ones.
I am suggesting the longoid is not the oid of the primary or long*
table, but a unque id we assigned just to number all parts of the long*
tuple. I thought that's what your oid was for.
Having a separate oid for the long value is great. You can then have
multiple versions of the long attribute in the long table and can
control when updating a tuple.I liked Hiroshi's idea of allowing long values in an index by just
pointing to the long table. Seems that would work too. varlena access
routines make that possible.Maybe possible, but not that good IMHO. Would cause another
index scan from inside index scan to get at the value. An we
all agree that indexing huge values isn't that a good thing
at all.
May as well. I can't think of a better solution for indexing when you
have long values. I don't think we want long* versions of indexes.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 23:13:45 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA58387
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 23:13:40 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id NAA02452; Mon, 13 Dec 1999 13:11:52 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Bruce Momjian" <pgman@candle.pha.pa.us>, "Jan Wieck" <wieck@debis.com>,
<pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] LONG
Date: Mon, 13 Dec 1999 13:16:50 +0900
Message-ID: <00c701bf4520$e0ed95c0$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <7475.945054016@sss.pgh.pa.us>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Tom Lane
Sent: Monday, December 13, 1999 12:00 PM
To: Hiroshi Inoue
Cc: Bruce Momjian; Jan Wieck; pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
There are so many mails for me to follow about this issue.
For example,what's the conclusion about the following ?I don't think it's concluded yet...
Why is CTID needed ? Is it necessary to know "primary" tuples from
out-of-lines values ?It seems to me that the primary tuple should store CTIDs of the
out-of-line segment(s) it's using. That way, we need no index at
all on the expansion relation, which would clearly be a win.My thought was that if the expansion tuples stored CTIDs of their
primary tuples, then it would be practical to have VACUUM consult
the primary tuples' xact status while vacuuming the expansion.
That way, we'd have no need to update expansion tuples when changing
xact status of primary tuples. But I think Jan has something else
in mind for that.It would be a little tricky to write out a tuple plus its expansion
tuples and have them all know each others' CTIDs; the CTIDs would
have to be assigned before anything got written. And VACUUM would
need a little extra logic to update these things. But those are
very localized and IMHO solvable problems, and I think the performance
advantages would be significant...
If CTIDs are needed it isn't worth the work,I think.
I don't understand why the reference "secondary" to "primary" is
needed. As far as I see,VACUUM doesn't need the reference.
What is wrong with separate VACUUM ?
VACUUM never changes OIDs and XIDs(after MVCC).I believe VACUUM does assign its own XID to tuples that it moves,
AFAIK,vacuum never changes XIDs because MVCC doesn't allow
it. Vadim changed to preverve XIDs between VACUUM before MVCC.
Vadim used CommandId instead to see whether VACUUM succeeded
or not.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Sun Dec 12 23:34:46 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA64000
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 23:34:03 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA15570;
Sun, 12 Dec 1999 23:33:33 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130433.XAA15570@candle.pha.pa.us>
Subject: Re: [HACKERS] generic LONG VARLENA
In-Reply-To: <7565.945055071@sss.pgh.pa.us> from Tom Lane at "Dec 12,
1999 10:17:51 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 12 Dec 1999 23:33:33 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
If we are going to do this, we ought also think about solving the
generic memory-leakage problem at the same time. No point in having
to revisit all the same code later to deal with that issue.I have a good fix for this. My patch suggested the varlena routine
pfree the pointer returned from expand_long(). No need for that. With
an LRU cache, we can have the cache itself free the old values.Oooh, that's a thought. Sort of like applying TupleTableSlot to
individual datum values.There aren't any cases where the varlena access routines access more
than two varlena values at the same time.Huh? The standard operators on varlena types access at least three (two
inputs and a result), and multi-argument functions could access more.
Also think about functions written in PLs: they could invoke a large
amount of computation, and would still expect to be able to access their
original input arguments.I'd feel more comfortable with explicit reference counting. Perhaps
we could make an exception for function return values: the cache
guarantees to hold onto a function return value for a little while
even though no one is holding a refcount on it at the instant it's
returned. Functions (including PL functions) that want to access
varlena values across any significant amount of computation would
have to bump the refcount on those values somehow.
I just checked the code, and I don't see any places where a varlena is
returned that isn't palloc'ed inside the function, so the cache memory
never makes it out of the routines.
However, I see any reference to VARDATA could be a problem because it
assume the data is there, and not in the long* relations. I could
probably figure out which ones need expanding. They are mostly system
table accesses. The others go through adt or are output to the user.
I am excited about the long data type. This is _the_ way to do long
data types. Have any of the commercial databases figured out this way
to do it. I can't imagine a better system.I think we are working on some really cool ideas here. But I *don't*
think we have a solid enough hold on all the details that we can expect
to implement it and ship it out one-two-three. Thus my feeling that
this is for 7.1 not 7.0...
We have gotten pretty far in two days. This long tuple stuff is not as
difficult as foreign key because I can actually figure out what is
happening with the long types, while foreign key is a complete mystery
to me.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 23:34:45 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA64069
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 23:34:38 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA15581;
Sun, 12 Dec 1999 23:34:11 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130434.XAA15581@candle.pha.pa.us>
Subject: Re: [HACKERS] generic LONG VARLENA
In-Reply-To: <m11xMj6-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 13, 1999 05:04:44 am"
To: Jan Wieck <wieck@debis.com>
Date: Sun, 12 Dec 1999 23:34:11 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Tom Lane asked:
(Jan, do you really think you can make this happen *and* bring foreign
keys to a finished status before February? If you are going to leave
stuff undone in foreign keys, I think you are making the wrong choice.)Except for the file buffering of the trigger event queue,
FOREIGN KEY is completely implemented as I proposed, MATCH
FULL.Thus I HAVE the time.
Well, this is very good news. Jan, aren't you going to bed?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 12 23:58:46 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA68494
for <pgsql-hackers@postgreSQL.org>;
Sun, 12 Dec 1999 23:58:24 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA07954;
Sun, 12 Dec 1999 23:57:49 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Subject: Re: [HACKERS] update_pg_pwd
In-reply-to: Your message of Mon, 13 Dec 1999 04:58:00 +0100 (MET)
<m11xMca-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Sun, 12 Dec 1999 23:57:49 -0500
Message-ID: <7952.945061069@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
actually the opr_sanity regression test complains about a
proc update_pg_pwd(). It has a return type of Opaque and is
declared as void return type in commands/user.c. It seems to
be nowhere directly called, nor does it appear to be a
trigger function.
It is a trigger function for pg_shadow updates, see PATCHES message
from a day or two back.
I wonder if it is properly defined. Shouldn't it return at
least a valid type to be callable via SQL?
opr_sanity is complaining because the declared return type is 0.
I am not very happy about taking out opr_sanity's check on return types;
perhaps I should lobby to have Opaque-valued trigger functions be
declared with an actually valid return-type OID. What do you think?
regards, tom lane
From bouncefilter Mon Dec 13 00:16:46 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA73153
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 00:16:14 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id OAA02504; Mon, 13 Dec 1999 14:14:30 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Bruce Momjian" <pgman@candle.pha.pa.us>
Cc: <tgl@sss.pgh.pa.us>, <pgsql-hackers@postgreSQL.org>,
"Jan Wieck" <wieck@debis.com>
Subject: RE: [HACKERS] LONG
Date: Mon, 13 Dec 1999 14:19:27 +0900
Message-ID: <00e001bf4529$a05405e0$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <199912130412.XAA15261@candle.pha.pa.us>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Bruce MomjianThe solution I see is to give any out of line datum another
Oid, that is part of it's header and stamped into the
reference data. That way, the long attribute lookup can use
SnapshotAny using this Oid, there can only be one that
exists, so SnapshotAny is safe here and forces that only the
visibility of the master tuple in the main table counts at
all.This is a great idea. Get rid of my use of the attribute
number. Make
the varlena long value be:
long-bit|length|longrelid|longoid|longlen
No need for attno in there anymore.
I still need it to explicitly remove one long value on
update, while the other one is untouched. Otherwise I would
have to drop all long values for the row together and
reinsert all new ones.I am suggesting the longoid is not the oid of the primary or long*
table, but a unque id we assigned just to number all parts of the long*
tuple. I thought that's what your oid was for.
Unfortunately I couldn't follow this issue correctly.
Is the format of long value relation different from Jan's original now ?
- At CREATE TABLE, a long value relation named
"_LONG<tablename>" is created for those tables who need it.
And of course dropped and truncated appropriate. The schema
of this table is
rowid Oid, -- oid of our main data row
rowattno int2, -- the attribute number in main data
chunk_seq int4, -- the part number of this data chunk
chunk text -- the content of this data chunk
I thought that there's an unique index (rowid,rowattno,chunk_seq).
Seems we could even update partially(specified chunk_seq only)
without problem.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Mon Dec 13 01:00:46 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA80357
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 01:00:03 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA18941;
Mon, 13 Dec 1999 00:59:21 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130559.AAA18941@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <00e001bf4529$a05405e0$2801007e@cadzone.tpf.co.jp> from Hiroshi
Inoue at "Dec 13, 1999 02:19:27 pm"
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Date: Mon, 13 Dec 1999 00:59:21 -0500 (EST)
CC: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org,
Jan Wieck <wieck@debis.com>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=UNKNOWN-8BIT
Content-Transfer-Encoding: 8bit
I am suggesting the longoid is not the oid of the primary or long*
table, but a unque id we assigned just to number all parts of the long*
tuple. I thought that's what your oid was for.Unfortunately I couldn't follow this issue correctly.
Is the format of long value relation different from Jan's original now ?- At CREATE TABLE, a long value relation named
"_LONG<tablename>" is created for those tables who need it.
And of course dropped and truncated appropriate. The schema
of this table isrowid Oid, -- oid of our main data row
I am suggesting a unique oid just to store this long value. The new oid
gets stored in the primary table, and on every row of the long* table.
rowattno int2, -- the attribute number in main data
Not needed anymore.
chunk_seq int4, -- the part number of this data chunk
chunk text -- the content of this data chunk
Yes.
I thought that there's an unique index (rowid,rowattno,chunk_seq).
Index on longoid only. No need index on longoid and chunk_seq because
you don't need the rows returned in order.
Seems we could even update partially(specified chunk_seq only)
without problem.
That could be done, but seems too rare because the new data would have
to be the same length. Doesn't seem worth���it, though others may
disagree.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 13 01:04:46 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA83257
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 01:03:56 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
BAA19486;
Mon, 13 Dec 1999 01:03:26 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912130603.BAA19486@candle.pha.pa.us>
Subject: Re: [HACKERS] generic LONG VARLENA
In-Reply-To: <199912130433.XAA15570@candle.pha.pa.us> from Bruce Momjian at
"Dec 12, 1999 11:33:33 pm"
To: Bruce Momjian <pgman@candle.pha.pa.us>
Date: Mon, 13 Dec 1999 01:03:26 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
However, I see any reference to VARDATA could be a problem because it
assume the data is there, and not in the long* relations. I could
probably figure out which ones need expanding. They are mostly system
table accesses. The others go through adt or are output to the user.
VARDATA looks tricky. Seems I may need that cache of values. In most
cases, VARDATA values are used within the next few lines of code, just
like system cache tuples. If I need it for longer periods, I have to
palloc it. Good thing most VARDATA values are used for brief periods.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 13 01:35:46 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id BAA88643
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 01:34:50 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xOws-0003kGC; Mon, 13 Dec 99 07:27 MET
Message-Id: <m11xOws-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Mon, 13 Dec 1999 07:27:06 +0100 (MET)
Cc: wieck@debis.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912130412.XAA15261@candle.pha.pa.us> from "Bruce Momjian" at
Dec 12, 99 11:12:19 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
No need for attno in there anymore.
I still need it to explicitly remove one long value on
update, while the other one is untouched. Otherwise I would
have to drop all long values for the row together and
reinsert all new ones.I am suggesting the longoid is not the oid of the primary or long*
table, but a unque id we assigned just to number all parts of the long*
tuple. I thought that's what your oid was for.
It's not even an Oid of any existing tuple, just an
identifier to quickly find all the chunks of one LONG value
by (non-unique) index.
My idea is this now:
The schema of the expansion relation is
value_id Oid
chunk_seq int32
chunk_data text
with a non unique index on value_id.
We change heap_formtuple(), heap_copytuple() etc. not to
allocate the entire thing in one palloc(). Instead the tuple
portion itself is allocated separately and the current memory
context remembered too in the HeapTuple struct (this is
required below).
The long value reference in a tuple is defined as:
vl_len int32; /* high bit set, 32-bit = 18 */
vl_datasize int32; /* real vl_len of long value */
vl_valueid Oid; /* value_id in expansion relation */
vl_relid Oid; /* Oid of "expansion" table */
vl_rowid Oid; /* Oid of the row in "primary" table */
vl_attno int16; /* attribute number in "primary" table */
The tuple given to heap_update() (the most complex one) can
now contain usual VARLENA values of the format
high-bit=0|31-bit-size|data
or if the value is the result of a scan eventually
high-bit=1|31-bit=18|datasize|valueid|relid|rowid|attno
Now there are a couple of different cases.
1. The value found is a plain VARLENA that must be moved
off.
To move it off a new Oid for value_id is obtained, the
value itself stored in the expansion relation and the
attribute in the tuple is replaced by the above structure
with the values 1, 18, original VARSIZE(), value_id,
"expansion" relid, "primary" tuples Oid and attno.
2. The value found is a long value reference that has our
own "expansion" relid and the correct rowid and attno.
This would be the result of an UPDATE without touching
this long value.
Nothing to be done.
3. The value found is a long value reference of another
attribute, row or relation and this attribute is enabled
for move off.
The long value is fetched from the expansion relation it
is living in, and the same as for 1. is done with that
value. There's space for optimization here, because we
might have room to store the value plain. This can happen
if the operation was an INSERT INTO t1 SELECT FROM t2,
where t1 has few small plus one varsize attribute, while
t2 has many, many long varsizes.
4. The value found is a long value reference of another
attribute, row or relation and this attribute is disabled
for move off (either per column or because our relation
does not have an expansion relation at all).
The long value is fetched from the expansion relation it
is living in, and the reference in our tuple is replaced
with this plain VARLENA.
This in place replacement of values in the main tuple is the
reason, why we have to make another allocation for the tuple
data and remember the memory context where made. Due to the
above process, the tuple data can expand, and we then need to
change into that context and reallocate it.
What heap_update() further must do is to examine the OLD
tuple (that it already has grabbed by CTID for header
modification) and delete all long values by their value_id,
that aren't any longer present in the new tuple.
The VARLENA arguments to type specific functions now can also
have both formats. The macro
#define VAR_GETPLAIN(arg) \
(VARLENA_ISLONG(arg) ? expand_long(arg) : (arg))
can be used to get a pointer to an allways plain
representation, and the macro
#define VAR_FREEPLAIN(arg,userptr) \
if (arg != userptr) pfree(userptr);
is to be used to tidy up before returning.
In this scenario, a function like smaller(text,text) would
look like
text *
smaller(text *t1, text *t2)
{
text *plain1 = VAR_GETPLAIN(t1);
text *plain2 = VAR_GETPLAIN(t2);
text *result;
if ( /* whatever to compare plain1 and plain2 */ )
result = t1;
else
result = t2;
VAR_FREEPLAIN(t1,plain1);
VAR_FREEPLAIN(t2,plain2);
return result;
}
The LRU cache used in expand_long() will the again and again
expansion become cheap enough. The benefit would be, that
huge values resulting from table scans will be passed around
in the system (in and out of sorting, grouping etc.) until
they are modified or really stored/output.
And the LONG index stuff should be covered here already (free
lunch)! Index_insert() MUST allways be called after
heap_insert()/heap_update(), because it needs the there
assigned CTID. So at that time, the moved off attributes are
replaced in the tuple data by the references. These will be
stored instead of the values that originally where in the
tuple. Should also work with hash indices, as long as the
hashing functions use VAR_GETPLAIN as well.
If we want to use auto compression too, no problem. We code
this into another bit of the first 32-bit vl_len. The
question if to call expand_long() changes now to "is one of
these set". This way, we can store both, compressed and
uncompressed into both, "primary" tuple or "expansion"
relation. expand_long() will take care for it.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 01:41:46 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id BAA89233
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 01:41:39 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xP42-0003kGC; Mon, 13 Dec 99 07:34 MET
Message-Id: <m11xP42-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] update_pg_pwd
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Mon, 13 Dec 1999 07:34:30 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <7952.945061069@sss.pgh.pa.us> from "Tom Lane" at Dec 12,
99 11:57:49 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
It is a trigger function for pg_shadow updates, see PATCHES message
from a day or two back.I wonder if it is properly defined. Shouldn't it return at
least a valid type to be callable via SQL?opr_sanity is complaining because the declared return type is 0.
I am not very happy about taking out opr_sanity's check on return types;
perhaps I should lobby to have Opaque-valued trigger functions be
declared with an actually valid return-type OID. What do you think?
Trigger functions should allways return at least a NULL
pointer of type HeapTuple, not be declared void. From this I
assume it's an AFTER ROW trigger,
There are already some exceptions coded into the test. These
are PL handlers. Since their real return value is HeapTuple,
you would have to make this defined special type not
selectable in another way. So why do you want?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 01:53:46 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id BAA90703
for <pgsql-hackers@postgresql.org>;
Mon, 13 Dec 1999 01:53:39 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgresql.org
id m11xPFB-0003kGC; Mon, 13 Dec 99 07:46 MET
Message-Id: <m11xPFB-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG
To: wieck@debis.com
Date: Mon, 13 Dec 1999 07:46:01 +0100 (MET)
Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <m11xOws-0003kGC@orion.SAPserv.Hamburg.dsh.de> from "Jan Wieck"
at Dec 13, 99 07:27:06 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
We change heap_formtuple(), heap_copytuple() etc. not to
allocate the entire thing in one palloc(). Instead the tuple
portion itself is allocated separately and the current memory
context remembered too in the HeapTuple struct (this is
required below).
Uhh,
just realized that the usual pfree(htup) will not work
anymore. But shouldn't that already have been something like
heap_freetuple(htup)?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 03:10:47 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA10379
for <pgsql-hackers@postgresql.org>;
Mon, 13 Dec 1999 03:10:37 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11xQYy-000KPU-0K; Mon, 13 Dec 1999 08:10:32 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA24796;
Mon, 13 Dec 1999 09:43:27 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <XXDHV30P>; Mon, 13 Dec 1999 08:07:21 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70BF75@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Thomas Lockhart'" <lockhart@alumni.caltech.edu>, Peter Mount
<petermount@it.maidstone.gov.uk>
Cc: "'Tom Lane'" <tgl@sss.pgh.pa.us>, "'The Hermit Hacker'" <scrappy@hub.org>,
Bruce Momjian <pgman@candle.pha.pa.us>, PostgreSQL-development
<pgsql-hackers@postgresql.org>
Subject: RE: [HACKERS] 6.6 release
Date: Mon, 13 Dec 1999 08:07:20 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
-----Original Message-----
From: Thomas Lockhart [mailto:lockhart@alumni.caltech.edu]
Sent: Friday, December 10, 1999 3:44 PM
To: Peter Mount
Cc: 'Tom Lane'; 'The Hermit Hacker'; Bruce Momjian;
PostgreSQL-development
Subject: Re: [HACKERS] 6.6 release
I'm also confused. So far, I've been working on the premise that the
next release would be 7.0 because of the probably major additions
expected, and that I'm hitting the JDBC driver hard to get as much
of
the 2.0 spec complete as is possible.
OK, now *I'm* confused too! Peter, what in your stuff *requires* a
version renumbering to 7.0? The proposal was that we consolidate
changes in the backend server for a 6.6 release. Why does JDBC need to
wait for a "7.0" in the version number to support the 2.0 spec?
PM: Nothing yet, but it's possible that when I start on Arrays it will
need to work with the latest backend. Also, the version currently in CVS
(originally intended for 6.5.3) is the first not to be backward
compatible with earlier backends, and this one may follow suit.
PM: As for the 2.0 spec, we currently only touch the surface, and there
may be the possibility that I have to add some functionality in the
backend, esp. with PreparedStatement or CallableStatement.
That was what I was thinking also, until yesterday. I think that the
proposal on the table is simply to consolidate/debug what we've
already
done and push it out the door. If you've still got substantial work
left to finish JDBC 2.0, then it'd be better left for the next
release.
Right.
PM: That's exactly what I'm planning. There is a lot of work to get it
up to spec, so if we have a 6.6 in Feb. then I won't have it all done by
then.
I know I have a lot of little loose ends dangling on stuff that's
already "done", and a long list of nitty little bugs to fix, so it
makes sense to me to spend some time in fix-bugs-and-make-a-release
mode before going back into long-haul-feature-development mode.
Now, if other people don't have that feeling, maybe the idea of
a near-term release isn't so hot after all.
Yes I've got that feeling too!! :)
PM: I'm thinking that now (after thinking about it over the weekend that
is)
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
From bouncefilter Mon Dec 13 04:07:48 1999
Received: from marvin.muc.de (marvin.muc.de [193.149.48.2])
by hub.org (8.9.3/8.9.3) with SMTP id EAA20263
for <hackers@postgresql.org>; Mon, 13 Dec 1999 04:07:05 -0500 (EST)
(envelope-from
moderators-muc-lists-postgres-hackers-owner@moderators.muc.de)
Received: (qmail 14769 invoked by alias); 13 Dec 1999 09:06:48 -0000
Delivered-To: moderators-muc-lists-postgres-hackers@moderators.muc.de
Received: (qmail 14764 invoked from network); 13 Dec 1999 09:06:48 -0000
Received: from mailout04.btx.dtag.de (194.25.2.152)
by marvin.muc.de with SMTP; 13 Dec 1999 09:06:48 -0000
Received: from fwd11.btx.dtag.de ([194.25.2.171])
by mailout04.btx.dtag.de with smtp
id 11xRRf-0003KL-00; Mon, 13 Dec 1999 10:07:03 +0100
Received: from news01.btx.dtag.de ([194.25.2.2])
by fwd11.btx.dtag.de with smtp
id <m11xRR7-00040uC>; Mon, 13 Dec 1999 10:06:29 +0100
Received: from news by news01.btx.dtag.de with local (Exim 1.92 #1 (Debian))
id 11xRR7-0002Aa-00; Mon, 13 Dec 1999 10:06:29 +0100
To: muc-lists-postgres-hackers@moderators.muc.de
Path: news.btx.dtag.de!not-for-mail
From: <XOX@xonia.de>
Newsgroups: muc.lists.postgres.hackers
Subject: Warnung!
Date: Mon, 13 Dec 1999 10:02:37 +0100
Organization: T-Online
Lines: 15
Message-ID: <832cul$84l$4@news01.btx.dtag.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news01.btx.dtag.de 945075989 8341 037233622-0001 991213 09:06:29
X-Complaints-To: abuse@t-online.de
X-Sender: 037233622-0001@t-dialin.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Warnung!!
Auf dem Markt befindet sich das Buch "Hacker���s Black Book". Abbildungen,
z.B. unter astalavista.com, erwecken den Anschein, da��� es sich um ein
solides, gebundenes, umfangreicheres Buch, mit fundierten Angaben zum Thema
handelt. Dies ist nicht der Fall. F���r 30.-DM werden 39 Seiten, billigster
Aufmachung, ohne wesentlichen Wert geliefert. Der Autor ist nicht
erreichbar
und reagiert auch nicht auf Aufforderungen sich zu melden. ���berlegt Euch
genau, ob Ihr Euch darauf einlasst.
Bitte die Info weitergegeben!
From bouncefilter Mon Dec 13 04:40:48 1999
Received: from marvin.muc.de (marvin.muc.de [193.149.48.2])
by hub.org (8.9.3/8.9.3) with SMTP id EAA26280
for <hackers@postgresql.org>; Mon, 13 Dec 1999 04:39:49 -0500 (EST)
(envelope-from
moderators-muc-lists-postgres-hackers-owner@moderators.muc.de)
Received: (qmail 19216 invoked by alias); 13 Dec 1999 09:39:33 -0000
Delivered-To: moderators-muc-lists-postgres-hackers@moderators.muc.de
Received: (qmail 19212 invoked from network); 13 Dec 1999 09:39:32 -0000
Received: from mailout02.btx.dtag.de (194.25.2.150)
by marvin.muc.de with SMTP; 13 Dec 1999 09:39:32 -0000
Received: from fwd05.btx.dtag.de ([194.25.2.165])
by mailout02.btx.dtag.de with smtp
id 11xRxL-0001F4-00; Mon, 13 Dec 1999 10:39:47 +0100
Received: from news00.btx.dtag.de ([194.25.2.1])
by fwd05.btx.dtag.de with smtp
id <m11xRx1-0003qjC>; Mon, 13 Dec 1999 10:39:27 +0100
Received: from news by news00.btx.dtag.de with local (Exim 1.92 #1)
for muc-lists-postgres-hackers@moderators.muc.de
id 11xRx1-00062q-00; Mon, 13 Dec 1999 10:39:27 +0100
To: muc-lists-postgres-hackers@moderators.muc.de
Path: news.btx.dtag.de!not-for-mail
From: <XOX@xonia.de>
Newsgroups: muc.lists.postgres.hackers
Subject: Warnung
Date: Mon, 13 Dec 1999 10:38:27 +0100
Organization: T-Online
Lines: 15
Message-ID: <832esf$mm7$1@news00.btx.dtag.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news00.btx.dtag.de 945077967 23239 037233622-0001 991213 09:39:27
X-Complaints-To: abuse@t-online.de
X-Sender: 037233622-0001@t-dialin.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Warnung!!
Auf dem Markt befindet sich das Buch "Hacker���s Black Book". Abbildungen,
z.B. unter astalavista.com, erwecken den Anschein, da��� es sich um ein
solides, gebundenes, umfangreicheres Buch, mit fundierten Angaben zum Thema
handelt. Dies ist nicht der Fall. F���r 30.-DM werden 39 Seiten, billigster
Aufmachung, ohne wesentlichen Wert geliefert. Der Autor ist nicht
erreichbar
und reagiert auch nicht auf Aufforderungen sich zu melden. ���berlegt Euch
genau, ob Ihr Euch darauf einlasst.
Bitte die Info weitergegeben!
From bouncefilter Mon Dec 13 04:39:48 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA26260
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 04:39:45 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id SAA02650; Mon, 13 Dec 1999 18:37:03 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Bruce Momjian" <pgman@candle.pha.pa.us>
Cc: <tgl@sss.pgh.pa.us>, <pgsql-hackers@postgreSQL.org>,
"Jan Wieck" <wieck@debis.com>
Subject: RE: [HACKERS] LONG
Date: Mon, 13 Dec 1999 18:42:01 +0900
Message-ID: <00f301bf454e$4e5ac380$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <199912130559.AAA18941@candle.pha.pa.us>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]I am suggesting the longoid is not the oid of the primary or long*
table, but a unque id we assigned just to number all parts ofthe long*
tuple. I thought that's what your oid was for.
Unfortunately I couldn't follow this issue correctly.
Is the format of long value relation different from Jan's original now ?- At CREATE TABLE, a long value relation named
"_LONG<tablename>" is created for those tables who need it.
And of course dropped and truncated appropriate. The schema
of this table isrowid Oid, -- oid of our main data row
I am suggesting a unique oid just to store this long value. The new oid
gets stored in the primary table, and on every row of the long* table.
Hmm,we could delete long values easily using rowid in case of
heap_delete() .......
Seems we could even update partially(specified chunk_seq only)
without problem.That could be done, but seems too rare because the new data would have
to be the same length. Doesn't seem worth���it, though others may
disagree.
First,I wanted to emphasize that we don't have to update any long value
tuples if we don't update long values. It's a special case of partial
update.
Second,large object has an feature like this. If we would replace large
object by LONG,isn't it needed ?
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Mon Dec 13 05:36:49 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA39602
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 05:36:23 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 458A6B23D; Mon, 13 Dec 1999 12:38:46 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <3854CCB5.2C0DFAE3@tm.ee>
Date: Mon, 13 Dec 1999 12:38:45 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Mount <petermount@it.maidstone.gov.uk>
Cc: "'Thomas Lockhart'" <lockhart@alumni.caltech.edu>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>, "'The Hermit Hacker'" <scrappy@hub.org>,
Bruce Momjian <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References:
<1B3D5E532D18D311861A00600865478C70BF75@exchange1.nt.maidstone.gov.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Peter Mount wrote:
PM: As for the 2.0 spec, we currently only touch the surface, and there
may be the possibility that I have to add some functionality in the
backend, esp. with PreparedStatement or CallableStatement.
That would be rally great if some kind of PreparedStatement support would
appear in backend. Currently all frontends that need it (at least ODBC, JDBC,
possibly others too) must fake it.
Also the protocol (or frontend) should be made smarter about how to insert
Binary data, espacially in the light of the possibility that we will soon get
support for LONG fields thanks to Jan.
I would hate to construct an insert (or update) command by base64 encoding a
large word file and then constructing an humongous string of it by appending
"insert into t(contents) values('" and prepending "');"
I would much prefer the intelligence for it to be in at least libpq if not
in the protocol, so that I could use something like:
s = prepare("insert into t(contents) values($1);
s.bind(open(myfile).read(),'text');
s.execute()
s.bind(open(myotherfile).read(),'text');
s.execute()
s.close()
That would have the advantage of possibly not encoding the whole thing but
even possibly compressing it for transfer in case of slow links.
----------------------
Hannu
From bouncefilter Mon Dec 13 06:09:49 1999
Received: from mail.ngi.de ([195.243.0.227])
by hub.org (8.9.3/8.9.3) with ESMTP id GAA46328
for <pgsql-hackers@postgresql.org>;
Mon, 13 Dec 1999 06:08:50 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: from p3E9C144F.dip0.t-ipconnect.de
(root@p3E9C144F.dip0.t-ipconnect.de [62.156.20.79])
by mail.ngi.de (8.9.3/8.9.3) with ESMTP id LAA17500
for <pgsql-hackers@postgresql.org>;
Mon, 13 Dec 1999 11:58:49 +0100 (CET)
(envelope-from michael@fam-meskes.de)
Received: (from michael@localhost)
by tanja.fam-meskes.de (8.9.3/8.9.3/Debian 8.9.3-6) id LAA04107
for pgsql-hackers@postgresql.org; Mon, 13 Dec 1999 11:57:23 +0100
Date: Mon, 13 Dec 1999 11:57:23 +0100
From: Michael Meskes <meskes@postgresql.org>
To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Subject: Datatype MONEY
Message-ID: <19991213115723.A4101@fam-meskes.de>
Mail-Followup-To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.0i
I somehow remember the MONEY datatype has some problems and might be
removed. Now I didn���t follow this topic closely enough, but now I've
encountered I could use it pretty well. Of course a DECIMAL datatype fits
the bill as good since I do not need the currency symbol in psql's output.
Before I set up my DB I'd like to know which type to prefer.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Mon Dec 13 06:03:49 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA45553
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 06:03:38 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Panter.DoCS.UU.SE (e99re41@Panter.DoCS.UU.SE [130.238.9.114])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA15684;
Mon, 13 Dec 1999 12:03:31 +0100
Received: from localhost (e99re41@localhost) by Panter.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id MAA08575;
Mon, 13 Dec 1999 12:03:29 +0100
X-Authentication-Warning: Panter.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Mon, 13 Dec 1999 12:03:27 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Vince Vielhaber <vev@michvhf.com>, pgsql-hackers@postgreSQL.org,
Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] libpq questions...when threads collide
In-Reply-To: <7233.945050513@sss.pgh.pa.us>
Message-ID: <Pine.GSO.4.02A.9912131200020.8544-100000@Panter.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sun, 12 Dec 1999, Tom Lane wrote:
Vince Vielhaber <vev@michvhf.com> writes:
Either we should keep the current docs
or the release docs online - not both.I disagree, because they serve different audiences. The snapshot docs
are very useful to developers, particularly those of us who don't have
SGML tools installed but still want to know whether the docs we
committed recently look right or not ;-). Meanwhile, current-release
documents are clearly the right thing to provide for ordinary users.
Um, you mean you commit docs before you know whether they even "compile"?
As I see it, if you want to edit the docs, you should test them with your
own SGML tools. With recent sgmltools packages, this is not so hard. At
least the patch applicator hopefully does this.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Mon Dec 13 06:12:49 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA46953
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 06:12:46 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Panter.DoCS.UU.SE (e99re41@Panter.DoCS.UU.SE [130.238.9.114])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA15779;
Mon, 13 Dec 1999 12:12:44 +0100
Received: from localhost (e99re41@localhost) by Panter.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id MAA08579;
Mon, 13 Dec 1999 12:12:43 +0100
X-Authentication-Warning: Panter.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Mon, 13 Dec 1999 12:12:42 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] update_pg_pwd
In-Reply-To: <7952.945061069@sss.pgh.pa.us>
Message-ID: <Pine.GSO.4.02A.9912131208060.8544-100000@Panter.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sun, 12 Dec 1999, Tom Lane wrote:
I wonder if it is properly defined. Shouldn't it return at
least a valid type to be callable via SQL?opr_sanity is complaining because the declared return type is 0.
I am not very happy about taking out opr_sanity's check on return types;
perhaps I should lobby to have Opaque-valued trigger functions be
declared with an actually valid return-type OID. What do you think?
Please don't lose me here. Did I do something wrong? Isn't oid 0 used for
opaque return types? What should an opaque function return in C? I don't
see a good reason from a practical point of view to disallow opaque
functions as triggers, for this very reason, achieving none-database side
effects. At least the create trigger command should say something if it
doesn't like it.
If you have to tailor functionality around the regression tests, this is
not the right direction. After all 0 is a valid oid in this context: it's
opaque.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Mon Dec 13 06:15:49 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA47364
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 06:15:09 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Panter.DoCS.UU.SE (e99re41@Panter.DoCS.UU.SE [130.238.9.114])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA15817;
Mon, 13 Dec 1999 12:15:08 +0100
Received: from localhost (e99re41@localhost) by Panter.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id MAA08583;
Mon, 13 Dec 1999 12:15:06 +0100
X-Authentication-Warning: Panter.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Mon, 13 Dec 1999 12:15:06 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] update_pg_pwd
In-Reply-To: <m11xP42-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.GSO.4.02A.9912131213110.8544-100000@Panter.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 13 Dec 1999, Jan Wieck wrote:
Trigger functions should allways return at least a NULL
pointer of type HeapTuple, not be declared void. From this I
assume it's an AFTER ROW trigger,
Must be after row, because it has to wait until the change is actually
written to pg_shadow. Better would be an AFTER STATEMENT is assume.
There are already some exceptions coded into the test. These
are PL handlers. Since their real return value is HeapTuple,
you would have to make this defined special type not
selectable in another way. So why do you want?
I'm not sure I'm following you, but why would a function that doesn't have
a useful return value return one?
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Mon Dec 13 06:25:50 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA49076;
Mon, 13 Dec 1999 06:25:31 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Panter.DoCS.UU.SE (e99re41@Panter.DoCS.UU.SE [130.238.9.114])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA15897;
Mon, 13 Dec 1999 12:25:30 +0100
Received: from localhost (e99re41@localhost) by Panter.DoCS.UU.SE
(8.6.12/8.6.12) with ESMTP id MAA08591;
Mon, 13 Dec 1999 12:25:29 +0100
X-Authentication-Warning: Panter.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Mon, 13 Dec 1999 12:25:28 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Michael Meskes <meskes@postgreSQL.org>
cc: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Datatype MONEY
In-Reply-To: <19991213115723.A4101@fam-meskes.de>
Message-ID: <Pine.GSO.4.02A.9912131223290.8544-100000@Panter.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by hub.org id GAB49100
Use DECIMAL/NUMERIC. Money is deprecated, slightly broken, and will
eventually disappear. There are some thoughts of re-implementing it on top
of numeric as a collection of formatting functions in essence, so with
numeric (or decimal) you'll be fit for the future.
On Mon, 13 Dec 1999, Michael Meskes wrote:
I somehow remember the MONEY datatype has some problems and might be
removed. Now I didn���t follow this topic closely enough, but now I've
encountered I could use it pretty well. Of course a DECIMAL datatype fits
the bill as good since I do not need the currency symbol in psql's output.Before I set up my DB I'd like to know which type to prefer.
Michael
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Mon Dec 13 06:45:50 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id GAA54092
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 06:45:27 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xTo1-0003kGC; Mon, 13 Dec 99 12:38 MET
Message-Id: <m11xTo1-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] update_pg_pwd
To: peter_e@gmx.net
Date: Mon, 13 Dec 1999 12:38:17 +0100 (MET)
Cc: wieck@debis.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.GSO.4.02A.9912131213110.8544-100000@Panter.DoCS.UU.SE> from
"Peter Eisentraut" at Dec 13, 99 12:15:06 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter Eisentraut wrote:
On Mon, 13 Dec 1999, Jan Wieck wrote:
I'm not sure I'm following you, but why would a function that doesn't have
a useful return value return one?
AFTER ROW triggers indeed have no useful return value,
because it is ignored for now. But IMHO they still should
follow the trigger programming guidelines.
That means, the declaration should read
HeapTuple funcname(void);
Then they should contain
TriggerData *trigdata;
...
trigdata = CurrentTriggerData;
CurrentTriggerData = NULL;
and if they do not want to manipulate the actual action, just
to get informed that it happened, return
trigdata->tg_trigtuple;
I'll make these changes to update_pg_pwd(), now that I know
for sure what it is.
One last point though. The comment says it's using lower case
name now to be callable from SQL, what it isn't because of
it's Opaque return type in pg_proc.
pgsql=> select update_pg_pwd();
ERROR: typeidTypeRelid: Invalid type - oid = 0
Is that a wanted (needed) capability or should I better
change the comment to reflect it's real nature?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 07:27:51 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA61536;
Mon, 13 Dec 1999 07:27:21 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id NAA27102;
Mon, 13 Dec 1999 13:13:56 +0100
Date: Mon, 13 Dec 1999 13:13:55 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Michael Meskes <meskes@postgreSQL.org>
cc: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Datatype MONEY
In-Reply-To: <19991213115723.A4101@fam-meskes.de>
Message-ID: <Pine.LNX.3.96.991213130008.25928A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-2
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by hub.org id HAB61573
On Mon, 13 Dec 1999, Michael Meskes wrote:
I somehow remember the MONEY datatype has some problems and might be
removed. Now I didn���t follow this topic closely enough, but now I've
encountered I could use it pretty well. Of course a DECIMAL datatype fits
the bill as good since I do not need the currency symbol in psql's output.Before I set up my DB I'd like to know which type to prefer.
Michael
I have complete code for numbers formatting (to_char() compatible with
Oracle). It allow you add a currency symbol corresponding with current
locale ... and more features over basic datatypes (float4/8, int4/8).
I send it to the PACHES list next week (probably).
Example:
template1=> select float8_to_char(455.9 , 'L999D99') as price;
price
---------
Kc 455,90
(1 row)
(It is with Czech currency symbol and decimal point (locales))
IMHO is good use for money a float type.
Karel
From bouncefilter Mon Dec 13 07:40:50 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA65797
for <hackers@postgreSQL.org>; Mon, 13 Dec 1999 07:40:13 -0500 (EST)
(envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id NAA27915;
Mon, 13 Dec 1999 13:26:47 +0100
Date: Mon, 13 Dec 1999 13:26:47 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] createdb with alternate location
In-Reply-To: <Pine.LNX.4.20.9912112237160.6044-100000@localhost.localdomain>
Message-ID: <Pine.LNX.3.96.991213131424.25928B-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sat, 11 Dec 1999, Peter Eisentraut wrote:
In my venturing into createdb/dropdb I came to that little artifact that
allows you to create databases at alternate locations using environment
variables as part of the path (CREATE DATABASE elsewhere WITH LOCATION =
'PGDATA2/foo').
And what add to create-database management a TABLESPACE layout? It is
standard in any SQL (Oracle). It is good "investment" to future, because
on TABLESPACE tie storage management ..etc (see old "Raw device" thread
in the hackers list).
Karel
----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------
From bouncefilter Mon Dec 13 07:42:50 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id HAA66128;
Mon, 13 Dec 1999 07:42:01 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xUgo-0003kGC; Mon, 13 Dec 99 13:34 MET
Message-Id: <m11xUgo-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Datatype MONEY
To: zakkr@zf.jcu.cz (Karel Zak - Zakkr)
Date: Mon, 13 Dec 1999 13:34:54 +0100 (MET)
Cc: meskes@postgreSQL.org, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.LNX.3.96.991213130008.25928A-100000@ara.zf.jcu.cz> from
"Karel Zak - Zakkr" at Dec 13, 99 01:13:55 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Karel Zak - Zakkr wrote:
On Mon, 13 Dec 1999, Michael Meskes wrote:
I somehow remember the MONEY datatype has some problems and might be
removed. Now I didn=B4t follow this topic closely enough, but now I've
encountered I could use it pretty well. Of course a DECIMAL datatype fi=ts
the bill as good since I do not need the currency symbol in psql's outp=
ut.
=20
Before I set up my DB I'd like to know which type to prefer.
=20
MichaelI have complete code for numbers formatting (to_char() compatible with
Oracle). It allow you add a currency symbol corresponding with current
locale ... and more features over basic datatypes (float4/8, int4/8).I send it to the PACHES list next week (probably). =20
Example:
template1=3D> select float8_to_char(455.9 , 'L999D99') as price;
price
---------
Kc 455,90
(1 row)(It is with Czech currency symbol and decimal point (locales))
IMHO is good use for money a float type.
In some countries (Germany at least) storage of financial
booking information is not permitted to use floats. And you
aren't allowed to use it for calculation of taxes etc.,
instead you must use some datatype with a fixable number of
digits after the decimal point.
Thus, only our NUMERIC/DECIMAL type or int4/8 and using the
'V' (IIRC) format specifier in to_char() should be used.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 08:05:52 1999
Received: from corvette.mascari.com (dhcp26131045.columbus.rr.com
[24.26.131.45]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA72455;
Mon, 13 Dec 1999 08:05:00 -0500 (EST)
(envelope-from mascarm@mascari.com)
Received: from mascari.com (ferrari.mascari.com [192.168.2.1])
by corvette.mascari.com (8.8.7/8.8.7) with ESMTP id IAA29067;
Mon, 13 Dec 1999 08:00:25 -0500
Message-ID: <3854EEAF.6587A0D1@mascari.com>
Date: Mon, 13 Dec 1999 08:03:43 -0500
From: Mike Mascari <mascarm@mascari.com>
Organization: Mascari Development Inc.
X-Mailer: Mozilla 4.7 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: byron.nikolaidis@home.com, pgsql-hackers@postgresql.org,
pgsql-interfaces@postgresql.org
Subject: Is something wrong here?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
I was wondering if there's something here I'm not seeing (or am unaware
of) with respect to the use of LIKE in Microsoft Access over ODBC to
PostgreSQL 6.5.0 using the 6.40.00.06 ODBC driver. I have the following
query:
SELECT workorders.workorder, workorders.workorderno, equipment.assetno,
equipment.controlno
FROM workorders, equipment
WHERE equipment.assetno LIKE '%214%' AND
workorders.equipment=equipment.equipment
ORDER BY workorders.workorder;
When I just "copy-and-paste" this query into a psql session, everything
works fine (although if I recall correctly, 6.5.0 has a bug with
something of the form LIKE '214%'). However, the following appears in
the trace log:
MSACCESS fff8be35:fffa52c5 EXIT S
QLExecDirect with return code 0 (SQL_SUCCESS)
HSTMT 0x057d0b60
UCHAR * 0x051c1828 [ -3]
"SELECT "workorders"."workorder","equipment"."equipment" FROM
"workorders","equipment" WHERE
(("equipment"."assetno" = '%214%' ) AND
("workorders"."equipment" = "equipment"."equipment" ) )
ORDER BY "workorders"."workorder" \ 0"
SDWORD -3
MSACCESS fff8be35:fffa52c5 ENTER SQLFetch
HSTMT 0x057d0b60
MSACCESS fff8be35:fffa52c5 EXIT SQLFetch with
return code 100 (SQL_NO_DATA_FOUND)
HSTMT 0x057d0b60
So I'm wondering who's turning my LIKE clause into an equality operator?
Is this a Microsoft Access issue? Is there a method of pattern matching
available that wouldn't require me to use the direct pass-thru method?
Any help would be greatly appreciated,
Mike Mascari
From bouncefilter Mon Dec 13 08:51:51 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA79808;
Mon, 13 Dec 1999 08:51:20 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id OAA00030;
Mon, 13 Dec 1999 14:37:45 +0100
Date: Mon, 13 Dec 1999 14:37:44 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Jan Wieck <wieck@debis.com>
cc: meskes@postgreSQL.org, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Datatype MONEY
In-Reply-To: <m11xUgo-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.3.96.991213133558.28438A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 13 Dec 1999, Jan Wieck wrote:
Karel Zak - Zakkr wrote:
IMHO is good use for money a float type.
In some countries (Germany at least) storage of financial
booking information is not permitted to use floats. And you
aren't allowed to use it for calculation of taxes etc.,
instead you must use some datatype with a fixable number of
digits after the decimal point.Thus, only our NUMERIC/DECIMAL type or int4/8 and using the
'V' (IIRC) format specifier in to_char() should be used.
Hmm, interesting.. but it is not problem for to_char(), it is problem
(how number datetype choise) for users.
To_char() formatting numbers by course of format-picture (second arg.)
only - total all is user choise (how set format), and to_char() not check
if country form allow to use fixet/notfixet digits after the decimal point
(in locales is not information about it, or yes?).
I take back my previous "IMHO".
But if you use to_char(444.555, '999.99'), output is always with two digits
after the decimal point and our country form is pleased ... I agree, it is
only output option, internaly is still problem if you will calculate with
float.
Or is other idea for to_char() money formatting and how datetype must be
supported (I plan float4/8 int4/8 now)?
(note: 'V' format specifier is multiplier and return a value as 10^n).
Karel
From bouncefilter Mon Dec 13 08:43:51 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA78842
for <hackers@postgresql.org>; Mon, 13 Dec 1999 08:42:55 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id OAA16900
for <hackers@postgresql.org>; Mon, 13 Dec 1999 14:42:52 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <YFC9CSJ7>; Mon, 13 Dec 1999 14:42:52 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1B8@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'hackers@postgresql.org'" <hackers@postgresql.org>
Subject: Re: [HACKERS] generic LONG VARLENA
Date: Mon, 13 Dec 1999 14:42:46 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
I am excited about the long data type. This is _the_ way to do long
data types. Have any of the commercial databases figured out this way
to do it. I can't imagine a better system.
The commercial db's usually make the dba decide on a per column basis
whether the value is stored inside the table or in an extra space
(blobspace,lobspace ...). They all have propietary syntax for this.
(I would probably like it configurabe, whith some reasonable default)
It is usually available for the text/byte and user defined datatypes.
In PostgreSQL the array types come to mind.
What I think would be good is, if you could avoid the need for an index on
the _LARGE_.. table.
My Idea would be to store an xtid of the first lob page slot in the user
table,
and have an xtid pointer to the next lob page slot in it, and so on.
That way you could avoid indices on the LARGE table.
SnapshotAny() would also see the correct long, since an updated value would
get a new xtid anyway. No need to use up an extra oid.
Since lob's are typically large, the large overhead would be especially
painful, so a different relkind with another pagelayout seems adequate.
The pointer would imho be:
longbit|length|largetableoid|xtid_of_first_lobpage|loblength
Just some ideas
Andreas
From bouncefilter Mon Dec 13 09:10:52 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id JAA85970;
Mon, 13 Dec 1999 09:10:15 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xW4C-0003kGC; Mon, 13 Dec 99 15:03 MET
Message-Id: <m11xW4C-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Datatype MONEY
To: zakkr@zf.jcu.cz (Karel Zak - Zakkr)
Date: Mon, 13 Dec 1999 15:03:08 +0100 (MET)
Cc: wieck@debis.com, meskes@postgreSQL.org, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.LNX.3.96.991213133558.28438A-100000@ara.zf.jcu.cz> from
"Karel Zak - Zakkr" at Dec 13, 99 02:37:44 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Karel Zak - Zakkr wrote:
On Mon, 13 Dec 1999, Jan Wieck wrote:
In some countries (Germany at least) storage of financial
booking information is not permitted to use floats. And youHmm, interesting.. but it is not problem for to_char(), it is problem
(how number datetype choise) for users.
But it is subject for what would happen in the expression
first if you have both, to_char(float8, text) and
to_char(numeric, text) available and execute a query with
to_char(444.55, '9999.99').
If the parser could choose to read in the value as float8 and
pass that to to_char(float8, text), the system would not be
compliant to financial software requirements in Germany.
Or is other idea for to_char() money formatting and how datetype must be
supported (I plan float4/8 int4/8 now)?
You should at least add NUMERIC to possible inputs. Otherwise
there would be no chance than to convert it to float8,
possibly loosing significant digits (and becoming not
compliant as to above).
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 09:28:52 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA88422
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 09:28:04 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id PAA02794;
Mon, 13 Dec 1999 15:14:32 +0100
Date: Mon, 13 Dec 1999 15:14:32 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Jan Wieck <wieck@debis.com>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Datatype MONEY
In-Reply-To: <m11xW4C-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.3.96.991213150150.28438C-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 13 Dec 1999, Jan Wieck wrote:
Karel Zak - Zakkr wrote:
On Mon, 13 Dec 1999, Jan Wieck wrote:
In some countries (Germany at least) storage of financial
booking information is not permitted to use floats. And youHmm, interesting.. but it is not problem for to_char(), it is problem
(how number datetype choise) for users.But it is subject for what would happen in the expression
first if you have both, to_char(float8, text) and
to_char(numeric, text) available and execute a query with
to_char(444.55, '9999.99').If the parser could choose to read in the value as float8 and
pass that to to_char(float8, text), the system would not be
compliant to financial software requirements in Germany.
Hmm, it is very firm in Germany (or in EU?) if not allow to use float
in financ. software, I must ask about it how is it in Czech. Thank for
interesting information :-)
Or is other idea for to_char() money formatting and how datetype must be
supported (I plan float4/8 int4/8 now)?You should at least add NUMERIC to possible inputs. Otherwise
there would be no chance than to convert it to float8,
possibly loosing significant digits (and becoming not
compliant as to above).
Well, on a datetype is depend only small part in to_char(), I try
write to_char(numeric, text) version. But I must first explore
NUMERIC datetupe... (documentation is quiet for this).
Thank Jan for suggestion.
Karel
From bouncefilter Mon Dec 13 09:56:52 1999
Received: from mail.ngi.de ([195.243.0.227])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA94433
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 09:56:13 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: from p3E9D3E4D.dip0.t-ipconnect.de
(root@p3E9D3E4D.dip0.t-ipconnect.de [62.157.62.77])
by mail.ngi.de (8.9.3/8.9.3) with ESMTP id PAA35228
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 15:46:09 +0100 (CET)
(envelope-from michael@fam-meskes.de)
Received: (from michael@localhost)
by tanja.fam-meskes.de (8.9.3/8.9.3/Debian 8.9.3-6) id PAA02450
for pgsql-hackers@postgreSQL.org; Mon, 13 Dec 1999 15:26:39 +0100
Date: Mon, 13 Dec 1999 15:26:39 +0100
From: Michael Meskes <meskes@postgreSQL.org>
To: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Datatype MONEY
Message-ID: <19991213152639.A2440@fam-meskes.de>
Mail-Followup-To: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
References: <19991213115723.A4101@fam-meskes.de>
<Pine.LNX.3.96.991213130008.25928A-100000@ara.zf.jcu.cz>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0i
In-Reply-To: <Pine.LNX.3.96.991213130008.25928A-100000@ara.zf.jcu.cz>;
from zakkr@zf.jcu.cz on Mon, Dec 13, 1999 at 01:13:55PM +0100
On Mon, Dec 13, 1999 at 01:13:55PM +0100, Karel Zak - Zakkr wrote:
I have complete code for numbers formatting (to_char() compatible with
Oracle). It allow you add a currency symbol corresponding with current
Sounds good.
locale ... and more features over basic datatypes (float4/8, int4/8).
Not about DECIMAL/NUMERIC? I don't like the idea of doing currecny
calculations with floats.
BTW could anyone tell me how exactly NUMERIC is stored? Just for curiosity.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Mon Dec 13 09:41:51 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id JAA92723
for <hackers@postgreSQL.org>; Mon, 13 Dec 1999 09:41:46 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11xWYf-0003kGC; Mon, 13 Dec 99 15:34 MET
Message-Id: <m11xWYf-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] generic LONG VARLENA
To: ZeugswetterA@wien.spardat.at (Zeugswetter Andreas SB)
Date: Mon, 13 Dec 1999 15:34:37 +0100 (MET)
Cc: hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To:
<219F68D65015D011A8E000006F8590C603FDC1B8@sdexcsrv1.f000.d0188.sd.spardat.at>
from "Zeugswetter Andreas SB" at Dec 13, 99 02:42:46 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Andreas Zeugswetter wrote:
I am excited about the long data type. This is _the_ way to do long
data types. Have any of the commercial databases figured out this way
to do it. I can't imagine a better system.The commercial db's usually make the dba decide on a per column basis
whether the value is stored inside the table or in an extra space
(blobspace,lobspace ...). They all have propietary syntax for this.
(I would probably like it configurabe, whith some reasonable default)
It is usually available for the text/byte and user defined datatypes.
Must have been proprietary syntax. There are may places in
SQL92 and SQL3 specs, where the words IMPLEMENTATION DEFINED
appear. With so many possible differences between
implementations within standard compliance, there must be
differences in the language too.
For the database schema, we cannot avoid proprietary syntax
to use implementation specific features. We don't have
tablespaces, extents etc., but if we ever implement something
like that, should we be unable to customize it because there
is no syntax defined in the standard?
In PostgreSQL the array types come to mind.
There was a user request about "tuple too big" right today
when storing a polygon.
What I think would be good is, if you could avoid the need for an index on
the _LARGE_.. table.
My Idea would be to store an xtid of the first lob page slot in the user
table,
and have an xtid pointer to the next lob page slot in it, and so on.
That way you could avoid indices on the LARGE table.
SnapshotAny() would also see the correct long, since an updated value would
get a new xtid anyway. No need to use up an extra oid.
While I would like such an approach too, I don't want to do
it really. It would require to treat the lob tuples
different from regular ones in vacuum. It is one of the most
important tools for a productional DB. One single broken
xtid chain due to an aborted vacuum will corrupt your
database. Better keep it working the same as for a regular
table.
Since lob's are typically large, the large overhead would be especially
painful, so a different relkind with another pagelayout seems adequate.
No, I think a single Oid index on a relation, where only
usually large tuples are stored is a very small overhead.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 09:50:52 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA93741
for <hackers@postgreSQL.org>; Mon, 13 Dec 1999 09:50:12 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id PAA146614;
Mon, 13 Dec 1999 15:50:02 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <YFC9CS5J>; Mon, 13 Dec 1999 15:50:02 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1B9@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'wieck@debis.com'" <wieck@debis.com>
Cc: hackers@postgreSQL.org
Subject: AW: [HACKERS] generic LONG VARLENA
Date: Mon, 13 Dec 1999 15:49:51 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="windows-1252"
Since lob's are typically large, the large overhead would
be especially
painful, so a different relkind with another pagelayout
seems adequate.
No, I think a single Oid index on a relation, where only
usually large tuples are stored is a very small overhead.
Well actually it will be one tuple per ~8k, so more than the
original tuple count, but I also meant the ~40 bytes per tuple
in the datapage.
But your arguments sound convincing :-)
Andreas
From bouncefilter Mon Dec 13 09:59:52 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id JAA94916
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 09:59:33 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xWpt-0003kGC; Mon, 13 Dec 99 15:52 MET
Message-Id: <m11xWpt-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Datatype MONEY
To: zakkr@zf.jcu.cz (Karel Zak - Zakkr)
Date: Mon, 13 Dec 1999 15:52:25 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <Pine.LNX.3.96.991213150150.28438C-100000@ara.zf.jcu.cz> from
"Karel Zak - Zakkr" at Dec 13, 99 03:14:32 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Well, on a datetype is depend only small part in to_char(), I try
write to_char(numeric, text) version. But I must first explore
NUMERIC datetupe... (documentation is quiet for this).
NUMERIC's output function returns a null terminated string
representation as usual. Possibly a dash (negative sign), one
or more digits, optionally followed by a decimal point and
one or more digits. And you could get it with an adjusted
number of digits after the decimal point by doing
text *numeric_to_char(Numeric num, format text)
{
char *numstr;
int32 scale;
... /* calculate the wanted number of digits */
... /* after DP in scale depending on format */
numstr = numeric_out(numeric_round(num, scale));
}
There will be "scale" number of digits after the DP, which is
missing if scale is zero. The value will be correct rouded
and/or zero padded at the end.
Wouldn't that be enough for you?
Well, you must work on the string only and cannot read it
into a float internally, but with the above preprocessing, it
should be fairly simple.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 10:20:54 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA01671;
Mon, 13 Dec 1999 10:20:36 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xXAH-0003kGC; Mon, 13 Dec 99 16:13 MET
Message-Id: <m11xXAH-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Datatype MONEY
To: meskes@postgreSQL.org (Michael Meskes)
Date: Mon, 13 Dec 1999 16:13:29 +0100 (MET)
Cc: pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <19991213152639.A2440@fam-meskes.de> from "Michael Meskes" at Dec
13, 99 03:26:39 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Michael Meskes wrote:
On Mon, Dec 13, 1999 at 01:13:55PM +0100, Karel Zak - Zakkr wrote:
I have complete code for numbers formatting (to_char() compatible with
Oracle). It allow you add a currency symbol corresponding with currentSounds good.
locale ... and more features over basic datatypes (float4/8, int4/8).
Not about DECIMAL/NUMERIC? I don't like the idea of doing currecny
calculations with floats.
First it's a variable size datatype. There's some information
about weight of first digit, precision, scale and sign.
Following are all digits coded into nibbles (4-bit per
digit).
The weight tells which of the digits WRT to the decimal point
the first nibble contains. Precision and scale tell how many
digits at all and after DP to have. Leading and trailing zero
digits are stripped off in the DB stored value with an
adjusted weight, so a 5000000000000 value with a precision of
200 digits will only occupy one nibble when stored. A single
5 with a weight of 12.
If I ever find the time (soonest 2001 I expect) I'll
completely replace the digit storage by small integers and
store the value in base 10000 instead of 10. Just for
performance reasons.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 10:45:53 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA07066
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 10:44:55 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA11682;
Mon, 13 Dec 1999 10:44:10 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] update_pg_pwd
In-reply-to: Your message of Mon, 13 Dec 1999 12:12:42 +0100 (MET)
<Pine.GSO.4.02A.9912131208060.8544-100000@Panter.DoCS.UU.SE>
Date: Mon, 13 Dec 1999 10:44:09 -0500
Message-ID: <11680.945099849@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
On Sun, 12 Dec 1999, Tom Lane wrote:
opr_sanity is complaining because the declared return type is 0.
I am not very happy about taking out opr_sanity's check on return types;
perhaps I should lobby to have Opaque-valued trigger functions be
declared with an actually valid return-type OID. What do you think?
Please don't lose me here. Did I do something wrong?
No, I think you coded the function the way it's currently done. I'm
just muttering that the way it's currently done needs rethinking.
If you have to tailor functionality around the regression tests, this is
not the right direction. After all 0 is a valid oid in this context: it's
opaque.
The thing I'm unhappy about is that "0" is being overloaded way too far
as a function argument/result type in pg_proc. Currently it could mean:
* unused position in proargtype array;
* erroneous definition;
* "C string" parameter to a type input function (but, for who
knows what reason, C string outputs from type-output functions
are represented differently);
* user proc returning some kind of tuple;
* user proc returning nothing in particular;
and who knows what else. This is bogus. I've complained before that
there ought to be a specific OID value associated with "C string" and
that type input/output functions ought to be declared to take or return
that type ID, even though it wouldn't be a "real" type in the sense of
ever appearing as a column type. The parser already has a similar
concept in its "UNKNOWN" type, which it uses for string constants that
are of as-yet-undetermined type. UNKNOWN is real to the extent of
having a specific OID.
I'm thinking maybe we ought to invent another type OID (or two?) that
can be used for user functions that are declared OPAQUE. Triggers in
particular. That would allow more error checking, and it'd let me take
out the kluges that presently exist in the opr_sanity regress test to
keep it from spitting up on things that are practically
indistinguishable from genuine errors.
regards, tom lane
From bouncefilter Mon Dec 13 10:46:52 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA07308
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 10:46:42 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA11709;
Mon, 13 Dec 1999 10:46:04 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] update_pg_pwd
In-reply-to: Your message of Mon, 13 Dec 1999 10:44:09 -0500
<11680.945099849@sss.pgh.pa.us>
Date: Mon, 13 Dec 1999 10:46:04 -0500
Message-ID: <11707.945099964@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
I wrote:
The thing I'm unhappy about is that "0" is being overloaded way too far
as a function argument/result type in pg_proc. Currently it could mean:
* unused position in proargtype array;
* erroneous definition;
* "C string" parameter to a type input function (but, for who
knows what reason, C string outputs from type-output functions
are represented differently);
* user proc returning some kind of tuple;
* user proc returning nothing in particular;
and who knows what else.
Almost forgot:
* function accepting any data type whatever
(I think COUNT() is the only one at present).
regards, tom lane
From bouncefilter Mon Dec 13 11:03:52 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA11930
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 11:03:20 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA11816;
Mon, 13 Dec 1999 11:02:42 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: peter_e@gmx.net, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] update_pg_pwd
In-reply-to: Your message of Mon, 13 Dec 1999 12:38:17 +0100 (MET)
<m11xTo1-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Mon, 13 Dec 1999 11:02:41 -0500
Message-ID: <11814.945100961@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
One last point though. The comment says it's using lower case
name now to be callable from SQL, what it isn't because of
it's Opaque return type in pg_proc.
pgsql=> select update_pg_pwd();
ERROR: typeidTypeRelid: Invalid type - oid = 0
Is that a wanted (needed) capability or should I better
change the comment to reflect it's real nature?
What would you expect the SELECT to produce here? I think the error
message is pretty poor, but I can't really see OPAQUE functions being
allowed in expression contexts...
I don't really like the description of these functions as returning
something "OPAQUE", anyway, particularly when that is already being
(mis) used for user-defined type input/output functions. I wish
they were declared as returning something like "TUPLE".
regards, tom lane
From bouncefilter Mon Dec 13 11:12:53 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA13101;
Mon, 13 Dec 1999 11:12:21 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA11874;
Mon, 13 Dec 1999 11:11:50 -0500 (EST)
To: Michael Meskes <meskes@postgreSQL.org>
cc: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Datatype MONEY
In-reply-to: Your message of Mon, 13 Dec 1999 15:26:39 +0100
<19991213152639.A2440@fam-meskes.de>
Date: Mon, 13 Dec 1999 11:11:50 -0500
Message-ID: <11872.945101510@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Michael Meskes <meskes@postgreSQL.org> writes:
BTW could anyone tell me how exactly NUMERIC is stored? Just for curiosity.
I believe it's a simple-minded BCD format, one decimal digit per byte.
Jan has been muttering about reimplementing it as radix-10000, storing
four decimal digits per short instead of one per byte; that'd reduce
the number of iterations in the inner calculation loops by 4x, without
making the elementary steps noticeably more expensive on modern hardware...
regards, tom lane
From bouncefilter Mon Dec 13 11:54:54 1999
Received: from aurora.rg.iupui.edu (aurora.rg.iupui.edu [134.68.31.122])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA20408;
Mon, 13 Dec 1999 11:54:08 -0500 (EST)
(envelope-from gunther@aurora.rg.iupui.edu)
Received: from aurora.rg.iupui.edu (schadow_g.regenstrief.iupui.edu
[134.68.31.121])
by aurora.rg.iupui.edu (8.9.3/8.9.3) with ESMTP id LAA36734;
Mon, 13 Dec 1999 11:53:43 -0500 (EST)
(envelope-from gunther@aurora.rg.iupui.edu)
Message-ID: <385524AC.BBA27521@aurora.rg.iupui.edu>
Date: Mon, 13 Dec 1999 11:54:04 -0500
From: Gunther Schadow <gunther@aurora.rg.iupui.edu>
Organization: Regenstrief Institute
X-Mailer: Mozilla 4.51 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Michael Meskes <meskes@postgreSQL.org>
CC: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Datatype MONEY
References: <19991213115723.A4101@fam-meskes.de>
Content-Type: multipart/mixed; boundary="------------2E15CEF6B4144BBF3942E71C"
This is a multi-part message in MIME format.
--------------2E15CEF6B4144BBF3942E71C
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Michael Meskes wrote:
I somehow remember the MONEY datatype has some problems and might be
removed. Now I didn���t follow this topic closely enough, but now I've
encountered I could use it pretty well. Of course a DECIMAL datatype fits
the bill as good since I do not need the currency symbol in psql's output.Before I set up my DB I'd like to know which type to prefer.
AFAIK the MONEY data type in SQL is a toy rather than a serious thing.
It makes a big deal out of locale-dependent currency symbols but that
way lacks robustness: try the following game:
locale = INDIA (currency 1 RUPEE <= 1/40 US$)
UPDATE bankAccounts SET balance='10000 Rs.' WHERE id='123'
then switch your locale to USA (currency 1 US$ >= 40 Rs.)
SELECT balance FROM bankAccounts WHERE id='123'
-> 10000 US$
You have just got your rupees converted at an exceptional exchange rate
of 1:1!!!
In my opinion locale should not affect what gets stored in the data
base and local should not change the meaning of the data. So using
the locale for currency symbol naively can be problematic. What you
need to do to really support money in different currencies is keep
track of your hourly exchange rates etc. Then store your data in
one currency as a DECIMAL or whatever. Alternatively, store the pair
(value DECIMAL, currency CHAR(3)) in the data base, with currency
being the ISO 3-letter code. Be aware of the difference in semantics!
regards
-Gunther
--
Gunther_Schadow-------------------------------http://aurora.rg.iupui.edu
Regenstrief Institute for Health Care
1050 Wishard Blvd., Indianapolis IN 46202, Phone: (317) 630 7960
schadow@aurora.rg.iupui.edu------------------#include <usual/disclaimer>
--------------2E15CEF6B4144BBF3942E71C
Content-Type: text/x-vcard; charset=us-ascii;
name="gunther.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Gunther Schadow
Content-Disposition: attachment;
filename="gunther.vcf"
begin:vcard
n:Schadow;Gunther
tel;fax:+1 317 630 6962
tel;home:+1 317 816 0516
tel;work:+1 317 630 7960
x-mozilla-html:FALSE
url:http://aurora.rg.iupui.edu
org:Regenstrief Institute
adr:;;1050 Wishard Blvd;Indianapolis;Indiana;46202;USA
version:2.1
email;internet:schadow_g@regenstrief.rg.iupui.edu
title:M.D.
fn:Gunther Schadow
end:vcard
--------------2E15CEF6B4144BBF3942E71C--
From bouncefilter Mon Dec 13 12:01:58 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id MAA24375
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 12:01:50 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xYkB-0003kGC; Mon, 13 Dec 99 17:54 MET
Message-Id: <m11xYkB-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] update_pg_pwd
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Mon, 13 Dec 1999 17:54:39 +0100 (MET)
Cc: wieck@debis.com, peter_e@gmx.net, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <11814.945100961@sss.pgh.pa.us> from "Tom Lane" at Dec 13,
99 11:02:41 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
One last point though. The comment says it's using lower case
name now to be callable from SQL, what it isn't because of
it's Opaque return type in pg_proc.pgsql=> select update_pg_pwd();
ERROR: typeidTypeRelid: Invalid type - oid = 0Is that a wanted (needed) capability or should I better
change the comment to reflect it's real nature?What would you expect the SELECT to produce here? I think the error
message is pretty poor, but I can't really see OPAQUE functions being
allowed in expression contexts...
Exactly that error message, you know as I know why it should
happen. What I wanted to know is, if there could be a reason
to make it callable via such a SELECT, to force it to do it's
action, or if that's just an old comment that's wrong now.
I don't really like the description of these functions as returning
something "OPAQUE", anyway, particularly when that is already being
(mis) used for user-defined type input/output functions. I wish
they were declared as returning something like "TUPLE".
Yes, that would clearly separate trigger proc's from
functions. And for unused arguments I would suggest VOID.
But I expect (hope), you want to do this all during the fmgr
redesign, not right now, no?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 12:22:53 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id MAA27175;
Mon, 13 Dec 1999 12:22:03 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xZ3P-0003kGC; Mon, 13 Dec 99 18:14 MET
Message-Id: <m11xZ3P-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Datatype MONEY
To: gunther@aurora.rg.iupui.edu (Gunther Schadow)
Date: Mon, 13 Dec 1999 18:14:31 +0100 (MET)
Cc: meskes@postgreSQL.org, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <385524AC.BBA27521@aurora.rg.iupui.edu> from "Gunther Schadow" at
Dec 13, 99 11:54:04 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
In my opinion locale should not affect what gets stored in the data
base and local should not change the meaning of the data. So using
the locale for currency symbol naively can be problematic. What you
need to do to really support money in different currencies is keep
track of your hourly exchange rates etc. Then store your data in
one currency as a DECIMAL or whatever. Alternatively, store the pair
(value DECIMAL, currency CHAR(3)) in the data base, with currency
being the ISO 3-letter code. Be aware of the difference in semantics!
The latter is IMHO the better. If you have a foreign currency
account, it's balance will not raise and fall as exchange
rates change. That's what they are good for. Only at the
time, you transfer money between different currency accounts,
the actual exchange rate is used.
Keeping track of hourly/dayly exchange rates is only good if
you need reports for controlling purposes. There it's better
to have anything converted into your inhouse currency. View's
do a wonderful job here.
BTW: The non-floating-point restriction does NOT apply to
controlling systems, because they are management information
systems and not subject to the Ministry of Finance, as the
bookkeeping data is.
For those who wonder: between 1980 and 1983 I learned, and
until 1987 I worked as a bank clerk. That left some traces
that sometimes are useful.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 13 13:03:54 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA38112
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 13:03:21 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA12124;
Mon, 13 Dec 1999 13:02:43 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: peter_e@gmx.net, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] update_pg_pwd
In-reply-to: Your message of Mon, 13 Dec 1999 17:54:39 +0100 (MET)
<m11xYkB-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Mon, 13 Dec 1999 13:02:43 -0500
Message-ID: <12122.945108163@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
I don't really like the description of these functions as returning
something "OPAQUE", anyway, particularly when that is already being
(mis) used for user-defined type input/output functions. I wish
they were declared as returning something like "TUPLE".
Yes, that would clearly separate trigger proc's from
functions. And for unused arguments I would suggest VOID.
But I expect (hope), you want to do this all during the fmgr
redesign, not right now, no?
Yes, this ought to go along with fmgr changes, probably. But I'm still
unhappy about the idea of doing all these updates for long values to
varlena datatypes without doing the fmgr update at the same time.
I have been thinking some more about the schedule issue, and I still
think it's foolhardy to try to do the long-values change by Feb 1.
If you recall, that date was set on the assumption that we were only
going to clean up what we had before making the release, not insert
major new features.
If people are really excited about getting this done for the next
release, I propose that we forget all about Feb 1 and just say
"we'll release when this set of changes are done". We ought to deal
with all of these issues together:
* support long values for varlena datatypes;
* eliminate memory leaks for pass-by-ref datatypes (both
varlena and fixed-length);
* rewrite fmgr interface to fix NULL and portability bugs.
If we don't do it that way, then not only will we ourselves be
having to visit each datatype module multiple times, but we will be
breaking user-added functions in two successive releases. Users
will not be happy about that. We should change these coding rules
that affect user datatypes *once*, and get it right the first time.
I'd personally prefer to see us put off all these issues till after
a Feb-1-beta release, but I fear I am fighting a losing battle there.
Let's at least be sane enough to recognize that we don't know quite
how long this will take.
regards, tom lane
From bouncefilter Mon Dec 13 13:54:55 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA46365
for <pgsql-hackers@postgresql.org>;
Mon, 13 Dec 1999 13:54:28 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.93.58.250]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Mon, 13 Dec 1999 12:46:11 -0600
Sender: ed
Message-ID: <38554119.45082D8@austin.rr.com>
Date: Mon, 13 Dec 1999 12:55:21 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
References: <m11wZS6-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Posted this a few days ago on pgsql-general and deja, with no response, so
hoping hackers might help...
Anyone know what this error is or how to prevent it? Seems to
usually show up on large queries...
"ExecInitIndexScan: both left and right op's are rel-vars"
I've seen it before, but can't recall a solution and couldn't find
one in archives/deja...
Thanks in advance...
Ed
pgsql 6.5.2, redhat 6.0 (2.2.5-15smp).
From bouncefilter Mon Dec 13 15:43:57 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA81458
for <hackers@postgresql.org>; Mon, 13 Dec 1999 15:43:10 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64393 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sJJd914403>; Mon, 13 Dec 1999 21:42:51 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11xcOH-0001UY-00
for hackers@postgresql.org; Mon, 13 Dec 1999 21:48:17 +0100
Date: Mon, 13 Dec 1999 21:48:16 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: hackers@postgresql.org
Subject: Create Group
Message-ID: <Pine.LNX.4.20.9912132055370.361-101000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1239645574-945118096=:361"
Sender: Peter Eisentraut <peter@hub.org>
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--8323328-1239645574-945118096=:361
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
I'm currently working on Create/Alter/Drop Group statements. I have all
the framework set up, I can create empty groups and drop them, and create
all sorts of notices about unimplemented functionality.
First, the syntax I had in mind:
CREATE GROUP name [ WITH [ SYSID id ] [ USER name1, name2, ... ] ]
ALTER GROUP name WITH SYSID id /* changes sysid */
ALTER GROUP name ADD USER name1, name2, ...
ALTER GROUP name DROP USER name1, name2, ...
DROP GROUP name
Please protest now or hold your peace for at least one release. :)
Here's a tricky problem:
=> insert into pg_group values ('one', 1, NULL);
=> create group two;
both create groups of identical fashion. The create group uses
heap_insert().
Now I do
template1=> alter group one add user foo;
NOTICE: Cannot add users to a group, yet.
ALTER USER
/* OK */
template1=> alter group two add user foo;
AlterGroup: Group "two" does not exist.
/* Huh? */
This is caused by this statement:
if (!HeapTupleIsValid(
SearchSysCacheTuple(GRONAME, PointerGetDatum(stmt->name), 0, 0, 0))
)
{
heap_close(pg_group_rel, AccessExclusiveLock);
UserAbortTransactionBlock();
elog(ERROR, "AlterGroup: Group \"%s\" does not exist.",
stmt->name);
}
However:
template1=> select * from pg_group;
groname,grosysid,grolist
one,0,
two,1,
However however:
template1=> select * from pg_group where groname='two';
groname,grosysid,grolist
(0 rows)
BUT:
template1=> drop group two;
DROP GROUP
template1=> drop group two;
ERROR: DropGroup: Group "two" does not exist.
as expected.
DropGroup does a normal heap_scan checking for the existence of the
groups. I'm not sure, is there some subtle binary off-by-one-bit problem,
are the strings encoded differently, etc.?
Interestingly, this similar statement works:
tuple = SearchSysCacheTuple(SHADOWNAME, PointerGetDatum(stmt->user), 0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
heap_close(pg_shadow_rel, AccessExclusiveLock);
UserAbortTransactionBlock();
elog(ERROR, "AlterUser: user \"%s\" does not exist", stmt->user);
}
Also, why can pg_group not be vacuumed? (pg_shadow can.) With all this
testing, mine is filling up.
Perhaps related, but just out of curiosity: Why is pg_group a system
relatation (pg_class.relkind='s')? Only three other ones have this
set: pg_variable, pg_log, and pg_xactlog.
Any help will be appreciated. I'll be back when I need to figure out the
arrays. :)
(Patch is included for those that don't have a clue what I'm talking about
but would like to find out anyway.)
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
--8323328-1239645574-945118096=:361
Content-Type: APPLICATION/x-gunzip; name="group-patch.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.20.9912132148160.361@localhost.localdomain>
Content-Description: group patch
Content-Disposition: attachment; filename="group-patch.gz"
H4sICFlYVTgAA3BhdGNoAO1be1PbuBb/2/0Ugu22STDkSQvhwk4a0pZZCmwS
urNzdydjbCXx1LGztlPgtv3u9xzJD8mW8yh0u3vneiBx5KMj6eh3XpJ86Tr3
xHZJ4JvVG8P8QF2reuN5YRD6xrxN8HZu+AHdM59criYNTMN1qb8mMd6OQg+e
BXtTZQ3TCA3Hm7TJxPFuDKe+d/PB3gu8hW/S9egtGpi+PQ9tz11ewfFMoB+F
dDZ3jJCu31KuotikZY/HZNckuz7ZvSPd9wP8qux5+DXsvBmQvb3qfBL86ez6
dEx96pq0KrXizWaGawXVRYBSJUuePalUKhuy0955LjmlJqk34a9dO2jXa6R+
eHj4ZHd3d1lbYsVGrd162W41eMWKfLFONWp6Y5+wn8gXf74gcLf7hJAfbNd0
FhYl25FAUbCuMaN7023l4/lkZMHtjREsIwmmhuXdIsGOmmDie4t5jkE8StOb
3xc+ZCLIPHTsm/mfVdO/n4f4SCWF/VZL32+9TOWw39rXD5rNWBLaF/jAb5+G
C989gp5/gf/kr4pM3vQvr6/I8O3ZBWAHCqr82UfPtuCr61NA4BscWkm4H4Sz
kFQC+NRJl4/ilAYhAaCGZaj2Cf61PgX0AmS1WDgjnzrYCe0tNeYD0GuoAwCE
m6R0uJg7VAvxE8vwYkWMkpCEkxWYrA4ovaNptnsDOvMhroGFJLo4Ob2zgzAg
x2RsOAHVIzrxCu4D28rQxfxsN0zoZsbdyLaAYrcePz41wsUseuzSWxil6fnW
v5t/xATm1PBJjmDkLhwnEMjOoe2IqmKD8h/xmdDsMSltlaIxQstnwdA33MAw
UbivsLBULqPUNe0Vndhu/mnMqVrBT1Ih74wPlAQLn5JwSgnCj8AsEMuD33aw
x6mqceMgdcN0zCkFXmz645m9AK3SyRsaXk2ugQf+LJV10umej/qn5DO76VyV
ydYx3nbf9ro/jy5/Zl1lCNGwVufG80N1nzWNgnKVev3+ZV8n2wIA2+SK+jM7
CKACoM61qbW3zetEEJdQB1KbArpG3py6vmoMHdOkQdC7A+UL7I/0HLrAuYmI
Ay5xLRgzQtIvia0kckZIx03e4JRggUSqR0gkA9eYB1MvvPBudVLTycX1+Tlv
+XZqOxRmXkLws2dkS4IqFCR6cxa8NxzbKjH1iduf0NCld2EJuxC1GqHlk6AG
DMOaZuHXkVAuqhLiNR4hpxTaMMLQ5w2DMN3FbJSMFj5dJmNRlDp5huyiWc4o
KeeNQ0UavCmBYzdn81KJqVKlzEl0ghZo9wTZl8nxMamVv65/TKLFHYwv1AXe
IqtATrBFsKLEXAShN7P/Qy0CxbeGG8Id058lJkYxSlDysBz1/JgITUndoDCF
2OrcBnNQJztok+TWPmVaxo4z3lGjJ5EZKysMYWLghApi619iHdOYaMGVM3Dj
R1m0WNKcfv4sjV6wAIyJ6XgBzehHoUauMhrioMVOZAdbbFrYF0FUkd+3fwx+
3yaGA8+te8I57W1LyMvOzYbtcCz9CNAJknYMMGwTF22anoNBbODwYgadewzC
pIHxIrPpE5CZyy07djIgoQfYDBLyaspk7EGj5rSEPiduznbtEOWcSE2ElOm5
4Km4KnIHy9pBxPpggUrO2PaDkPErx5iIr9g2Dajhm9PBfdCFpikzX6XB287p
5a8XnXc9lYdWXVcegJT6aI0Rp6WkM+V1OdSY1a3lkLOltqrl8hI12xjL4rUm
qvEqRhQyiTFreTDrrhdy0CKSUulkFTq+JCRDIxeXw7NuD1o5e24Br1tiWBYH
FUJ2gaBiYEPGOsrtDMCxcBC3WfmXSq89n5ldHkmXyZvecDDsX3eHsWh3T4C1
bO8KsI6siBGBCZHtQp9CCdzxRMoGuybOX2LqBJq4YWZkc7Q7OwKchViv9gca
TIbBcklhGgTSukgamWEFWUMgw5hA2W4UQrLWn5PneTYRQX0VAWvtuftcaEUK
IsBEzFhBSfaRKSM9x1TUfHHuzthcwexBBcIrYCaMOEqYQzbm0Nx0sq7wqc4o
GAdQ7H4K9fDCS1QvdlOqYJo55Sje5nF1z7XUainlU1HO1HHQJLGUKb39KzIm
iGB8+nH0N8ueHiM9+uenQb/2Hy0NSkG1Ogsi4rQ/JBGSGG2QC2W1/z317fE9
yNcIObrimErSdk3tggXkqeKHN/1LFjzkwgLBIuuJxxc9QS4fevywdMkk8jiw
0G1n/ElR/AcZJGDAtC1KblG64BYtTxYrXqlP5F3keRPLYqaGO6FRPJrQi1Jh
piFOA6XCIgMg0KV95f19jUEiYeqEnUINtNVBsFRPzHMeI8+Orzjdfkh2XSsv
jQ/FJLuu89SqkQ3ushk3EOJXIyNNvDijByfh9VyAyXv28Oy5keOsyoEbSRLM
7tIkuHF8LEZvz54pPE9pK5ICpJhsMCzXlFcLYoELirR1XMv1LXWe0DPJieL1
JWsdVJlvfDElyyS8Raj4LllD3vxsmoaKclmi5a8WtmMx5cZwj0v31g6n3OPO
YWqoxdsu1PIN4uwMeT1Pnh9ANuiWMJ9iQgF8B6a2YNVI3UBBvK4kysbsSiLW
YbZ89BOG76Qd18iClUs6A7Bn6eh2T8JRQJ1xUdr89VlAEcfEAK/jdYXAPYM5
lqflfNpJ5NLidJUtf/BwQ+nY5GS3a7jogKXKRpzk3tMwirHW6sm/op5YvjeP
uI19b7ZxZ7L1V/fnO2dBp9BhngQld/+oXSN1MPP/LCT2IMmsrpeEiJEqTqKU
7xOW7xPAAzBwaAi3YNJmRmhObXfCYZ9JEL7T7s6jbO08SXd3Hm3vJr9QLwXr
Qvkj7tzEF+Iyv50hRmFRECbFYMfyalw2LpJ0MPQXUjSWGDiOl6xjk31aPtiP
9wjj76UBnQjdU9zfoWRsA1QN9/4nZXq1lXZdtXz+zXNLQTU3Sy1F0fxl7gOb
VByHaZPxbOKrD/Gse3hn7UM7Gx/WWXFIR1mDH3pSn0piz3zor2/MCo46SSRg
MIHsoWeBOMsq43ivaCx6ss45IKmCeJinVmvXGu1WS30KqLBa/UW7Xms3DovP
ANUbh3q92UpPv/CC/eT0i9YFPYI0Z8ACjt4dzJPt8h/vDd9GlzOgYaZg6t3K
JX0aREScJ9tuQX3kZCyRSn+i6qW/+guHdhjaUwZy2aXfm83De4yHXDy8Brlv
EHdKEThnjuDoRF5g1okUa/HTPz+G93NK/gXcTzTNm4fJYSfIiMWfDZ1hGnum
E5hfzwLfiyyUwm+CrFvREaxMG+iuR3PIHW8tMCAG/Ewp7I+GcyKOiGfJWTKB
0Ud0izHBVkyAqdcJJ+CmiediQkHCMuWKHpEa7ok29O3JBCwqm4ahjS4uKnrt
+YM5BSd3dW64k6GPALKQCQNYqwaDTg6a/W0HzYuCke2OMB37JvJQgaJ5WNdb
tXqqkc3DBhS0Uo084u2j2yFtjZCOZXUg/GBgzaP9cwbejMVnWeWisi46qitw
kIYjlnrze/En055cQScobD+jbzIf+meujEkpV4qyZIUqobVq+3qrXkuF1qod
QIEgtM9Mq5GBpkUFMBGumRkLJFTUDQuHkrUMMd9sl7Es6XBalMhbeRDx4EDf
P2wKBxFh4l8cNOIx5DDdJuR95/zslFxfDM/OyaB7eTEYapr2iTx9CtHe0+YR
+cIah9arld67q+FvlarGr4iGbYpGVEdJ8lmtPOaFguQf0UxC2j33QE8pOEKe
gKck7OMxr+iIRgaDILpuv9cZ9qKTmzgxZ1Z2aZjkos4VroRUMK2ZQSp64Vk0
e9YzijI1lweLfIqWMHfjNVvxnGQBYXLUJJ7UJeRs5kvYQ1Ipu2rKL8rSz8pS
lSR/PRu+lSz0Emv6dxX60/0NhP70xbcQeaSThbIDHF8Pen2ScWcowMgINI4K
5jK90DoQZh4gA0uLMyZC0blCjt/YjDDf9T2siOxJ26RzPgTh54E/+G0AZvmM
HfFSCG4ZuLOHHSRsyw8fAu2laHXTbU1SW0GIcHs8w6OCmcroKATfOT1V6sLf
Uv4r7Xki/51VlOIEPNQIPUD8p/3Lq/9F+a+k/NbyP/rGxhTj0u9hS6VQus3x
IyIqL4plsMlsj0iokZ5tCpqVk1Y4ZyxJe+RpIzghy9a11lkew6VZ9fJYm8Fg
Ajh48KpYaHrz6iK0HTu8z7wgJz96Ulm9LibXUCyMHaoXxorr1Q/bNfwrXhk7
gAzyoC6kY6xAeC9M006xsz61ojSfLTnhBnEpvw6Fr1sw+YOSUbZeC/VvIFT9
wLL5FEKmAbHycJTNVzIguxqMBr3haDDsDK8HpegVuKExAaxui+H4dgx3vlN1
9nrUeXXZH/ZOS9ldY7zE99TyL6oJA9D5bmPu1A0fz45iPJnIaYPhCL5ms9EI
J0hzR0gfNBbZcm0wlNTGbTaSdBc4uw289jj4K4wa7peybzD8q4wN8BsbCydc
Sag0Nqh1wbLtB5HiYQvx0duemZdhp2TJs2VGp6CKNjBCbj3q+G5tfb+935St
TlFFeUEe3+bdX7Ig/1JvCOtY+DNZxaJ3gGKXnQ1I1+9K0kqe4mQAszZi1T6d
eR/Z6nt0tgv7ma8CQBJrfc1LrEcZHpsf6s5y2PRAROSJfwDA2WMNE12MUUdv
ca/xoXhzISgI+GcGbdKTdbAmVVAgraVGmlxNxNl+u/myDfWLcXZwqNcPxY0f
VvAycW/cziXbMLwINy2Fn8X7LTkPlj7I7LYk5dKE6pHFAvJR726O70W9rNWi
ZnG1W3+k6WP2s3gOxcfrT6RYS5qWVrt+0G7uL5vNwrowpVC3tuR9/oOm3jg4
EN7oh4JmPd3LQ23XQNZM4Y+YNyBXPOAb/HLOD8043sR20UGghkB0K61bR2YB
qu0qL55RCLFElU12leUYfBedRUi4xh5w4iWMMFHAPRbwQ3gMYmGGua2EnSQp
wAgd3SxeWEnxXkQFA35x0QrGwXIAb5ycrcycKBNfWudvNkm1OTWYpdJuHQ8t
sJdJI7dZTrlI76THa4ZHCRe2Ygd9wEe24UQH1FjtL9kRR9FBRiyZHZ5Hk0p0
rsgjBltxU4qFZ8pHYvUdPE5tWJYO2TOeT4bZ10kN7jwQs09Kbzvdn7fKa0uZ
J+3RwXqlUJMcPC/U9OyhZVXZ+b9IsLLM1HKVt3u+QqysJYmLmBoWgR+rx5vk
ZND75bp30e2lmvPkvwjwaBYcRgAA
--8323328-1239645574-945118096=:361--
From bouncefilter Tue Dec 14 02:46:03 1999
Received: from smtp.kdt.de (ns2.kdt.de [195.8.224.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA81913
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 02:45:59 -0500 (EST)
(envelope-from christof.petig@wtal.de)
Received: from gateway.petig.de (line0321lf.kdt.de [195.8.240.71])
by smtp.kdt.de (8.8.8/8.8.8) with ESMTP id IAA28024
for <pgsql-hackers@postgresql.org>; Tue, 14 Dec 1999 08:45:50 +0100
Received: from wtal.de (christof@[192.168.232.3])
by gateway (8.8.8/8.8.8) with ESMTP id IAA04629
for <pgsql-hackers@postgresql.org>; Tue, 14 Dec 1999 08:40:42 +0100
Sender: christof@to.wtal.de
Message-ID: <38556A3C.4174CA18@wtal.de>
Date: Mon, 13 Dec 1999 22:50:52 +0100
From: Christof Petig <christof.petig@wtal.de>
Organization: Adolf Petig GmbH. & Co. KG
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.7 i586)
X-Accept-Language: de
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] LONG
References: <199912130559.AAA18941@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
As I offered some time to work on tuple chaining this thread clearly
touches the same area.
The idea of transparantly moving big attributes into a seperate table
clearly has its benefits as long as normal operations need not to touch
these long values. I (too) see this as a great deal. And the fact that
it happens transparently (not visible to user) is the best about it.
But AFAICS tuple chaining shouldn't be such a big deal, it should be
about three days of work. (It'll definitely take longer for me, since I
have to understand pgsql's internals first.): Split the tuple into
multiple Items on disk storage, concatenate them on read in. Then make
vacuum ignore continued items when not dealing with the whole tuple. No
need to touch CID, XID etc. The most obvious disadvantage is possible
fragmentation of tuples (unless handled in vacuum). Disk access
atomicity for tuples is a non issue for Linux people since Linux uses 1k
blocks :-(
Storing attributes seperately is the best solution once you exceed
4*BLKSZ, tuple chaining addresses 1.1-3*BLKSZ most efficiently. (correct
me if I'm wrong)
LONG as a seperate type is IMHO just another concept you have to master
before you can use a RDBMS efficiently. The less different concepts a
user needs to learn, the easier life is for him. Postgres already has a
lot of data types to learn.
Wrapping lo in a user type sounds good to me.
Yours
Christof
From bouncefilter Tue Dec 14 02:47:04 1999
Received: from smtp.kdt.de (ns2.kdt.de [195.8.224.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA81954
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 02:46:06 -0500 (EST)
(envelope-from christof.petig@wtal.de)
Received: from gateway.petig.de (line0321lf.kdt.de [195.8.240.71])
by smtp.kdt.de (8.8.8/8.8.8) with ESMTP id IAA28027;
Tue, 14 Dec 1999 08:45:52 +0100
Received: from wtal.de (christof@[192.168.232.3])
by gateway (8.8.8/8.8.8) with ESMTP id IAA04631;
Tue, 14 Dec 1999 08:40:44 +0100
Sender: christof@to.wtal.de
Message-ID: <38556C3E.B49841E0@wtal.de>
Date: Mon, 13 Dec 1999 22:59:27 +0100
From: Christof Petig <christof.petig@wtal.de>
Organization: Adolf Petig GmbH. & Co. KG
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.7 i586)
X-Accept-Language: de
MIME-Version: 1.0
To: Hiroshi Inoue <Inoue@tpf.co.jp>
CC: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
References: <NDBBIJLOILGIKBGDINDFAEHICBAA.Inoue@tpf.co.jp>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hiroshi Inoue wrote:
Will you put a long tuple into a long logical page(continued multiple
phisical(?) pages) ?
I'm suspicious about the way that allows non-page-formatted page.Anyway it would need a big change around bufmgr/smgr etc.
Could someone estimate the influence/danger before going forward ?
I planned to use as many of PostgreSQL data structures unaltered as
possible. Storing one Tuple in multiple Items should not pose too much
danger on bufmgr and smgr unless they access tuple internals. (I didn't
check that yet). This would mean that on disk Items do no longer
correspond to Tuples. (Some of them might form one tuple).
I dropped the plan of Unformatted pages very soon. But the issue of
tuple in-memory-storage remains (I don't know the internals of
allocating/freeing, yet).
Christof
From bouncefilter Mon Dec 13 17:25:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA00848
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 17:25:16 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA12687;
Mon, 13 Dec 1999 17:24:39 -0500 (EST)
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
In-reply-to: Your message of Mon, 13 Dec 1999 12:55:21 -0600
<38554119.45082D8@austin.rr.com>
Date: Mon, 13 Dec 1999 17:24:38 -0500
Message-ID: <12685.945123878@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Ed Loehr <ELOEHR@austin.rr.com> writes:
Anyone know what this error is or how to prevent it? Seems to
usually show up on large queries...
"ExecInitIndexScan: both left and right op's are rel-vars"
Sounds like you've found a bug. How about a specific example of
a query that causes this?
regards, tom lane
From bouncefilter Mon Dec 13 17:36:57 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA05265
for <hackers@postgreSQL.org>; Mon, 13 Dec 1999 17:36:25 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA12755;
Mon, 13 Dec 1999 17:35:43 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] Create Group
In-reply-to: Your message of Mon, 13 Dec 1999 21:48:16 +0100 (CET)
<Pine.LNX.4.20.9912132055370.361-101000@localhost.localdomain>
Date: Mon, 13 Dec 1999 17:35:42 -0500
Message-ID: <12753.945124542@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
Now I do
template1=> alter group one add user foo;
NOTICE: Cannot add users to a group, yet.
ALTER USER
/* OK */
template1=> alter group two add user foo;
AlterGroup: Group "two" does not exist.
/* Huh? */
I'll bet you forgot to update the indexes on pg_group. heap_insert is
not sufficient for a table that has indexes; you have to do a little
number that typically looks like (this example from the COMMENT code):
if (RelationGetForm(description)->relhasindex) {
Relation idescs[Num_pg_description_indices];
CatalogOpenIndices(Num_pg_description_indices,
Name_pg_description_indices, idescs);
CatalogIndexInsert(idescs, Num_pg_description_indices, description,
desctuple);
CatalogCloseIndices(Num_pg_description_indices, idescs);
}
Also, why can pg_group not be vacuumed? (pg_shadow can.) With all this
testing, mine is filling up.
Perhaps related, but just out of curiosity: Why is pg_group a system
relatation (pg_class.relkind='s')?
That seems wrong, wrong, wrong --- and it probably explains why VACUUM
won't touch it. 's' is for special relations not system relations, and
pg_group is not special. I'm surprised it works at all...
regards, tom lane
From bouncefilter Mon Dec 13 17:52:58 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA08148
for <hackers@postgreSQL.org>; Mon, 13 Dec 1999 17:52:45 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
RAA12114;
Mon, 13 Dec 1999 17:52:08 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912132252.RAA12114@candle.pha.pa.us>
Subject: Re: [HACKERS] generic LONG VARLENA
In-Reply-To:
<219F68D65015D011A8E000006F8590C603FDC1B8@sdexcsrv1.f000.d0188.sd.spardat.at>
from Zeugswetter Andreas SB at "Dec 13, 1999 02:42:46 pm"
To: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
Date: Mon, 13 Dec 1999 17:52:08 -0500 (EST)
CC: "'hackers@postgresql.org'" <hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset iso-8859-1 unsupported, filtering to ASCII...]
I am excited about the long data type. This is _the_ way to do long
data types. Have any of the commercial databases figured out this way
to do it. I can't imagine a better system.The commercial db's usually make the dba decide on a per column basis
whether the value is stored inside the table or in an extra space
(blobspace,lobspace ...). They all have propietary syntax for this.
(I would probably like it configurabe, whith some reasonable default)
It is usually available for the text/byte and user defined datatypes.
In PostgreSQL the array types come to mind.What I think would be good is, if you could avoid the need for an index on
the _LARGE_.. table.
My Idea would be to store an xtid of the first lob page slot in the user
table,
and have an xtid pointer to the next lob page slot in it, and so on.
That way you could avoid indices on the LARGE table.
SnapshotAny() would also see the correct long, since an updated value would
get a new xtid anyway. No need to use up an extra oid.
You are getting the data in 8k chunks, so it shouldn't be bad. I think
using ctid is overly complex and makes vacuum fragile on that table.
Better to use the tools we have like indexing and the standard tuple
layout code. Custom solutions like ctid are better off only when we see
seriouis performance problems and can't resolve them any other way.
For example, having an expanded tuple cache will give us great speed
improvements.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 13 18:31:59 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA17183
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 18:31:05 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
SAA12650;
Mon, 13 Dec 1999 18:02:54 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912132302.SAA12650@candle.pha.pa.us>
Subject: Re: Followup to my bug report
In-Reply-To: <385530D7.C5951124@amgen.com> from Mark Dalphin at "Dec 13, 1999
09:45:59 am"
To: Mark Dalphin <mdalphin@amgen.com>
Date: Mon, 13 Dec 1999 18:02:54 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
We did discuss this. It seems there is circular dependency about
dumping functions and tables, where some rely on the other. We
discussed this, and the only fix we can think of is to dump the entries
in creation order, using the oid as a guide.
Not sure when we can implement this.
Hi Bruce,
Sorry to bother you personally, but as you are keeper of the "To Do" list, I
thought I would check with you directly rather than clutter up the Postgresql
mail lists.Some time ago I submitted a bug report about PostgreSQL pg_dump. I would forward
you a copy of my e-mail if I could find one.The essence of the report was that the order of the dumped items from pg_dump
made a direct reload (without hand editing the dump) impossible.The case I stumbled on was something like:
CREATE Function MyTimeStamp (what ever);
CREATE TABLE MyTable (
key int PRIMARY KEY,
add_date timestamp DEFAULT MyTimeStamp()
);The problem is that pg_dump dumps the Functions after the Tables, so when
re-loading, the above table definition fails (it doesn't know about the function
MyTimeStamp() at the time of creation).There were no comments about my report at the time I made it, so I was concerned
that the HACKERs may have missed it. With a major release "just now coming", I
thought I should re-port the report.Hope this helps,
Mark--
Mark Dalphin email: mdalphin@amgen.com
Mail Stop: 29-2-A phone: +1-805-447-4951 (work)
One Amgen Center Drive +1-805-375-0680 (home)
Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work)
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 13 18:22:57 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA14036
for <hackers@postgresql.org>; Mon, 13 Dec 1999 18:22:48 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62935 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sJLyf163905>; Tue, 14 Dec 1999 00:22:19 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11xesZ-0001iX-00; Tue, 14 Dec 1999 00:27:43 +0100
Date: Tue, 14 Dec 1999 00:27:43 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: hackers@postgresql.org
Subject: Re: [HACKERS] createdb with alternate location
In-Reply-To: <Pine.LNX.3.96.991213131424.25928B-100000@ara.zf.jcu.cz>
Message-ID: <Pine.LNX.4.20.9912132257550.361-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-13, Karel Zak - Zakkr mentioned:
On Sat, 11 Dec 1999, I wrote:
In my venturing into createdb/dropdb I came to that little artifact that
allows you to create databases at alternate locations using environment
variables as part of the path (CREATE DATABASE elsewhere WITH LOCATION =
'PGDATA2/foo').And what add to create-database management a TABLESPACE layout? It is
standard in any SQL (Oracle). It is good "investment" to future, because
It's not standard in _the_ SQL though.
on TABLESPACE tie storage management ..etc (see old "Raw device" thread
in the hackers list).
I don't know how much use such a generalized version would be vs. the
overhead involved. You can hang on to that thought though, if you like.
I'd like to get this "advertised" feature working first, however.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Mon Dec 13 18:23:59 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA14083
for <hackers@postgresql.org>; Mon, 13 Dec 1999 18:23:00 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63303 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sJLyx167999>; Tue, 14 Dec 1999 00:22:37 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11xesx-0001jd-00
for hackers@postgresql.org; Tue, 14 Dec 1999 00:28:07 +0100
Date: Tue, 14 Dec 1999 00:28:07 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: hackers@postgresql.org
Subject: pg_createuser
Message-ID: <Pine.LNX.4.20.9912132315350.361-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
Just going through the TODO list, at the risk of starting another
heart-breaking discussion, did we not agree to _not_ do this:
* rename 'createuser' to 'pg_createuser', and add 'pg_' to other commands
All the commands that need it (version, dump, id) already have this
prefix, all the other ones have no provable name conflicts, so leave as
is?
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Mon Dec 13 18:24:11 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA14149
for <pgsql-hackers@postgresql.org>;
Mon, 13 Dec 1999 18:23:49 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64178 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sJLzh163911>; Tue, 14 Dec 1999 00:23:25 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11xetf-0001jn-00; Tue, 14 Dec 1999 00:28:51 +0100
Date: Tue, 14 Dec 1999 00:28:50 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] update_pg_pwd
In-Reply-To: <m11xTo1-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.4.20.9912132158050.361-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-13, Jan Wieck mentioned:
I'll make these changes to update_pg_pwd(), now that I know
for sure what it is.One last point though. The comment says it's using lower case
name now to be callable from SQL, what it isn't because of
it's Opaque return type in pg_proc.pgsql=> select update_pg_pwd();
ERROR: typeidTypeRelid: Invalid type - oid = 0Is that a wanted (needed) capability or should I better
change the comment to reflect it's real nature?
Do as you seem fit. I just copied that together from other places. What's
important though, is that this function is also called other places, so if
you make it "trigger fit", then you ought to make it a wrapper around the
real one.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Mon Dec 13 18:32:03 1999
Received: from castle-smtp (firewall-user@ns2.amgen.com [138.133.17.7])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA18018
for <pgsql-hackers@postgresql.org>;
Mon, 13 Dec 1999 18:31:26 -0500 (EST)
(envelope-from mdalphin@amgen.com)
Received: by castle-smtp; id PAA07211; Mon, 13 Dec 1999 15:32:00 -0800 (PST)
Received: from pacific.amgen.com(138.133.10.88) by castle-smtp.amgen.com via
smap (V4.2) id xma007071; Mon, 13 Dec 99 15:31:38 -0800
Received: from mailbag.amgen.com (localhost [127.0.0.1])
by pacific.amgen.com (8.8.8+Sun/8.8.8) with ESMTP id PAA02422;
Mon, 13 Dec 1999 15:30:20 -0700 (MST)
Received: from maat.amgen.com (maat [138.133.145.25])
by mailbag.amgen.com (8.8.5/8.8.5) with ESMTP id PAA11957;
Mon, 13 Dec 1999 15:30:55 -0800 (PST)
Received: from amgen.com (mahunui [138.133.147.23])
by maat.amgen.com (8.8.8+Sun/8.8.8) with ESMTP id PAA17097;
Mon, 13 Dec 1999 15:30:56 -0800 (PST)
Sender: mdalphin@amgen.com
Message-ID: <3855821A.ADE6ECA0@amgen.com>
Date: Mon, 13 Dec 1999 15:32:42 -0800
From: Mark Dalphin <mdalphin@amgen.com>
Organization: Amgen, Inc.
X-Mailer: Mozilla 4.6C-SGI [en] (X11; U; IRIX64 6.5 IP30)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgreSQL.org
Subject: Re: Followup to my bug report
References: <199912132302.SAA12650@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hmmm, I thought I had tested for that. It seemed to me that functions were evaluated
at run-time, so any reference in a function to a table would not be noticed until
that function was actually called (this is for PL/pgsql where I know that even stupid
syntax errors are not caught until run-time). The SQL parser, however, does check
that the function exists before one can create the table...
Thank you for following up on this.
Mark
Bruce Momjian wrote:
We did discuss this. It seems there is circular dependency about
dumping functions and tables, where some rely on the other. We
discussed this, and the only fix we can think of is to dump the entries
in creation order, using the oid as a guide.Not sure when we can implement this.
Hi Bruce,
Sorry to bother you personally, but as you are keeper of the "To Do" list, I
thought I would check with you directly rather than clutter up the Postgresql
mail lists.Some time ago I submitted a bug report about PostgreSQL pg_dump. I would forward
you a copy of my e-mail if I could find one.The essence of the report was that the order of the dumped items from pg_dump
made a direct reload (without hand editing the dump) impossible.The case I stumbled on was something like:
CREATE Function MyTimeStamp (what ever);
CREATE TABLE MyTable (
key int PRIMARY KEY,
add_date timestamp DEFAULT MyTimeStamp()
);The problem is that pg_dump dumps the Functions after the Tables, so when
re-loading, the above table definition fails (it doesn't know about the function
MyTimeStamp() at the time of creation).There were no comments about my report at the time I made it, so I was concerned
that the HACKERs may have missed it. With a major release "just now coming", I
thought I should re-port the report.Hope this helps,
Mark--
Mark Dalphin email: mdalphin@amgen.com
Mail Stop: 29-2-A phone: +1-805-447-4951 (work)
One Amgen Center Drive +1-805-375-0680 (home)
Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work)-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
--
Mark Dalphin email: mdalphin@amgen.com
Mail Stop: 29-2-A phone: +1-805-447-4951 (work)
One Amgen Center Drive +1-805-375-0680 (home)
Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work)
From bouncefilter Mon Dec 13 19:03:58 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA26459
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 19:03:55 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA14246;
Mon, 13 Dec 1999 19:00:50 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912140000.TAA14246@candle.pha.pa.us>
Subject: Re: [HACKERS] update_pg_pwd
In-Reply-To: <12122.945108163@sss.pgh.pa.us> from Tom Lane at "Dec 13,
1999 01:02:43 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 13 Dec 1999 19:00:49 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, peter_e@gmx.net, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
wieck@debis.com (Jan Wieck) writes:
I don't really like the description of these functions as returning
something "OPAQUE", anyway, particularly when that is already being
(mis) used for user-defined type input/output functions. I wish
they were declared as returning something like "TUPLE".Yes, that would clearly separate trigger proc's from
functions. And for unused arguments I would suggest VOID.But I expect (hope), you want to do this all during the fmgr
redesign, not right now, no?Yes, this ought to go along with fmgr changes, probably. But I'm still
unhappy about the idea of doing all these updates for long values to
varlena datatypes without doing the fmgr update at the same time.I have been thinking some more about the schedule issue, and I still
think it's foolhardy to try to do the long-values change by Feb 1.
If you recall, that date was set on the assumption that we were only
going to clean up what we had before making the release, not insert
major new features.
The scheme followed in previous releases was to put in features just
before beta with little testing, because you can fix bugs in beta, but
not add new features. I know I did that trick a few times.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 13 19:12:58 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA27430
for <hackers@postgreSQL.org>; Mon, 13 Dec 1999 19:12:36 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA16830;
Mon, 13 Dec 1999 19:12:08 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912140012.TAA16830@candle.pha.pa.us>
Subject: Re: [HACKERS] pg_createuser
In-Reply-To: <Pine.LNX.4.20.9912132315350.361-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 14, 1999 00:28:07 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Mon, 13 Dec 1999 19:12:08 -0500 (EST)
CC: hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
Just going through the TODO list, at the risk of starting another
heart-breaking discussion, did we not agree to _not_ do this:* rename 'createuser' to 'pg_createuser', and add 'pg_' to other commands
All the commands that need it (version, dump, id) already have this
prefix, all the other ones have no provable name conflicts, so leave as
is?
Removed from TODO list.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 13 21:02:02 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA51113
for <pgsql-hackers@postgresql.org>;
Mon, 13 Dec 1999 21:01:16 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA22211;
Mon, 13 Dec 1999 20:56:35 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912140156.UAA22211@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG
In-Reply-To: <m11xOws-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 13, 1999 07:27:06 am"
To: Jan Wieck <wieck@debis.com>
Date: Mon, 13 Dec 1999 20:56:35 -0500 (EST)
CC: tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
This outline is perfect!
I am suggesting the longoid is not the oid of the primary or long*
table, but a unque id we assigned just to number all parts of the long*
tuple. I thought that's what your oid was for.It's not even an Oid of any existing tuple, just an
identifier to quickly find all the chunks of one LONG value
by (non-unique) index.
Yes, I understood this and I think it is a great idea. It allows UPDATE
to control whether it wants to replace the LONG value.
My idea is this now:
The schema of the expansion relation is
value_id Oid
chunk_seq int32
chunk_data textwith a non unique index on value_id.
Yes, exactly.
We change heap_formtuple(), heap_copytuple() etc. not to
allocate the entire thing in one palloc(). Instead the tuple
portion itself is allocated separately and the current memory
context remembered too in the HeapTuple struct (this is
required below).
I read the later part. I understand.
The long value reference in a tuple is defined as:
vl_len int32; /* high bit set, 32-bit = 18 */
vl_datasize int32; /* real vl_len of long value */
vl_valueid Oid; /* value_id in expansion relation */
vl_relid Oid; /* Oid of "expansion" table */
vl_rowid Oid; /* Oid of the row in "primary" table */
vl_attno int16; /* attribute number in "primary" table */
I see you need vl_rowid and vl_attno so you don't accidentally reference
a LONG value twice. Good point. I hadn't thought of that.
The tuple given to heap_update() (the most complex one) can
now contain usual VARLENA values of the formathigh-bit=0|31-bit-size|data
or if the value is the result of a scan eventually
high-bit=1|31-bit=18|datasize|valueid|relid|rowid|attno
Now there are a couple of different cases.
1. The value found is a plain VARLENA that must be moved
off.To move it off a new Oid for value_id is obtained, the
value itself stored in the expansion relation and the
attribute in the tuple is replaced by the above structure
with the values 1, 18, original VARSIZE(), value_id,
"expansion" relid, "primary" tuples Oid and attno.2. The value found is a long value reference that has our
own "expansion" relid and the correct rowid and attno.
This would be the result of an UPDATE without touching
this long value.Nothing to be done.
3. The value found is a long value reference of another
attribute, row or relation and this attribute is enabled
for move off.The long value is fetched from the expansion relation it
is living in, and the same as for 1. is done with that
value. There's space for optimization here, because we
might have room to store the value plain. This can happen
if the operation was an INSERT INTO t1 SELECT FROM t2,
where t1 has few small plus one varsize attribute, while
t2 has many, many long varsizes.4. The value found is a long value reference of another
attribute, row or relation and this attribute is disabled
for move off (either per column or because our relation
does not have an expansion relation at all).The long value is fetched from the expansion relation it
is living in, and the reference in our tuple is replaced
with this plain VARLENA.
Yes.
This in place replacement of values in the main tuple is the
reason, why we have to make another allocation for the tuple
data and remember the memory context where made. Due to the
above process, the tuple data can expand, and we then need to
change into that context and reallocate it.
Yes, got it.
What heap_update() further must do is to examine the OLD
tuple (that it already has grabbed by CTID for header
modification) and delete all long values by their value_id,
that aren't any longer present in the new tuple.
Yes, makes vacuum run find on the LONG* relation.
The VARLENA arguments to type specific functions now can also
have both formats. The macro#define VAR_GETPLAIN(arg) \
(VARLENA_ISLONG(arg) ? expand_long(arg) : (arg))can be used to get a pointer to an allways plain
representation, and the macro#define VAR_FREEPLAIN(arg,userptr) \
if (arg != userptr) pfree(userptr);is to be used to tidy up before returning.
Got it.
In this scenario, a function like smaller(text,text) would
look liketext *
smaller(text *t1, text *t2)
{
text *plain1 = VAR_GETPLAIN(t1);
text *plain2 = VAR_GETPLAIN(t2);
text *result;if ( /* whatever to compare plain1 and plain2 */ )
result = t1;
else
result = t2;VAR_FREEPLAIN(t1,plain1);
VAR_FREEPLAIN(t2,plain2);return result;
}
Yes.
The LRU cache used in expand_long() will the again and again
expansion become cheap enough. The benefit would be, that
huge values resulting from table scans will be passed around
in the system (in and out of sorting, grouping etc.) until
they are modified or really stored/output.
Yes.
And the LONG index stuff should be covered here already (free
lunch)! Index_insert() MUST allways be called after
heap_insert()/heap_update(), because it needs the there
assigned CTID. So at that time, the moved off attributes are
replaced in the tuple data by the references. These will be
stored instead of the values that originally where in the
tuple. Should also work with hash indices, as long as the
hashing functions use VAR_GETPLAIN as well.
I hoped this would be true. Great.
If we want to use auto compression too, no problem. We code
this into another bit of the first 32-bit vl_len. The
question if to call expand_long() changes now to "is one of
these set". This way, we can store both, compressed and
uncompressed into both, "primary" tuple or "expansion"
relation. expand_long() will take care for it.
Perfect. Sounds great.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 13 21:02:00 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA51276
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 21:01:18 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA22328;
Mon, 13 Dec 1999 20:59:38 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912140159.UAA22328@candle.pha.pa.us>
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
In-Reply-To: <3850299F.C86DEFD6@wtal.de> from Christof Petig at "Dec 9, 1999
11:13:51 pm"
To: Christof Petig <christof.petig@wtal.de>
Date: Mon, 13 Dec 1999 20:59:38 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Thanks. Seems like Jan is going to be doing this.
Hello,
I'll donate some (read all freely available) of my spare time to
implementing tuple
chaining. It looks like this feature is most wanted and it would be a
pity to hold this until post 7.0. Personally I don't need it, yet ...
But I will definitely find a use for it once available ;-) And it looks
like a good start for hacking on pgsql.I already dived into the depth of pgsql's page and tuple structures and
it looks like it is possible. But before I start coding I would like to
hear some more experienced opinions on how to implement it.Did you alread discuss technical matters about the implementation? How
can I get in touch with it? (Simply browse the mailing list archives?)Here's a layout how I imagine the work:
What is needed:
- lay out a tuple continuation structure
- put tuple into multiple chunks when pages are considered, reconcile
when
loaded from disk
(how to continue a tuple - need a structure)
how is a tuple (read page item) addressed? ItemPointerData
I imagine to store a continuation address as the last bytes of the
tuple unless it
fits into one page.
I need to mark large tuples (how, just one flag in tuple)
How to tell a maximum possible size last block from a continued
(which carries a pointer to the next one at its end)?
Or don't care: make item continued and put last 6(?) bytes into a new
block
- note that the continued tuples are not referenced directly (vacuum?)
mark them as used. I hope vacuum operates on a tuple basis and has no
concept of
pages
- I guess that the tuple pointer points into page memory, if multiple
pages
are concatenated for a tuple, these pages must not reside in memory
but
the full tuple's memory must be allocated (from a memory similar to
pages)
(shared mem?)
- should be possible for memory only pages
see PageGetPageSize but od_pagesize is 16bit!
Reuse another variable? Another type of page? (32bit od_pagesize)Very fascinated by this large beast of ancient code to explore
ChristofPS: I think the documentation on page layout is far outdated (or points
into the future since it speaks about ItemContinuationData structures.)
Should I update it?
The table doesn't match actual structure components. At least I don't
understand what it's about. The source code mentions a different page
layout.PPS: Do not pity me, I have ten+ years of coding experience in C.
PPPS: Could someone in few words tell me what an access method is (a
tuple is an access method, log pages are another?)************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 13 22:14:00 1999
Received: from sunpine.krs.ru (SunPine.krs.ru [195.161.16.37])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA65920
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 22:13:07 -0500 (EST) (envelope-from vadim@krs.ru)
Received: from krs.ru (dune.krs.ru [195.161.16.38])
by sunpine.krs.ru (8.8.8/8.8.8) with ESMTP id KAA15223;
Tue, 14 Dec 1999 10:12:42 +0700 (KRS)
Sender: root@sunpine.krs.ru
Message-ID: <3855B5A9.C8D2E954@krs.ru>
Date: Tue, 14 Dec 1999 10:12:41 +0700
From: Vadim Mikheev <vadim@krs.ru>
Organization: OJSC Rostelecom (Krasnoyarsk)
X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-RELEASE i386)
X-Accept-Language: ru, en
MIME-Version: 1.0
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
CC: The Hermit Hacker <scrappy@hub.org>,
Bruce Momjian <pgman@candle.pha.pa.us>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
References: <Pine.BSF.4.21.9912101321390.500-100000@thelab.hub.org>
<38513B2D.3F132547@alumni.caltech.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Thomas Lockhart wrote:
Good things are being said about us, and people are noticing that the
product has improved from v6.0 to v6.5. We don't need to be at v11.0
to get noticed; in fact it may look a little silly...
Agreed again! I would be happy with 6.X up to 6.9 -:)
Vadim
From bouncefilter Mon Dec 13 22:28:00 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA67226
for <pgsql-hackers@postgreSQL.org>;
Mon, 13 Dec 1999 22:27:07 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id XAA63446;
Mon, 13 Dec 1999 23:24:05 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Mon, 13 Dec 1999 23:24:05 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Vadim Mikheev <vadim@krs.ru>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Bruce Momjian <pgman@candle.pha.pa.us>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <3855B5A9.C8D2E954@krs.ru>
Message-ID: <Pine.BSF.4.21.9912132322590.74675-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 14 Dec 1999, Vadim Mikheev wrote:
Thomas Lockhart wrote:
Good things are being said about us, and people are noticing that the
product has improved from v6.0 to v6.5. We don't need to be at v11.0
to get noticed; in fact it may look a little silly...Agreed again! I would be happy with 6.X up to 6.9 -:)
At an ~2year development cycle for each major, it would take us ~6 years
to attain v10...I think we are safe :)
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Mon Dec 13 23:20:01 1999
Received: from netrinsics.com ([202.106.211.206])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA79287
for <pgsql-hackers@hub.org>; Mon, 13 Dec 1999 23:19:46 -0500 (EST)
(envelope-from robinson@netrinsics.com)
Received: (from robinson@localhost) by netrinsics.com (8.9.3/8.8.7) id
MAA04823
for pgsql-hackers@hub.org; Tue, 14 Dec 1999 12:20:21 +0800 (CST)
(envelope-from robinson)
Date: Tue, 14 Dec 1999 12:20:21 +0800 (CST)
From: Michael Robinson <robinson@netrinsics.com>
Message-Id: <199912140420.MAA04823@netrinsics.com>
To: pgsql-hackers@hub.org
Subject: Re: [HACKERS] Datatype MONEY
wieck@debis.com (Jan Wieck) writes:
In some countries (Germany at least) storage of financial
booking information is not permitted to use floats. And you
aren't allowed to use it for calculation of taxes etc.,
instead you must use some datatype with a fixable number of
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
digits after the decimal point.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*AND* with correct rounding behavior for the least significant digit
(which may not be displayed, as with the U.S. "mil"--one tenth of a
cent).
-Michael Robinson
P.S. I like the idea of a money type with an internal field for the ISO
currency type. For all my current applications I have to break that out
as a separate char(3) field (USD, HKD, JPY, RMB, etc.).
From bouncefilter Tue Dec 14 02:32:05 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA80023
for <hackers@postgreSQL.org>; Tue, 14 Dec 1999 02:31:29 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id HAA00680;
Tue, 14 Dec 1999 07:35:43 GMT
Sender: lockhart@hub.org
Message-ID: <3855F34F.9B30308E@alumni.caltech.edu>
Date: Tue, 14 Dec 1999 07:35:43 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Gunther Schadow <gunther@aurora.rg.iupui.edu>
CC: "hackers@postgreSQL.org" <hackers@postgreSQL.org>
Subject: Re: [HACKERS] UNICODE characters vs. BINARY
References: <38528AD6.B186C0B7@aurora.rg.iupui.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
A related question is whether we could support some more
standard names for data types (e.g., BIGINT, SMALLINT, etc.)
But I'm not sure there is really any standard. I would be
willing to work a little on these data types but I'd need
someone to hint me on who else is doing stuff and, if possible,
where to look first (and what known mistakes to avoid.)
postgres=> create table x (i smallint);
CREATE
postgres=> create table y (j bigint);
ERROR: Unable to locate type name 'bigint' in catalog
afaik we support the type names defined in SQL92 (like smallint),
historical names in Postgres, and some extensions. What more do we
need?
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Tue Dec 14 03:55:04 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA95473
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 03:54:58 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id RAA25851
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 17:54:56 +0900 (JST)
Received: from localhost (IDENT:t-ishii@srapc968-yotsuya [133.137.36.133])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id RAA27818
for <pgsql-hackers@postgresql.org>; Tue, 14 Dec 1999 17:54:55 +0900
To: pgsql-hackers@postgresql.org
Subject: Questionable codes
X-Mailer: Mew version 1.94 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991214175454Y.t-ishii@sra.co.jp>
Date: Tue, 14 Dec 1999 17:54:54 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 990905(IM130)
Lines: 20
I have found a few questionable codings. I'm not sure if it really
hurts anything. Suggestions are welcome.
1) in storage/lmgr/lock.c: LockShmemSize()
size += MAXALIGN(maxBackends * sizeof(PROC)); /* each MyProc */
size += MAXALIGN(maxBackends * sizeof(LOCKMETHODCTL)); /* each
shouldn't be:
size += maxBackends * MAXALIGN(sizeof(PROC)); /* each MyProc */
size += maxBackends * MAXALIGN(sizeof(LOCKMETHODCTL)); /* each
2) in utils/hash/dynahash.c:hash_search():
Assert(saveState.currElem && !(saveState.currElem = 0));
Does anybody know what it is for?
--
Tatsuo Ishii
From bouncefilter Tue Dec 14 03:55:05 1999
Received: from sd.tpf.co.jp (mail.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA95426
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 03:54:09 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id RAA03163; Tue, 14 Dec 1999 17:53:57 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Christof Petig" <christof.petig@wtal.de>
Cc: <pgsql-hackers@postgresql.org>
Subject: RE: [HACKERS] Volunteer: Large Tuples / Tuple chaining
Date: Tue, 14 Dec 1999 17:58:57 +0900
Message-ID: <001801bf4611$74dd1ee0$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <38556C3E.B49841E0@wtal.de>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
-----Original Message-----
From: christof@to.wtal.de [mailto:christof@to.wtal.de]On Behalf Of
Christof PetigHiroshi Inoue wrote:
Will you put a long tuple into a long logical page(continued multiple
phisical(?) pages) ?
I'm suspicious about the way that allows non-page-formatted page.Anyway it would need a big change around bufmgr/smgr etc.
Could someone estimate the influence/danger before going forward ?I planned to use as many of PostgreSQL data structures unaltered as
possible. Storing one Tuple in multiple Items should not pose too much
danger on bufmgr and smgr unless they access tuple internals. (I didn't
check that yet). This would mean that on disk Items do no longer
correspond to Tuples. (Some of them might form one tuple).
Hmm,we have discussed about LONG.
Change by LONG is transparent to users and would resolve
the big tuple problem mostly.
I'm suspicious that tuple chaining is worth the work now.
At least a consensus is needed before going,I think.
Bad design would only introduce a confusion.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Tue Dec 14 04:40:04 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA05110
for <hackers@postgresql.org>; Tue, 14 Dec 1999 04:39:33 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id KAA39750;
Tue, 14 Dec 1999 10:39:31 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <YFC9CW92>; Tue, 14 Dec 1999 10:39:32 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1BC@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'hackers@postgresql.org'" <hackers@postgresql.org>
Cc: "'Peter Eisentraut'" <peter_e@gmx.net>
Subject: Re: [HACKERS] Create Group
Date: Tue, 14 Dec 1999 10:39:29 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
First, the syntax I had in mind:
CREATE GROUP name [ WITH [ SYSID id ] [ USER name1, name2, ... ] ]
ALTER GROUP name WITH SYSID id /* changes sysid */
ALTER GROUP name ADD USER name1, name2, ...
ALTER GROUP name DROP USER name1, name2, ...
DROP GROUP namePlease protest now or hold your peace for at least one release. :)
I think a group can be interpreted somehow like a priviledge.
As such the statement to add or remove a user from a group
would be a "grant" statement.
The standard mutters something about "role"s
(again haven't looked it up)
I don't like the word role instead of group, but maybe if there
is a standard we should use it.
Informix and Oracle use the keyword role for groups,
and use grant/revoke to administer them.
Andreas
From bouncefilter Tue Dec 14 05:06:05 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA11411
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 05:05:08 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id LAA53168
for <pgsql-hackers@postgreSQL.org>; Tue, 14 Dec 1999 11:05:06 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <YFC9CXDR>; Tue, 14 Dec 1999 11:05:06 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1BD@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: AW: [HACKERS] Volunteer: Large Tuples / Tuple chaining
Date: Tue, 14 Dec 1999 11:05:05 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
Hmm,we have discussed about LONG.
Change by LONG is transparent to users and would resolve
the big tuple problem mostly.
I'm suspicious that tuple chaining is worth the work now.
All commercial db's I know allow at least 32kb tuples,
they all do it with chaining, because they usually have a
smaller (often configurable) pagesize.
Imho it is definitely worth it.
Andreas
From bouncefilter Tue Dec 14 05:46:05 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id FAA17401
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 05:45:17 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 20678 invoked by uid 1001); 14 Dec 1999 10:45:17 -0000
Date: Tue, 14 Dec 1999 05:45:17 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: The Hermit Hacker <scrappy@hub.org>,
Bruce Momjian <pgman@candle.pha.pa.us>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <38513B2D.3F132547@alumni.caltech.edu>
Message-ID: <Pine.BSF.4.05.9912140541410.20615-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 10 Dec 1999, Thomas Lockhart wrote:
imo the *only* reason we are tempted to do more major releases is that
we are too lazy/understaffed/sensible (you pick it) to support
multiple db formats for our compiled code. Other commercial DBs don't
release often, and they don't include big improvements, but they *do*
include support for multiple db formats/schemas in their product, so
you aren't forced into an initdb for each release. Instead they
include klugy workaround code to allow reading older formats with the
newer version.
Then why don't we come up with something to autoconvert the user's
databases without having to dump/initdb/reload? Or is that just
not feasable (impossible's an answer I'd find hard to believe, but
more trouble than it's worth is understandable).
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null
# include <std/disclaimers.h> Have you seen http://www.pop4.net?
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Tue Dec 14 05:52:05 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA18016
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 05:51:28 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from tpf.co.jp ([126.0.1.56] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with ESMTP
id TAA03227; Tue, 14 Dec 1999 19:50:06 +0900
Message-ID: <385620EF.2AF3FCB@tpf.co.jp>
Date: Tue, 14 Dec 1999 19:50:23 +0900
From: Hiroshi Inoue <Inoue@tpf.co.jp>
X-Mailer: Mozilla 4.51 [ja] (Win98; I)
X-Accept-Language: ja
MIME-Version: 1.0
To: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
CC: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: Re: AW: [HACKERS] Volunteer: Large Tuples / Tuple chaining
References:
<219F68D65015D011A8E000006F8590C603FDC1BD@sdexcsrv1.f000.d0188.sd.spardat.at>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Zeugswetter Andreas SB wrote:
Hmm,we have discussed about LONG.
Change by LONG is transparent to users and would resolve
the big tuple problem mostly.
I'm suspicious that tuple chaining is worth the work now.All commercial db's I know allow at least 32kb tuples,
they all do it with chaining, because they usually have a
smaller (often configurable) pagesize.
Imho it is definitely worth it.
There would be few cases > 8K tuples after LONG was implemented.
And tuple chaining is much difficult to implement than LONG.
If it is badly designed it would be a disaster.
Is it still worth doing now ?
At least the design must be verified sufficiently before going.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Tue Dec 14 06:13:05 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id GAA23400
for <hackers@postgresql.org>; Tue, 14 Dec 1999 06:12:38 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Pingvin.DoCS.UU.SE (e99re41@Pingvin.DoCS.UU.SE [130.238.9.118])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id MAA27634;
Tue, 14 Dec 1999 12:12:36 +0100
Received: from localhost (e99re41@localhost) by Pingvin.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id MAA24595;
Tue, 14 Dec 1999 12:12:34 +0100
X-Authentication-Warning: Pingvin.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Tue, 14 Dec 1999 12:12:33 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
cc: "'hackers@postgresql.org'" <hackers@postgresql.org>
Subject: Re: [HACKERS] Create Group
In-Reply-To:
<219F68D65015D011A8E000006F8590C603FDC1BC@sdexcsrv1.f000.d0188.sd.spardat.at>
Message-ID: <Pine.GSO.4.02A.9912141209160.24573-100000@Pingvin.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 14 Dec 1999, Zeugswetter Andreas SB wrote:
CREATE GROUP name [ WITH [ SYSID id ] [ USER name1, name2, ... ] ]
ALTER GROUP name WITH SYSID id /* changes sysid */
ALTER GROUP name ADD USER name1, name2, ...
ALTER GROUP name DROP USER name1, name2, ...
DROP GROUP name
I think a group can be interpreted somehow like a priviledge.
As such the statement to add or remove a user from a group
would be a "grant" statement.
Not really, at least not in our context. A group is a collection
("group") of users which can collectively be granted privileges. For
example, you can do grant select on your_table to group staff (even right
now).
The standard mutters something about "role"s
(again haven't looked it up)
I don't like the word role instead of group, but maybe if there
is a standard we should use it.Informix and Oracle use the keyword role for groups,
and use grant/revoke to administer them.
I suppose they have a slightly different underlying philosposhy then.
PostgreSQL already uses "group" all over the place, this is just a logical
extension which was missing.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Tue Dec 14 06:17:05 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id GAA24061
for <hackers@postgresql.org>; Tue, 14 Dec 1999 06:16:37 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id MAA143644;
Tue, 14 Dec 1999 12:16:30 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <YFC9CX4L>; Tue, 14 Dec 1999 12:16:30 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1BE@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'Peter Eisentraut'" <peter_e@gmx.net>
Cc: "'hackers@postgresql.org'" <hackers@postgresql.org>
Subject: AW: [HACKERS] Create Group
Date: Tue, 14 Dec 1999 12:16:24 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="windows-1252"
CREATE GROUP name [ WITH [ SYSID id ] [ USER name1, name2, ... ] ]
ALTER GROUP name WITH SYSID id /* changes sysid */
ALTER GROUP name ADD USER name1, name2, ...
ALTER GROUP name DROP USER name1, name2, ...
DROP GROUP nameI think a group can be interpreted somehow like a priviledge.
As such the statement to add or remove a user from a group
would be a "grant" statement.Not really, at least not in our context. A group is a collection
("group") of users which can collectively be granted privileges. For
example, you can do grant select on your_table to group staff
(even right
now).
At least Informix and Oracle see it that way (and call it role).
The functionality is the same.
Andreas
From bouncefilter Tue Dec 14 09:18:08 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA62885
for <hackers@postgresql.org>; Tue, 14 Dec 1999 09:17:18 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id OAA01184;
Tue, 14 Dec 1999 14:21:35 GMT
Sender: lockhart@hub.org
Message-ID: <3856526F.F0742344@alumni.caltech.edu>
Date: Tue, 14 Dec 1999 14:21:35 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Eisentraut <peter_e@gmx.net>
CC: Postgres Hackers List <hackers@postgresql.org>
Subject: Re: [PATCHES] createdb/dropdb fixes
References: <Pine.LNX.4.20.9912120014590.6044-102000@localhost.localdomain>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
All I really wanted to do is fix TODO item
* database names with spaces fail
but that is already taken care of, they work fine. Please check it off.
Meanwhile, database names with single quotes in names don't work very well
at all, and because of shell quoting rules this can't be fixed, so I put
in error messages to that end.
That seems to be a bit heavy handed; why bother disallowing things in
the backend because some (small number of) shell-based tools have
trouble as clients? I'd prefer filtering that at the client end, and
allowing capable clients to do whatever they please.
There is a related issue which afaik no one has addressed yet: the
permissions ACLs are stored as a string with a format like
"accountname=permissions" (doing this from memory, so the details may
be wrong) but with quoting allowed for table names and user names one
could embed an equals sign into an account or group name and muck with
permissions. I haven't looked at the code in a long time, but was
thinking about recoding ACLs as a two-field type to enforce an
unambigous interpretation of the two fields. Interested??
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Tue Dec 14 09:31:08 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA67326
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 09:30:31 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id OAA01197;
Tue, 14 Dec 1999 14:34:33 GMT
Sender: lockhart@hub.org
Message-ID: <38565579.DF80ACF0@alumni.caltech.edu>
Date: Tue, 14 Dec 1999 14:34:33 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Eisentraut <peter_e@gmx.net>
CC: Tom Lane <tgl@sss.pgh.pa.us>, Vince Vielhaber <vev@michvhf.com>,
pgsql-hackers@postgreSQL.org, Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] libpq questions...when threads collide
References: <Pine.GSO.4.02A.9912131200020.8544-100000@Panter.DoCS.UU.SE>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Either we should keep the current docs
or the release docs online - not both.I disagree, because they serve different audiences. The snapshot docs
are very useful to developers, particularly those of us who don't have
SGML tools installed but still want to know whether the docs we
committed recently look right or not ;-). Meanwhile, current-release
documents are clearly the right thing to provide for ordinary users.
Vince, I'm with Tom on this one, having both would be great. The
"developer's only" posting is a holdover from the first days when we
could generate docs on the Postgres machine, and I only had one place
on the web page I could put docs. But having the release docs posted
from the "Documentation" page and the current tree docs posted either
there or on the "Developers" page would be great. I'm happy to
redirect my nightly cron job to put the output somewhere other than
where they are now.
Um, you mean you commit docs before you know whether they even "compile"?
As I see it, if you want to edit the docs, you should test them with your
own SGML tools. With recent sgmltools packages, this is not so hard. At
least the patch applicator hopefully does this.
No, testing doc output has never been a prerequisite for submitting
and committing doc improvements/updates. If the submitted sgml code is
a bit wrong, the nightly cron job halts in the middle and the output
tar files and web page copies don't get updated. I see the results in
the cron output I have sent to my home machine, and usually fix the
problem within a day or two (would be longer recently since I'm so
busy, but the scheme still is working...).
The important thing is getting the words updated in the docs, and
running jade or the SGML-tools wrappers is still too much of a barrier
if it were a prerequisite.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Tue Dec 14 09:38:08 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id JAA69013
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 09:37:21 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 21179 invoked by uid 1001); 14 Dec 1999 14:37:23 -0000
Date: Tue, 14 Dec 1999 09:37:23 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Peter Eisentraut <peter_e@gmx.net>, Tom Lane <tgl@sss.pgh.pa.us>,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] libpq questions...when threads collide
In-Reply-To: <38565579.DF80ACF0@alumni.caltech.edu>
Message-ID: <Pine.BSF.4.05.9912140934120.21053-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 14 Dec 1999, Thomas Lockhart wrote:
Either we should keep the current docs
or the release docs online - not both.I disagree, because they serve different audiences. The snapshot docs
are very useful to developers, particularly those of us who don't have
SGML tools installed but still want to know whether the docs we
committed recently look right or not ;-). Meanwhile, current-release
documents are clearly the right thing to provide for ordinary users.Vince, I'm with Tom on this one, having both would be great. The
"developer's only" posting is a holdover from the first days when we
could generate docs on the Postgres machine, and I only had one place
on the web page I could put docs. But having the release docs posted
from the "Documentation" page and the current tree docs posted either
there or on the "Developers" page would be great. I'm happy to
redirect my nightly cron job to put the output somewhere other than
where they are now.
No problem, I'll come up with a developer's section. I need to make it
as obvious as possible or as obscure as possible to keep the webmaster
mailbox from overflowing. I'll let you know 'cuze it'll also affect
the search engine. Hopefully in the next week, otherwise it won't happen
till the next century :)
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Tue Dec 14 10:08:10 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA76250
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 10:07:47 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id PAA01339;
Tue, 14 Dec 1999 15:54:11 +0100
Date: Tue, 14 Dec 1999 15:54:10 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Jan Wieck <wieck@debis.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Datatype MONEY
In-Reply-To: <m11xWpt-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.3.96.991214154001.862A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 13 Dec 1999, Jan Wieck wrote:
text *numeric_to_char(Numeric num, format text)
{
char *numstr;
int32 scale;... /* calculate the wanted number of digits */
... /* after DP in scale depending on format */numstr = numeric_out(numeric_round(num, scale));
}There will be "scale" number of digits after the DP, which is
missing if scale is zero. The value will be correct rouded
and/or zero padded at the end.Wouldn't that be enough for you?
My answer :-)
test=> select numeric_to_char(545454.98, '"der Preis: "L999G999D99');
numeric_to_char
------------------------
der Preis: DM 545.454,98
(1 row)
Well, you must work on the string only and cannot read it
into a float internally, but with the above preprocessing, it
should be fairly simple.
Yes, I good understend your previous letter(s). Formatting routine in
to_char() is independent on datetype and for all use string.
(IMHO numeric is very interesting type and not has 16-decimal limitation as
float8, it is good, good, good...
Again Thank!
Karel
----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------
From bouncefilter Tue Dec 14 11:56:42 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA01735
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 11:55:43 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA18864
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 11:26:26 -0500 (EST)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA15566;
Tue, 14 Dec 1999 11:23:24 -0500 (EST)
To: Tatsuo Ishii <t-ishii@sra.co.jp>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Questionable codes
In-reply-to: Your message of Tue, 14 Dec 1999 17:54:54 +0900
<19991214175454Y.t-ishii@sra.co.jp>
Date: Tue, 14 Dec 1999 11:23:24 -0500
Message-ID: <15564.945188604@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
I have found a few questionable codings. I'm not sure if it really
hurts anything. Suggestions are welcome.
1) in storage/lmgr/lock.c: LockShmemSize()
size += MAXALIGN(maxBackends * sizeof(PROC)); /* each MyProc */
size += MAXALIGN(maxBackends * sizeof(LOCKMETHODCTL)); /* each
shouldn't be:
size += maxBackends * MAXALIGN(sizeof(PROC)); /* each MyProc */
size += maxBackends * MAXALIGN(sizeof(LOCKMETHODCTL)); /* each
Probably, but I'm not sure it really makes any difference. We add on
10% or so slop after we've finished adding up all these numbers, anyway
;-)
2) in utils/hash/dynahash.c:hash_search():
Assert(saveState.currElem && !(saveState.currElem = 0));
Does anybody know what it is for?
That's part of that horribly ugly, non-reentrant HASH_REMOVE_SAVED
interface, isn't it? I have a to-do item to rip that code out and
replace it with a more reasonable design ... in the meantime, I don't
think it much matters whether the Assert could be tightened up ...
regards, tom lane
From bouncefilter Tue Dec 14 11:56:39 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA01732
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 11:55:42 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA19483
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 11:34:18 -0500 (EST)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA14511;
Tue, 14 Dec 1999 11:25:10 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912141625.LAA14511@candle.pha.pa.us>
Subject: Re: [HACKERS] Questionable codes
In-Reply-To: <19991214175454Y.t-ishii@sra.co.jp> from Tatsuo Ishii at "Dec 14,
1999 05:54:54 pm"
To: Tatsuo Ishii <t-ishii@sra.co.jp>
Date: Tue, 14 Dec 1999 11:25:10 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I have found a few questionable codings. I'm not sure if it really
hurts anything. Suggestions are welcome.1) in storage/lmgr/lock.c: LockShmemSize()
size += MAXALIGN(maxBackends * sizeof(PROC)); /* each MyProc */
size += MAXALIGN(maxBackends * sizeof(LOCKMETHODCTL)); /* eachshouldn't be:
size += maxBackends * MAXALIGN(sizeof(PROC)); /* each MyProc */
size += maxBackends * MAXALIGN(sizeof(LOCKMETHODCTL)); /* each
Yes, you are correct. The bottom one is better.
2) in utils/hash/dynahash.c:hash_search():
Assert(saveState.currElem && !(saveState.currElem = 0));
Does anybody know what it is for?
No idea.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 14 11:56:45 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA01739
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 11:55:48 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA19606
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 11:35:54 -0500 (EST)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA14553;
Tue, 14 Dec 1999 11:25:40 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912141625.LAA14553@candle.pha.pa.us>
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
In-Reply-To: <001801bf4611$74dd1ee0$2801007e@cadzone.tpf.co.jp> from Hiroshi
Inoue at "Dec 14, 1999 05:58:57 pm"
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Date: Tue, 14 Dec 1999 11:25:40 -0500 (EST)
CC: Christof Petig <christof.petig@wtal.de>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I planned to use as many of PostgreSQL data structures unaltered as
possible. Storing one Tuple in multiple Items should not pose too much
danger on bufmgr and smgr unless they access tuple internals. (I didn't
check that yet). This would mean that on disk Items do no longer
correspond to Tuples. (Some of them might form one tuple).Hmm,we have discussed about LONG.
Change by LONG is transparent to users and would resolve
the big tuple problem mostly.
I'm suspicious that tuple chaining is worth the work now.At least a consensus is needed before going,I think.
Bad design would only introduce a confusion.
Agreed.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 14 11:56:53 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA01804
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 11:56:19 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA19464
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 11:33:59 -0500 (EST)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA14646;
Tue, 14 Dec 1999 11:27:47 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912141627.LAA14646@candle.pha.pa.us>
Subject: Re: [HACKERS] 6.6 release
In-Reply-To: <Pine.BSF.4.05.9912140541410.20615-100000@paprika.michvhf.com>
from Vince Vielhaber at "Dec 14, 1999 05:45:17 am"
To: Vince Vielhaber <vev@michvhf.com>
Date: Tue, 14 Dec 1999 11:27:47 -0500 (EST)
CC: Thomas Lockhart <lockhart@alumni.caltech.edu>,
The Hermit Hacker <scrappy@hub.org>,
Peter Mount <petermount@it.maidstone.gov.uk>,
"'Tom Lane'" <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Fri, 10 Dec 1999, Thomas Lockhart wrote:
imo the *only* reason we are tempted to do more major releases is that
we are too lazy/understaffed/sensible (you pick it) to support
multiple db formats for our compiled code. Other commercial DBs don't
release often, and they don't include big improvements, but they *do*
include support for multiple db formats/schemas in their product, so
you aren't forced into an initdb for each release. Instead they
include klugy workaround code to allow reading older formats with the
newer version.Then why don't we come up with something to autoconvert the user's
databases without having to dump/initdb/reload? Or is that just
not feasable (impossible's an answer I'd find hard to believe, but
more trouble than it's worth is understandable).
System table changes often make that difficult. pg_upgrade does most of
what we want by keeping the disk tables and allowing initdb. If we
don't change the on-disk structure of user tables, pg_upgrade allows
quick upgrades. Not sure 7.0 will allow the use of pg_upgrade. 6.5 did
not because the on-disk table structure changed with MVCC.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 14 12:03:45 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA05904
for <hackers@postgresql.org>; Tue, 14 Dec 1999 12:03:24 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA20474
for <hackers@postgreSQL.org>; Tue, 14 Dec 1999 11:47:10 -0500 (EST)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id LAA15664;
Tue, 14 Dec 1999 11:45:49 -0500 (EST)
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Peter Eisentraut <peter_e@gmx.net>,
Postgres Hackers List <hackers@postgresql.org>
Subject: Re: [HACKERS] Re: [PATCHES] createdb/dropdb fixes
In-reply-to: Your message of Tue, 14 Dec 1999 14:21:35 +0000
<3856526F.F0742344@alumni.caltech.edu>
Date: Tue, 14 Dec 1999 11:45:49 -0500
Message-ID: <15662.945189949@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
Meanwhile, database names with single quotes in names don't work very well
at all, and because of shell quoting rules this can't be fixed, so I put
in error messages to that end.
That seems to be a bit heavy handed; why bother disallowing things in
the backend because some (small number of) shell-based tools have
trouble as clients? I'd prefer filtering that at the client end, and
allowing capable clients to do whatever they please.
No, you're missing the point: the backend itself uses shell escapes
for some whole-database functions. IIRC, database creation is done with
something like
system("cp -r base/template1 base/newdb");
So shell metacharacters in database names are Bad News. We need to
put in a filter that will prevent appearances of / | ` etc in DB names.
I assume that's what Peter was doing.
I think we may have some bugs with metacharacters in table names (which
become filenames) as well, but haven't really pushed on it.
thinking about recoding ACLs as a two-field type to enforce an
unambigous interpretation of the two fields. Interested??
Seems like a good idea.
regards, tom lane
From bouncefilter Tue Dec 14 12:27:40 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA14004
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 12:27:38 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id NAA17028
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 13:27:25 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Tue, 14 Dec 1999 13:27:24 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: pgsql-hackers@postgresql.org
Subject: Transactions ...
Message-ID: <Pine.BSF.4.21.9912141323310.34471-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Just a quick question. Am trying to debug some problems with UdmSearch,
and the following being pumped out of hte backend (have debug mode's
turned on) don't look right...
StartTransactionCommand^M
query: BEGIN WORK^M
ProcessUtility: BEGIN WORK^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'date',3)^M
ProcessQuery^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'support',3)^M
ProcessQuery^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'postgresql',1)^M
ProcessQuery^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'user',1)^M
ProcessQuery^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'s',1)^M
ProcessQuery^M
CommitTransactionCommand^M
If they issue a 'BEGIN WORK', shouldn't it eliminate all the
'{Commit,Start}TransactionCommand's?
The man page shows: begin [transaction|work], but doesn't tell the
difference between 'transaction' and 'work'...
Comments?
Thanks...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Tue Dec 14 13:14:40 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA26085
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 13:14:05 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id OAA19141
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 14:13:54 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Tue, 14 Dec 1999 14:13:53 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: pgsql-hackers@postgresql.org
Subject: [6.5.3] FATAL 1: my bits moved right off the end of the world!
Message-ID: <Pine.BSF.4.21.9912141410470.34471-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Pretty much reproducable each time, and nothing other then that in the
logs...I can restart the process, let it run and after awhile, it does it
again...
I'm trying to get the UdmSearch program in place to replace ht/Dig, and
this is from the program that is creating the databases:
UdmSearch[47380]: Error: Error: 'pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
I have a pg_options file set at:
verbose=2
query
hostlookup
showportnumber
syslog=2
but all that appears to show up is:
StartTransactionCommand
query: INSERT INTO dict (url_id,word,intag) VALUES(1248,'enough',1)
ProcessQuery
CommitTransactionCommand
StartTransactionCommand
query: INSERT INTO dict (url_id,word,intag) VALUES(1248,'information',1)
ProcessQuery
CommitTransactionCommand
StartTransactionCommand
query: INSERT INTO dict (url_id,word,intag) VALUES(1248,'require',1)
ProcessQuery
proc_exit(0) [#0]
shmem_exit(0) [#0]
exit(0)
None production database right now, so its pretty much open game for
trying things with it...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Tue Dec 14 13:34:43 1999
Received: from aurora.rg.iupui.edu (aurora.rg.iupui.edu [134.68.31.122])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA38586
for <hackers@postgreSQL.org>; Tue, 14 Dec 1999 13:34:35 -0500 (EST)
(envelope-from gunther@aurora.rg.iupui.edu)
Received: from aurora.rg.iupui.edu (schadow_g.regenstrief.iupui.edu
[134.68.31.121])
by aurora.rg.iupui.edu (8.9.3/8.9.3) with ESMTP id NAA45615;
Tue, 14 Dec 1999 13:33:47 -0500 (EST)
(envelope-from gunther@aurora.rg.iupui.edu)
Message-ID: <38568DA2.D736E9B1@aurora.rg.iupui.edu>
Date: Tue, 14 Dec 1999 13:34:10 -0500
From: Gunther Schadow <gunther@aurora.rg.iupui.edu>
Organization: Regenstrief Institute
X-Mailer: Mozilla 4.51 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
CC: "hackers@postgreSQL.org" <hackers@postgreSQL.org>
Subject: Re: [HACKERS] UNICODE characters vs. BINARY
References: <38528AD6.B186C0B7@aurora.rg.iupui.edu>
<3855F34F.9B30308E@alumni.caltech.edu>
Content-Type: multipart/mixed; boundary="------------1D5B1381918EBB5FF090C8D7"
This is a multi-part message in MIME format.
--------------1D5B1381918EBB5FF090C8D7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Thomas Lockhart wrote:
postgres=> create table x (i smallint);
CREATE
postgres=> create table y (j bigint);
ERROR: Unable to locate type name 'bigint' in catalog
so BIGINT (as a synonym for INT8 is not supported). Is
BIGINT not a standard SQL92 or de Facto?
BTW: I have tried to make BIGINT a synonym of INT8 using
CREATE TYPE with the parameters I've got from pg_type
but it would not work.
afaik we support the type names defined in SQL92 (like smallint),
historical names in Postgres, and some extensions. What more do we
need?
I'm not entirely sure which types in pg_type are historical
but unsupported and which do work. For example: what is
"bytea" ... I remember darkly that this was an array of bytes
in original Postgres? But I may be mistaken. Why do I ask?
Because I see the need to store small byte sequences w/o
having to deploy the large object inversion. For example
if I want to store 128 bit UUIDs (or something similar with
128 bits) I need this as a straight byte sequence, indexable
of course -- not as a CHAR (since no character conversion should
occur and these bytes are not printable), not as a BLOB.
Then, how much do we guarrantee about PostgreSQL internal OIDs?
What if I want to use OIDs directly in the context of a multiple
data bases. Is there any way to control assignment of OIDs so
that cooperation with other databases would be possible?
thanks,
-Gunther
My original question was:
A related question is whether we could support some more
standard names for data types (e.g., BIGINT, SMALLINT, etc.)
But I'm not sure there is really any standard. I would be
willing to work a little on these data types but I'd need
someone to hint me on who else is doing stuff and, if possible,
where to look first (and what known mistakes to avoid.)
--
Gunther_Schadow-------------------------------http://aurora.rg.iupui.edu
Regenstrief Institute for Health Care
1050 Wishard Blvd., Indianapolis IN 46202, Phone: (317) 630 7960
schadow@aurora.rg.iupui.edu------------------#include <usual/disclaimer>
--------------1D5B1381918EBB5FF090C8D7
Content-Type: text/x-vcard; charset=us-ascii;
name="gunther.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Gunther Schadow
Content-Disposition: attachment;
filename="gunther.vcf"
begin:vcard
n:Schadow;Gunther
tel;fax:+1 317 630 6962
tel;home:+1 317 816 0516
tel;work:+1 317 630 7960
x-mozilla-html:FALSE
url:http://aurora.rg.iupui.edu
org:Regenstrief Institute
adr:;;1050 Wishard Blvd;Indianapolis;Indiana;46202;USA
version:2.1
email;internet:schadow_g@regenstrief.rg.iupui.edu
title:M.D.
fn:Gunther Schadow
end:vcard
--------------1D5B1381918EBB5FF090C8D7--
From bouncefilter Tue Dec 14 13:53:40 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id NAA41418
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 13:53:31 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xwwh-0003kGC; Tue, 14 Dec 99 19:45 MET
Message-Id: <m11xwwh-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Tue, 14 Dec 1999 19:45:11 +0100 (MET)
Cc: Inoue@tpf.co.jp, christof.petig@wtal.de, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912141625.LAA14553@candle.pha.pa.us> from "Bruce Momjian" at
Dec 14, 99 11:25:40 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
I planned to use as many of PostgreSQL data structures unaltered as
possible. Storing one Tuple in multiple Items should not pose too much
danger on bufmgr and smgr unless they access tuple internals. (I didn't
check that yet). This would mean that on disk Items do no longer
correspond to Tuples. (Some of them might form one tuple).Hmm,we have discussed about LONG.
Change by LONG is transparent to users and would resolve
the big tuple problem mostly.
I'm suspicious that tuple chaining is worth the work now.At least a consensus is needed before going,I think.
Bad design would only introduce a confusion.Agreed.
Me too.
I think that only a combination of LONG attributes and split
tuples will be a complete solution.
What I'm worried about is to make the segments of a large
tuple specialized things in the main table. The reliability
of Vacuum is one of the most important things for any system
in production. While the general operation of vacuum seems to
be well known, it's requirements for atomicy of some actions
appears to be lesser. The more chunks a tuple consists of,
the more possible an abort of vacuum in the middle of their
moving becomes. So keeping the links of chained tuples fail
safe intact is IMHO an issue, a little underestimated in this
discussion.
Maybe we can split tuples in another way, must think about it
for another hour - 'til later.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Tue Dec 14 13:57:40 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA41991
for <hackers@postgreSQL.org>; Tue, 14 Dec 1999 13:57:17 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id KAA12409;
Tue, 14 Dec 1999 10:56:33 -0800 (PST)
Message-Id: <3.0.1.32.19991214105437.010891c0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Tue, 14 Dec 1999 10:54:37 -0800
To: Gunther Schadow <gunther@aurora.rg.iupui.edu>,
Thomas Lockhart <lockhart@alumni.caltech.edu>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] UNICODE characters vs. BINARY
Cc: "hackers@postgreSQL.org" <hackers@postgreSQL.org>
In-Reply-To: <38568DA2.D736E9B1@aurora.rg.iupui.edu>
References: <38528AD6.B186C0B7@aurora.rg.iupui.edu>
<3855F34F.9B30308E@alumni.caltech.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 01:34 PM 12/14/99 -0500, Gunther Schadow wrote:
so BIGINT (as a synonym for INT8 is not supported). Is
BIGINT not a standard SQL92 or de Facto?
I've got Date's book sitting here, and it says that integer
and smallint are standard, with int being a standard
abbreviation for integer. So apparently bigint is
a common additional type, not standard SQL92.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Tue Dec 14 14:21:41 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA48281
for <hackers@postgresql.org>; Tue, 14 Dec 1999 14:21:15 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63930 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sJdW/30793>; Tue, 14 Dec 1999 20:20:33 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11xxaD-00016N-00; Tue, 14 Dec 1999 20:26:01 +0100
Date: Tue, 14 Dec 1999 20:26:01 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: hackers@postgresql.org
Subject: Re: [HACKERS] Create Group
In-Reply-To: <12753.945124542@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.20.9912141536290.388-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-13, Tom Lane mentioned:
Also, why can pg_group not be vacuumed? (pg_shadow can.) With all this
testing, mine is filling up.Perhaps related, but just out of curiosity: Why is pg_group a system
relatation (pg_class.relkind='s')?That seems wrong, wrong, wrong --- and it probably explains why VACUUM
won't touch it. 's' is for special relations not system relations, and
pg_group is not special. I'm surprised it works at all...
NOTICE: Vacuum: can not process index and certain system tables
Feel free to change this sooner rather than later because it also throws
off a few other things (e.g., psql and pg_dump probably). I couldn't even
find the place where this is specified in the catalogs. I really assume
this is an accident that has gone unnoticed because of the lack of usage.
Afterthought: The last claim seems to be supported by code fragments such
as this:
#define Natts_pg_group 1
#define Anum_pg_group_groname 1
#define Anum_pg_group_grosysid 2
#define Anum_pg_group_grolist 3
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Tue Dec 14 14:21:40 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA48319
for <hackers@postgresql.org>; Tue, 14 Dec 1999 14:21:39 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64375 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sJdWS26692>; Tue, 14 Dec 1999 20:21:02 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11xxaj-00017h-00
for hackers@postgresql.org; Tue, 14 Dec 1999 20:26:33 +0100
Date: Tue, 14 Dec 1999 20:26:33 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: hackers@postgresql.org
Subject: Arrays
Message-ID: <Pine.LNX.4.20.9912141916310.388-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
As threatened, here's the array inquisition. If have already found out how
arrays work in essence, but the could anybody tell me how I create a new
array? I mean I could just allocate a chunk of memory and set all the
flags and sizes myself, but that doesn't seem very clean.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Tue Dec 14 15:06:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA60123
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 15:06:28 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id PAA16141;
Tue, 14 Dec 1999 15:11:58 -0500 (EST)
To: The Hermit Hacker <scrappy@hub.org>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Transactions ...
In-reply-to: Your message of Tue, 14 Dec 1999 13:27:24 -0400 (AST)
<Pine.BSF.4.21.9912141323310.34471-100000@thelab.hub.org>
Date: Tue, 14 Dec 1999 15:11:58 -0500
Message-ID: <16139.945202318@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
The Hermit Hacker <scrappy@hub.org> writes:
and the following being pumped out of hte backend (have debug mode's
StartTransactionCommand^M
query: BEGIN WORK^M
ProcessUtility: BEGIN WORK^M
CommitTransactionCommand^M
StartTransactionCommand^M
query: INSERT INTO dict (url_id,word,intag) VALUES(810,'date',3)^M
ProcessQuery^M
CommitTransactionCommand^M
StartTransactionCommand^M
If they issue a 'BEGIN WORK', shouldn't it eliminate all the
'{Commit,Start}TransactionCommand's?
No. Those routines are still called, they just behave differently.
You're not the first one to be confused by those debug messages, IIRC.
It would probably make sense to rip those TPRINTFs out of postgres.c,
which only knows that it's calling those 2 routines, and put TPRINTFs
into the routines themselves (in xact.c) that show what state transition
is actually being taken...
regards, tom lane
From bouncefilter Tue Dec 14 15:08:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA60371
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 15:08:37 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id PAA16157;
Tue, 14 Dec 1999 15:14:16 -0500 (EST)
To: The Hermit Hacker <scrappy@hub.org>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] [6.5.3] FATAL 1: my bits moved right off the end of the
world!
In-reply-to: Your message of Tue, 14 Dec 1999 14:13:53 -0400 (AST)
<Pine.BSF.4.21.9912141410470.34471-100000@thelab.hub.org>
Date: Tue, 14 Dec 1999 15:14:15 -0500
Message-ID: <16155.945202455@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Isn't that what you get after a btree index has gotten corrupted?
(Probably by trying to insert a too-large index entry?)
I thought we'd put in a defense against oversize index entries,
but maybe it hasn't made it to the REL6_5 series...
regards, tom lane
From bouncefilter Tue Dec 14 15:28:24 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA62257
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 15:27:33 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id PAA16186;
Tue, 14 Dec 1999 15:24:31 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgman@candle.pha.pa.us (Bruce Momjian), Inoue@tpf.co.jp,
christof.petig@wtal.de, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
In-reply-to: Your message of Tue, 14 Dec 1999 19:45:11 +0100 (MET)
<m11xwwh-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Tue, 14 Dec 1999 15:24:31 -0500
Message-ID: <16184.945203071@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
I think that only a combination of LONG attributes and split
tuples will be a complete solution.
If we can do a good job with long attributes, I really think we
will not need to have split tuples too.
You'd be able to put perhaps 400 LONG attributes into an 8K tuple,
more than that if they are float8 or int or bool attributes.
If someone needs tables with even more columns than that, they
could bump BLCKSZ up to 32K and quadruple the number of columns.
How many people are really going to be bumping into that limit?
Is it worth the work and reliability risk to support long tuples
for a few applications that are about three sigmas out on the bell
curve? I doubt it.
I think the effort this would take would be *much* more profitably
spent on tuning the LONG-attribute support. If we can make that
fast and robust, we will have very few complaints.
regards, tom lane
From bouncefilter Tue Dec 14 15:55:27 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA69232
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 15:55:23 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id QAA29828;
Tue, 14 Dec 1999 16:53:01 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Tue, 14 Dec 1999 16:52:50 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] [6.5.3] FATAL 1: my bits moved right off the end of
the world!
In-Reply-To: <16155.945202455@sss.pgh.pa.us>
Message-ID: <Pine.BSF.4.21.9912141651580.34471-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 14 Dec 1999, Tom Lane wrote:
Isn't that what you get after a btree index has gotten corrupted?
(Probably by trying to insert a too-large index entry?)I thought we'd put in a defense against oversize index entries,
but maybe it hasn't made it to the REL6_5 series...
Suggestion on what to check for this? if it restart the process, it
appears to resume from where it left off, so I'm guessing it isn't in the
application itself...?
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Tue Dec 14 16:41:25 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id QAA79596
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 16:40:28 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11xzYy-0003kGC; Tue, 14 Dec 99 22:32 MET
Message-Id: <m11xzYy-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Tue, 14 Dec 1999 22:32:52 +0100 (MET)
Cc: wieck@debis.com, pgman@candle.pha.pa.us, Inoue@tpf.co.jp,
christof.petig@wtal.de, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <16184.945203071@sss.pgh.pa.us> from "Tom Lane" at Dec 14,
99 03:24:31 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
wieck@debis.com (Jan Wieck) writes:
I think that only a combination of LONG attributes and split
tuples will be a complete solution.If we can do a good job with long attributes, I really think we
will not need to have split tuples too.
I really hope so, because there will be very severe problems
coming up with a real tuple split at arbitrary cut points
that can occur somewhere in the middle of an attribute.
Arbitrary cut points are the only way to support single
values over BLKSIZE.
Just to tell one problem, the scan key tests during
heap_getnext() are handed down into heapgettup() and
performed with HeapTupleSatisfies, a macro using the in
buffer tuple here. IIRC it was turned into a macro in one of
our last releases for performance reasons.
If now faced with a tuple living in multiple pages, these
checks will need to reconstruct the tuple in memory, to
concatenate the attributes well again.
This now needs to lock multiple buffers at once during
heapgettup(), where I'm not sure if they must all stay with
the bumped refcount when returning the tuple or not. So
ReleaseBuffer() might need to be changed into something,
where the HeapTuple remembers all the buffers that where
locked for it.
Also this separate ReleaseBuffer() reminds me, that there are
some places in the backend that assume a tuple returned by
heap AM allways is in a buffer! But that can't be true any
more, because a buffer allways has BLKSIZE.
I think the effort this would take would be *much* more profitably
spent on tuning the LONG-attribute support. If we can make that
fast and robust, we will have very few complaints.
*MUCH*!
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Tue Dec 14 16:40:25 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA79564
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 16:40:16 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id QAA16291;
Tue, 14 Dec 1999 16:39:37 -0500 (EST)
To: Matthew Hagerty <matthew@venux.net>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: Backend core dump, Please help, Urgent!
In-reply-to: Your message of Tue, 14 Dec 1999 14:13:04 -0500
<4.1.19991214124701.0416e100@mail.venux.net>
Date: Tue, 14 Dec 1999 16:39:36 -0500
Message-ID: <16289.945207576@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
[ I'm redirecting this to pg-hackers since it doesn't look like an
interfaces problem ... ]
Matthew Hagerty <matthew@venux.net> writes:
The app is written in PHP3-3.0.12 compiled as an Apache-1.3.6 module. The
OS is FreeBSD-3.1-Release with GCC-2.7.2.1 and a PostgreSQL-6.5.1 backend.
You should probably update to 6.5.3 for starters. I'm not all that
hopeful that any of the bugfixes in 6.5.3 will fix this, but it'd be
pretty silly not to try it before investing a lot of work running down
the problem.
The app went online on August 30, 1999 and has run without incident until
yesterday. At about 10am Dec, 13th, 1999 one of the programmers noticed
that none of the forum messages would come up. I went to the console of
the server and saw this message about 10 or 15 times:
Dec 13 10:35:56 redbox /kernel: pid 13856 (postgres), uid 1002: exited on
signal 11 (core dumped)
A ps -xa revealed about 15 or so postgres processes! I did not think
postgres made any child processes?!?! So I stopped the web server and
killed the main postgres process which seemed to kill all the other
postgres processes. I then tried to restart postgres and got an error
message that was something like:
IpcSemaphore??? - Key=54321234 Max
You could probably have recovered from this with "ipcclean" instead of a
reboot; it sounds like the postmaster failed to release the shared
semaphores before exiting. Which it should have, unless maybe you used
kill -9 on it...
At 9:36am on the 14th it happened again. Again I was unable to recover the
data and had to rebuild the data directory. I did not delete the data
directory this time, I just moved it to another directory so I would have
it. I also have the core dumps. The only file I had to delete was the
pg_log in the data directory. What is this file? It had grown to 700Meg
in under 24 hours!! Also, the core dump for the main app grew from 2.7Meg
to over 80Meg while I was trying to dump the data.
Sure sounds like a corrupted-data problem. Can you use gdb on the
corefiles to get a backtrace of what they were doing?
My biggest hang-up is why all of a sudden?
Good question. We'll probably know the answer when we find the problem.
regards, tom lane
From bouncefilter Tue Dec 14 17:46:26 1999
Received: from redbox.venux.net (redbox.venux.net [216.47.238.10])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA91584
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 17:45:50 -0500 (EST)
(envelope-from matthew@venux.net)
Received: from thunder (net4842.hcv.com [216.93.48.42])
by redbox.venux.net (Postfix) with SMTP id BE22B2E20B
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 17:40:14 -0500 (EST)
Message-Id: <4.1.19991214174335.0400ba00@mail.venux.net>
X-Sender: mhagerty@mail.venux.net
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Tue, 14 Dec 1999 17:45:38 -0500
To: pgsql-hackers@postgresql.org
From: Matthew Hagerty <matthew@venux.net>
Subject: Backend core dump, Please help, Urgent!
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Greetings,
I think Tom Lane forwarded this over from [INTERFACES] (thanks Tom!), but I
thought I should post it since it is my problem and not Tom's.
Original post as follows:
-------------------------
If anyone could help me figure out what is going on with my PostgreSQL
backend I would greatly appreciate it!! I'll try to be brief and to the point.
I work for a small company and we created an online app for another small
company that has about 300 members who access the site. I think the record
for simultaneous logins is about 15, so the load is not really that great.
There are about 3000 to 5000 records added per month.
The app is written in PHP3-3.0.12 compiled as an Apache-1.3.6 module. The
OS is FreeBSD-3.1-Release with GCC-2.7.2.1 and a PostgreSQL-6.5.1 backend.
I start the postgres process at startup like this:
su postgres -c "/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data -i
/usr/local/pgsql/postgres.log 2>&1 &"
The server is an Intel R440LX Motherboard with two P2/333, 128Meg ECC DIMM,
and three 4.5G WD SCSI drives.
The primary database and main app code were designed and written in-house,
however we do use a PHP3 program called Phorum to implement a message forum
for the users. The main app database and the phorum database are two
separate databases.
The app went online on August 30, 1999 and has run without incident until
yesterday. At about 10am Dec, 13th, 1999 one of the programmers noticed
that none of the forum messages would come up. I went to the console of
the server and saw this message about 10 or 15 times:
Dec 13 10:35:56 redbox /kernel: pid 13856 (postgres), uid 1002: exited on
signal 11 (core dumped)
A ps -xa revealed about 15 or so postgres processes! I did not think
postgres made any child processes?!?! So I stopped the web server and
killed the main postgres process which seemed to kill all the other
postgres processes. I then tried to restart postgres and got an error
message that was something like:
IpcSemaphore??? - Key=54321234 Max
I could kick myself for not recording the exact message. Something to do
with shared memory I think. Never the less, postgres was not going to
start back up and I did not know what the error was telling me, so I had to
reboot (uptime said 143 days).
When the system came back up postgres started and I tried to check if there
was a post to the phorum database that may have caused the core dump. I
executed 2 queries and then tried to query the main app database from
another terminal. The main app queries were not executing, so I did a ps
-xa to see what processes were running and there were exactly 2 core dumped
sig 11 postgres processes!! So I did another query on the phorum database
and got a 3rd core dumped process!
At this point I killed all the postgres processes, restarted postgres and
tried to do a dump on the main app database. pg_dump gave an error similar
to this (I kick myself again):
Tuple 0:0 invalid, can't dump.
So, pg_dump was not going to give me a backup to that point, so I stopped
postgres and issued:
# rm -r data
# initdb
# createdb ipa
# createdb phorum
Then I used the previous day's backup for the main app, and just created
the table structure for the phourm since we do not backup that data.
Restarted the postgres and the web server and all seemed fine... until today.
At 9:36am on the 14th it happened again. Again I was unable to recover the
data and had to rebuild the data directory. I did not delete the data
directory this time, I just moved it to another directory so I would have
it. I also have the core dumps. The only file I had to delete was the
pg_log in the data directory. What is this file? It had grown to 700Meg
in under 24 hours!! Also, the core dump for the main app grew from 2.7Meg
to over 80Meg while I was trying to dump the data.
My biggest hang-up is why all of a sudden? We literally did not change
anything! The system was working fine since August. And now, after
creating new databases, it does it again in less than 24 hours! Also, is
there some reason why the log file created by postgres does not timestamp
its entries?
I will provide any table structures, core files, server logs, etc. if
needed. Anything that might give me an idea as to what is going on.
Thank you,
Matthew
Matthew Hagerty
Venux Technology Group
matthew@venux.net
616.458.9800
From bouncefilter Tue Dec 14 17:46:26 1999
Received: from atbib.be (IDENT:root@a02-161.antw.online.be [62.112.3.161])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA91575
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 17:45:34 -0500 (EST) (envelope-from fve@atbib.be)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id AAA21435;
Wed, 15 Dec 1999 00:45:30 +0100
Message-Id: <3.0.6.32.19991214234647.00885100@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Tue, 14 Dec 1999 23:46:47 +0100
To: pgsql-hackers@postgresql.org
From: Frans Van Elsacker <fve@atbib.be>
Subject: ordering RH6.1
Cc: lamar.owen@wgcr.org
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
On Wed, 08 Dec 1999, I wrote:
I have a table with a field varchar(5), filed with right alligned numbers.
Ordering was fine, just like we expected compared with nummeric.Starting from RedHat version 6.1 the ordening seems to remove the leading
blanco's, what was not for use. I try different versions of postgres, as
there are 6.5.2-1, 6.5.3-1, 6.5.3-2
I also try to change varchar in char, and remove the index on the varchar
field but nothing helps.
Today i take up again and see the ordering for me (third time i install
RH6.1), now
with postgres version 6.5.2-1
the problem is always the same
When i do the following
CREATE TABLE BLANK (column1 varchar(5));
INSERT INTO BLANK (column1) VALUES (' 1');
INSERT INTO BLANK (column1) VALUES (' 11');
INSERT INTO BLANK (column1) VALUES (' 100');
INSERT INTO BLANK (column1) VALUES (' 2');
then:
SELECT * FROM BLANK order by column1;
I received
1
100
11
2 --> mark also a not aligned output.
and I expected
1
2
11
100
Anybody has an idea??
Frans
From bouncefilter Tue Dec 14 17:57:31 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA92911
for <hackers@postgresql.org>; Tue, 14 Dec 1999 17:56:31 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63410 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sJgg8165961>; Tue, 14 Dec 1999 23:56:10 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11y0wt-0001O7-00; Wed, 15 Dec 1999 00:01:39 +0100
Date: Wed, 15 Dec 1999 00:01:39 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Postgres Hackers List <hackers@postgresql.org>
Subject: Re: [PATCHES] createdb/dropdb fixes
In-Reply-To: <3856526F.F0742344@alumni.caltech.edu>
Message-ID: <Pine.LNX.4.20.9912142039400.388-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-14, Thomas Lockhart mentioned:
That seems to be a bit heavy handed; why bother disallowing things in
the backend because some (small number of) shell-based tools have
trouble as clients? I'd prefer filtering that at the client end, and
It's really about statements like this:
snprintf(buf, sizeof(buf), "rm -rf '%s'", path);
There is no way around disallowing single-quotes unless you double quote
the argument and be very careful with the escaping. Of course this
particular case might as well use unlink(), but there is a recursive copy
of the template1 dir which would take a little more work (opendir(),
etc.). At that point we could lift that restriction.
permissions. I haven't looked at the code in a long time, but was
thinking about recoding ACLs as a two-field type to enforce an
unambigous interpretation of the two fields. Interested??
I've been puzzled about this for a long time, is there a reason this is
stored as an array at all? Why not use tuples like
aclperm char?
aclrelation oid
aclentity oid /* user or group sysid */
aclisgroup bool /* is it a user or group? */
And then it looks like this:
aclperm|aclrel|acluser|aclisgroup
-------+------+-------+----------
R |177777| 100|f
W |177777| 100|f
R |177777| 120|f
R |188888| 5|t
That's much cleaner. GRANT and REVOKE would be reduced to simple
insert/delete equivalents. I'm not sure how the actual authentication code
would like that overheadwise, though.
A related issue is pg_group, which I'm currently working on. Those arrays
are killing me. A simple user/group associating relation would be much
nicer.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Tue Dec 14 17:57:26 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA92995
for <hackers@postgresql.org>; Tue, 14 Dec 1999 17:57:11 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63954 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sJggc165961>; Tue, 14 Dec 1999 23:56:40 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11y0x6-0001Op-00; Wed, 15 Dec 1999 00:01:52 +0100
Date: Wed, 15 Dec 1999 00:01:52 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Gunther Schadow <gunther@aurora.rg.iupui.edu>,
"hackers@postgreSQL.org" <hackers@postgresql.org>
Subject: Re: [HACKERS] UNICODE characters vs. BINARY
In-Reply-To: <3855F34F.9B30308E@alumni.caltech.edu>
Message-ID: <Pine.LNX.4.20.9912142100270.388-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-14, Thomas Lockhart mentioned:
afaik we support the type names defined in SQL92 (like smallint),
historical names in Postgres, and some extensions. What more do we
need?
We need to move the standard names up in the docs and the historical ones
down. I guess what you're doing with the date/time types would also be a
good idea.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Tue Dec 14 18:12:26 1999
Received: from redbox.venux.net (redbox.venux.net [216.47.238.10])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA98449
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 18:12:00 -0500 (EST)
(envelope-from matthew@venux.net)
Received: from thunder (net4842.hcv.com [216.93.48.42])
by redbox.venux.net (Postfix) with SMTP id 606582E227
for <pgsql-hackers@postgresql.org>;
Tue, 14 Dec 1999 18:06:26 -0500 (EST)
Message-Id: <4.1.19991214174610.040ea8b0@mail.venux.net>
X-Sender: mhagerty@mail.venux.net
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Tue, 14 Dec 1999 18:11:50 -0500
To: pgsql-hackers@postgresql.org
From: Matthew Hagerty <matthew@venux.net>
Subject: Backend core dump, different server!
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Greetings,
This follows a post I just made with the subject line: [Backend core dump,
Please help, Urgent!]
We just had the same thing occur on a completely different server! It
happened on our development server which is different hardware and
different version of FreeBSD (3.2-Release) than on our production server.
However both are running pg-6.5.1. Both of these machines have been
running for over 6 months without incident.
One of the programmers was in psql, he created this table:
CREATE TABLE "instacom" (
"submit_date" date,
"instacom_id" int4,
"message" text);
CREATE INDEX "instacom_submit_date" on "instacom" using btree
"submit_date" "date_ops" );
I'm not sure how much data he had in the table, but I'm sure it was not
more than a few records, but when he submitted a query on this table
*only*, other tables queried just fine, the backend crashed and this
message displayed on the console:
Dec 14 16:00:56 bluebox /kernel: pid 79923 (postgres), uid 1001: exited on
signal 11
Dec 14 16:01:14 bluebox /kernel: pid 79925 (postgres), uid 1001: exited on
signal 11
Dec 14 16:03:06 bluebox /kernel: pid 79940 (postgres), uid 1001: exited on
signal 10
The signal 10 kind of caught my eye since we had only seen signal 11s so
far. He restarted the server, delete the table, and recreated it like this:
CREATE TABLE "instacom" (
"submit_date" date,
"instacom_id" int4);
CREATE INDEX "instacom_submit_date" on "instacom" using btree
"submit_date" "date_ops" );
The backend has not yet crashed. We are in the process of recreating the
old structure to see if we can reproduce the error. There are no error
messages in our postgres.log. I will gladly provide any log files, core
dumps, make config changes, etc.
Any insight would be greatly appreciated.
Thank you,
Matthew Hagerty
From bouncefilter Tue Dec 14 18:30:26 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA00831
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 18:30:04 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id SAA16600;
Tue, 14 Dec 1999 18:28:58 -0500 (EST)
To: Frans Van Elsacker <fve@atbib.be>
cc: pgsql-hackers@postgreSQL.org, lamar.owen@wgcr.org
Subject: Re: [HACKERS] ordering RH6.1
In-reply-to: Your message of Tue, 14 Dec 1999 23:46:47 +0100
<3.0.6.32.19991214234647.00885100@193.75.233.1>
Date: Tue, 14 Dec 1999 18:28:57 -0500
Message-ID: <16598.945214137@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Frans Van Elsacker <fve@atbib.be> writes:
When i do the following
CREATE TABLE BLANK (column1 varchar(5));
INSERT INTO BLANK (column1) VALUES (' 1');
INSERT INTO BLANK (column1) VALUES (' 11');
INSERT INTO BLANK (column1) VALUES (' 100');
INSERT INTO BLANK (column1) VALUES (' 2');
then:
SELECT * FROM BLANK order by column1;
I received
1
100
11
2 --> mark also a not aligned output.
and I expected
1
2
11
100
Anybody has an idea??
Bizarre. I see the expected results under both 6.5.3 and current
development sources:
play=> SELECT * FROM BLANK order by column1;
column1
-------
1
2
11
100
(4 rows)
I wonder if this could be a LOCALE or MULTIBYTE issue. Do you have
either feature enabled in your copy, and if so what locale/encoding
do you use? (I'm running plain vanilla no-USE_LOCALE, no-MULTIBYTE
code, so that might be why I don't see anything funny...)
regards, tom lane
From bouncefilter Tue Dec 14 18:46:27 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA05128
for <hackers@postgreSQL.org>; Tue, 14 Dec 1999 18:45:28 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id SAA16630;
Tue, 14 Dec 1999 18:44:15 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Postgres Hackers List <hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: [PATCHES] createdb/dropdb fixes
In-reply-to: Your message of Wed, 15 Dec 1999 00:01:39 +0100 (CET)
<Pine.LNX.4.20.9912142039400.388-100000@localhost.localdomain>
Date: Tue, 14 Dec 1999 18:44:15 -0500
Message-ID: <16628.945215055@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
It's really about statements like this:
snprintf(buf, sizeof(buf), "rm -rf '%s'", path);
There is no way around disallowing single-quotes unless you double quote
the argument and be very careful with the escaping.
Yes. In fact, I'd argue for filtering the names more heavily than that;
just to take a for-example, Bad Things would ensue if we accepted a
database name of "..".
It is easy to devise cases in which accepting leading "." or embedded "/"
leads to disaster; if you think those are OK, allow me to destroy your
installation for you ;-). I haven't yet thought of a way to cause
trouble with a back-quote in a DB name (given that single quotes are
disallowed) ... but I bet some enterprising hacker can find one.
Beyond the bare minimum security issues, I also think we should take
pity on the poor dbadmin who may have to be looking at these
subdirectories or filenames. Is it really a good idea to allow carriage
returns or other control characters in file/directory names? Is it
even a good idea to allow spaces? I don't think so. If we were not
using these names for Unix file/dir names then we could allow anything
we felt like --- but since we are using them that way, I think that the
safest path is to only allow things that are going to look like ordinary
file names when used in Unix shell commands. Otherwise there's still a
big chance of trouble if the dbadmin gets a little bit careless.
Of course this particular case might as well use unlink(),
Not unless your system's unlink is much different from mine's...
regards, tom lane
From bouncefilter Tue Dec 14 19:14:27 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA10809
for <hackers@postgreSQL.org>; Tue, 14 Dec 1999 19:13:46 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id QAA00437;
Tue, 14 Dec 1999 16:13:36 -0800 (PST)
Message-Id: <3.0.1.32.19991214161139.01074db0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Tue, 14 Dec 1999 16:11:39 -0800
To: <hackers@postgreSQL.org>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Bug or feature? select, count(*), group by and empty tables
Cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Postgres Hackers List <hackers@postgreSQL.org>
In-Reply-To: <16628.945215055@sss.pgh.pa.us>
References: <Your message of Wed, 15 Dec 1999 00:01:39 +0100 (CET)
<Pine.LNX.4.20.9912142039400.388-100000@localhost.localdomain>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Here's another anomaly I've run across in porting the Ars Digita
Community System web development toolkit from Oracle to Postgres:
In oracle, if we do:
SQL> create table foo(i integer, j integer);
Table created.
then select like this, we get no rows returned:
SQL> select i, count(*) from foo group by i;
no rows selected
In postgres, the same select on the same empty table yields:
test=> select i, count(*) from foo group by i;
i|count
-+-----
| 0
(1 row)
test=>
Which is correct? It's the count() causing the row to be output,
apparently PostgreSQL feels obligated to return at least one
value for the aggragate and since there are no groups has to
invent one. I assume this is wrong, and that Oracle's right, but
haven't dug through Date's book to verify.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Tue Dec 14 19:35:28 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA15763
for <hackers@postgreSQL.org>; Tue, 14 Dec 1999 19:35:07 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id QAA08113;
Tue, 14 Dec 1999 16:34:58 -0800 (PST)
Message-Id: <3.0.1.32.19991214163255.010906b0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Tue, 14 Dec 1999 16:32:55 -0800
To: <hackers@postgreSQL.org>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Bug or feature? select, count(*), group by and
empty tables
Cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Postgres Hackers List <hackers@postgreSQL.org>
In-Reply-To: <3.0.1.32.19991214161139.01074db0@mail.pacifier.com>
References: <16628.945215055@sss.pgh.pa.us> <Your message of Wed,
15 Dec 1999 00:01:39 +0100 (CET)
<Pine.LNX.4.20.9912142039400.388-100000@localhost.localdomain>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 04:11 PM 12/14/99 -0800, Don Baccus wrote:
Here's another anomaly I've run across in porting the Ars Digita
Community System web development toolkit from Oracle to Postgres:
(always returning a row for a select count(*) ... group by query
even if there aren't any groups)
OK, I've gotten the latest sources with the bright idea of digging
around, and in nodeAgg.c the routine ExecAgg.c has been somewhat
rewritten, with comments that make it clear that this bug's already
been fixed.
I should build myself a latest version so I can filter out non-problems
before reporting them, sorry...
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Tue Dec 14 21:39:28 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA41093
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 21:39:07 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id LAA03536; Wed, 15 Dec 1999 11:38:51 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Jan Wieck" <wieck@debis.com>
Cc: <christof.petig@wtal.de>, <pgsql-hackers@postgreSQL.org>,
"Bruce Momjian" <pgman@candle.pha.pa.us>
Subject: RE: [HACKERS] Volunteer: Large Tuples / Tuple chaining
Date: Wed, 15 Dec 1999 11:43:51 +0900
Message-ID: <000c01bf46a6$385e8fe0$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
In-Reply-To: <m11xwwh-0003kGC@orion.SAPserv.Hamburg.dsh.de>
-----Original Message-----
From: Jan Wieck [mailto:wieck@debis.com]
Sent: Wednesday, December 15, 1999 3:45 AMBruce Momjian wrote:
I planned to use as many of PostgreSQL data structures unaltered as
possible. Storing one Tuple in multiple Items should notpose too much
danger on bufmgr and smgr unless they access tuple
internals. (I didn't
check that yet). This would mean that on disk Items do no longer
correspond to Tuples. (Some of them might form one tuple).Hmm,we have discussed about LONG.
Change by LONG is transparent to users and would resolve
the big tuple problem mostly.
I'm suspicious that tuple chaining is worth the work now.At least a consensus is needed before going,I think.
Bad design would only introduce a confusion.Agreed.
Me too.
I think that only a combination of LONG attributes and split
tuples will be a complete solution.What I'm worried about is to make the segments of a large
tuple specialized things in the main table. The reliability
of Vacuum is one of the most important things for any system
in production. While the general operation of vacuum seems to
be well known, it's requirements for atomicy of some actions
appears to be lesser. The more chunks a tuple consists of,
the more possible an abort of vacuum in the middle of their
moving becomes. So keeping the links of chained tuples fail
safe intact is IMHO an issue, a little underestimated in this
discussion.
There exists another related problem.
Vacuum could hardly move big tuples if some tuples of each page
live long. Though we have to move a long tuple at once,there won't
be so many clean pages.
Probably vacuum couldn't move even a 8K tuple in some cases.
The problem is already there,more or less.
But it seems very difficult to solve this problem without giving up
to preserve consistency in case of a crash.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Tue Dec 14 21:53:29 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA42276
for <pgsql-hackers@postgreSQL.org>;
Tue, 14 Dec 1999 21:52:40 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA15062;
Tue, 14 Dec 1999 21:52:14 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912150252.VAA15062@candle.pha.pa.us>
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
In-Reply-To: <000c01bf46a6$385e8fe0$2801007e@cadzone.tpf.co.jp> from Hiroshi
Inoue at "Dec 15, 1999 11:43:51 am"
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Date: Tue, 14 Dec 1999 21:52:14 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, christof.petig@wtal.de,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Remember, chaining tuples had all sorts of performance, vacuum, code
handling, and UPDATE problems. They buy us very little, and almost
nothing if we have LONG tables.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 15 00:53:31 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA95216
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 00:53:18 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id AAA17083;
Wed, 15 Dec 1999 00:52:15 -0500 (EST)
To: Don Baccus <dhogaza@pacifier.com>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] Bug or feature? select, count(*),
group by and empty tables
In-reply-to: Your message of Tue, 14 Dec 1999 16:32:55 -0800
<3.0.1.32.19991214163255.010906b0@mail.pacifier.com>
Date: Wed, 15 Dec 1999 00:52:15 -0500
Message-ID: <17081.945237135@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Don Baccus <dhogaza@pacifier.com> writes:
(always returning a row for a select count(*) ... group by query
even if there aren't any groups)
Yah: if you have aggregates and no GROUP, for empty input you should
get one row out with "default" results (0 for COUNT, null for most other
aggregates). But for GROUP mode, no rows in should yield no rows out,
aggregates or no. It took a fair amount of arguing before everyone was
convinced that that is the correct interpretation of the spec ;-),
which is why it's only been fixed recently.
OK, I've gotten the latest sources with the bright idea of digging
around, and in nodeAgg.c the routine ExecAgg.c has been somewhat
rewritten, with comments that make it clear that this bug's already
been fixed.
I should build myself a latest version so I can filter out non-problems
before reporting them, sorry...
Not a problem. Bug reports on the latest release are fair game.
If it's already been fixed in current sources, whoever fixed it
will surely take pleasure in telling you so...
regards, tom lane
From bouncefilter Wed Dec 15 03:16:32 1999
Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA24669
for <pgsql-hackers@postgresql.org>;
Wed, 15 Dec 1999 03:15:53 -0500 (EST) (envelope-from oleg@sai.msu.su)
Received: from ra (ra [158.250.29.2])
by ra.sai.msu.su (8.9.1/8.9.1) with SMTP id LAA29659;
Wed, 15 Dec 1999 11:15:39 +0300 (MSK)
Date: Wed, 15 Dec 1999 11:15:38 +0300 (MSK)
From: Oleg Bartunov <oleg@sai.msu.su>
X-Sender: megera@ra
To: pgsql-hackers@postgresql.org
cc: "E.Rodichev" <er@sai.msu.su>
Subject: postmaster dies (6.5.3)
Message-ID: <Pine.GSO.3.96.SK.991215105557.10383h-100000@ra>
Organization: Sternberg Astronomical Institute (Moscow University)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
I got seriuos problem this night with postgres which is running as
db backend to apache. I have cron job which vacuuming database
every hour and it worked for weeks without problem
(well, there is problem with concurrent processes under high load,
but this night was very quiet)
Here is the processes currently seen:
167 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature idle
168 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature idle
169 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature idle
170 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature idle
171 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature idle
26578 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature idle
29372 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd discovery idle
from apache's error log:
[Wed Dec 15 02:10:08 1999] [error] DBI->connect failed: connectDB() -- couldn't
send startup packet: errno=32
Broken pipe
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138
[Wed Dec 15 02:10:08 1999] [error] DBI->connect failed: pqReadData() -- backend
closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138
[Wed Dec 15 02:10:43 1999] [error] DBI->connect failed: connectDB() -- connect()
failed: No such file or directory
Is the postmaster running at 'localhost' and accepting connections on Unix socke
t '5432'?
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138
fortunately postmaster was started with debug option:
StartTransactionCommand
query: SET client_encoding = 'KOI8'
ProcessUtility: SET client_encoding = 'KOI8'
CommitTransactionCommand
postmaster: StreamConnection: accept: Invalid argument
/usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6
/usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6
FATAL 1: ReleaseLruFile: No opened files - no one can be closed
proc_exit(0) [#0]
shmem_exit(0) [#0]
exit(0)
Aha,
From system log files I found probable explanation - file table overflow !
Could this be a reason of postmaster dead and how to avoid this ?
Dec 15 01:47:27 zeus kernel: Unable to load interpreter
Dec 15 02:09:28 zeus xntpd[103]: kernel pll status change 89
Dec 15 02:10:08 zeus squid[133]: file_open: error opening file /d4/squid/cache/0
2/69/00001692: (23) File table overflow
Dec 15 02:10:08 zeus squid[133]: storeSwapInStart: Failed for 'http://xyz.tvcom.
ru/99/12/100_2.jpg'
Dec 15 02:10:12 zeus kernel: Unable to load interpreter
Dec 15 03:26:16 zeus xntpd[103]: kernel pll status change 89
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
From bouncefilter Wed Dec 15 03:28:32 1999
Received: from smtp.kdt.de (ns2.kdt.de [195.8.224.2])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA25730
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 03:28:28 -0500 (EST)
(envelope-from christof.petig@wtal.de)
Received: from gateway.petig.de (line0278lf.kdt.de [195.8.240.28])
by smtp.kdt.de (8.8.8/8.8.8) with ESMTP id JAA17486;
Wed, 15 Dec 1999 09:28:26 +0100
Received: from wtal.de (christof@[192.168.230.9])
by gateway (8.8.8/8.8.8) with ESMTP id JAA12273;
Wed, 15 Dec 1999 09:27:40 +0100
Sender: christof@to.wtal.de
Message-ID: <385750FB.F989A609@wtal.de>
Date: Wed, 15 Dec 1999 09:27:39 +0100
From: Christof Petig <christof.petig@wtal.de>
Organization: Adolf Petig GmbH. & Co. KG
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.7 i586)
X-Accept-Language: de
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: Hiroshi Inoue <Inoue@tpf.co.jp>, Jan Wieck <wieck@debis.com>,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Volunteer: Large Tuples / Tuple chaining
References: <199912150252.VAA15062@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
Remember, chaining tuples had all sorts of performance, vacuum, code
handling, and UPDATE problems. They buy us very little, and almost
nothing if we have LONG tables.
I had already contacted Jan in private Email. Since we share country,
native language and time zone, this is even the most comfortable way.
I agree with the concerns you mailed and will (most likely) start
helping Jan to implement LONG. As I had seen your LONG discussion
_after_ my original post, this had been a strange coincidence. But I had
been following it with interest.
Christof
From bouncefilter Wed Dec 15 05:29:34 1999
Received: from mail.enterprise.net (mail.enterprise.net [194.72.192.18])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA49313
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 05:29:21 -0500 (EST) (envelope-from olly@lfix.co.uk)
Received: from linda.lfix.co.uk (root@max02-031.enterprise.net
[194.72.195.151])
by mail.enterprise.net (8.8.5/8.8.5) with ESMTP id KAA13485;
Wed, 15 Dec 1999 10:29:11 GMT
Received: from lfix.co.uk (olly@localhost [127.0.0.1])
by linda.lfix.co.uk (8.9.3/8.9.3/Debian 8.9.3-6) with ESMTP id KAA15538;
Wed, 15 Dec 1999 10:29:09 GMT
Message-Id: <199912151029.KAA15538@linda.lfix.co.uk>
X-Authentication-Warning: linda.lfix.co.uk: Host olly@localhost [127.0.0.1]
claimed to be lfix.co.uk
X-Mailer: exmh version 2.1.1 10/15/1999 (debian)
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgreSQL.org,
lamar.owen@wgcr.org, olly@linda.lfix.co.uk
Subject: Re: [HACKERS] ordering RH6.1
In-Reply-To: Message from Tom Lane <tgl@sss.pgh.pa.us>
of "Tue, 14 Dec 1999 18:28:57 EST." <16598.945214137@sss.pgh.pa.us>
References: <16598.945214137@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Wed, 15 Dec 1999 10:29:09 +0000
From: "Oliver Elphick" <olly@lfix.co.uk>
Tom Lane wrote:
Bizarre. I see the expected results under both 6.5.3 and current
development sources:play=> SELECT * FROM BLANK order by column1;
column1
-------
1
2
11
100
(4 rows)I wonder if this could be a LOCALE or MULTIBYTE issue. Do you have
either feature enabled in your copy, and if so what locale/encoding
do you use? (I'm running plain vanilla no-USE_LOCALE, no-MULTIBYTE
code, so that might be why I don't see anything funny...)
I've tried this with both locale and multibyte enabled and with
LANG=en_GB. The results are correct. (Version = 6.5.3).
--
Vote against SPAM: http://www.politik-digital.de/spam/
========================================
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"The fear of the LORD is the instruction of wisdom, and
before honour is humility." Proverbs 15:33
From bouncefilter Wed Dec 15 06:44:35 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id GAA64293
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 06:43:39 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id UAA18526;
Wed, 15 Dec 1999 20:43:37 +0900 (JST)
Received: from localhost (IDENT:t-ishii@portsv3-1 [133.137.84.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id UAA11125;
Wed, 15 Dec 1999 20:43:34 +0900
To: tgl@sss.pgh.pa.us
Cc: matthew@venux.net, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: Backend core dump, Please help, Urgent!
In-Reply-To: <16289.945207576@sss.pgh.pa.us>
References: <4.1.19991214124701.0416e100@mail.venux.net>
<16289.945207576@sss.pgh.pa.us>
X-Mailer: Mew version 1.94 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991215204333E.t-ishii@sra.co.jp>
Date: Wed, 15 Dec 1999 20:43:33 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 990905(IM130)
Lines: 44
Sure sounds like a corrupted-data problem. Can you use gdb on the
corefiles to get a backtrace of what they were doing?My biggest hang-up is why all of a sudden?
Good question. We'll probably know the answer when we find the problem.
Besides the problem Tom has pointed out its possibility, there is a
known problem with 6.5.x on FreeBSD. It would be rather important,
since it results in a core dump as well. The problem occurs while a
backend is waiting for acquiring a lock. Thus it tends to happen on
relatively heavy load (I observed the problem starting with 4
concurrent transactions). As far as I know, Linux does not have the
problem at all, but FreeBSD does. I'm not sure about other
platforms. Solaris seems to be not suffered.
You could try following patch. It was made for 6.5.3, but you could
apply it to 6.5.1 or 6.5.2 as well. Current has been already fixed
with more complex and long-term-aid solution. But I would prefer to
minimize the impact to existing releases. Keeping that in mind, I have
made the patch the simplest.
--
Tatsuo Ishii
---------------------------- cut here -----------------------------
*** postgresql-6.5.3/src/backend/storage/lmgr/lock.c~ Sat May 29 15:14:42 1999
--- postgresql-6.5.3/src/backend/storage/lmgr/lock.c Mon Dec 13 16:45:47 1999
***************
*** 940,946 ****
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);
LOCKMETHODTABLE *lockMethodTable = LockMethodTable[lockmethod];
! char old_status[64],
new_status[64];
Assert(lockmethod < NumLockMethods);
--- 940,946 ----
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);
LOCKMETHODTABLE *lockMethodTable = LockMethodTable[lockmethod];
! static char old_status[64],
new_status[64];
Assert(lockmethod < NumLockMethods);
From bouncefilter Wed Dec 15 09:01:38 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA91512
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 09:01:23 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
IAA02889;
Wed, 15 Dec 1999 08:51:37 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912151351.IAA02889@candle.pha.pa.us>
Subject: Re: [PATCHES] non-blocking patches.
In-Reply-To: <Pine.BSF.4.21.9912132031270.4557-100000@fw.wintelcom.net> from
Alfred Perlstein at "Dec 13, 1999 10:07:05 pm"
To: Alfred Perlstein <bright@wintelcom.net>
Date: Wed, 15 Dec 1999 08:51:37 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Can anyone comment on this? I don't know the answer, and I know he is
waiting for help. This originally appeared on the patches list.
These patches to libpq allow a user to toggle the blocking nature of
the database connection.They also fix a problem where if the database's pipe was full it could
busy-loop attempting to flush the send buffer.It's assumed that callers to PQexec want blocking behavior and the
mode of the connection will be toggled while the query is being
executed via PQexec.A new field has been added to the PGconn structure to allow the database
to track the non-blocking nature of the connection without polling the
status of the socket via syscalls.When in non-blocking mode the library is careful to make sure that
it will send a complete command/line down the wire before allowing it.The case of EINTR in pqFlush() is caught and averted from making a
useless select() call.There is a problem though, some of the code (particularly "fe-exec.c" line 518)
may now get out of sync because:if (pqPutnchar("Q", 1, conn) ||
pqPuts(query, conn) ||
pqFlush(conn))
{
handleSendFailure(conn);
return 0;
}may send a 'Q' but be unable to send the query, I'm unsure if
handleSendFailure() is able to reliably deal with this. I may need
to work on reservations for the send buffer if not.Does anyone know? I'll be investigating meanwhile but I wanted
people to get a snapshot of what I was working on so I could get
some feedback if i'm going in the right direction.These patches need review. My apologies for not running it through
pgindent, but the patches supplied postgresql don't seem to apply
cleanly to FreeBSD's indent any longer and my indent was segfaulting.Hopefully I kept within the guidelines for acceptable changes.
thanks,
-Alfred Perlstein - [bright@rush.net|alfred@freebsd.org]
Wintelcom systems administrator and programmer
- http://www.wintelcom.net/ [bright@wintelcom.net]Index: fe-connect.c =================================================================== RCS file: /home/pgcvs/pgsql/src/interfaces/libpq/fe-connect.c,v retrieving revision 1.108 diff -u -u -r1.108 fe-connect.c --- fe-connect.c 1999/12/02 00:26:15 1.108 +++ fe-connect.c 1999/12/14 09:42:24 @@ -595,31 +595,6 @@ return 0; }- -/* ---------- - * connectMakeNonblocking - - * Make a connection non-blocking. - * Returns 1 if successful, 0 if not. - * ---------- - */ -static int -connectMakeNonblocking(PGconn *conn) -{ -#ifndef WIN32 - if (fcntl(conn->sock, F_SETFL, O_NONBLOCK) < 0) -#else - if (ioctlsocket(conn->sock, FIONBIO, &on) != 0) -#endif - { - printfPQExpBuffer(&conn->errorMessage, - "connectMakeNonblocking -- fcntl() failed: errno=%d\n%s\n", - errno, strerror(errno)); - return 0; - } - - return 1; -} - /* ---------- * connectNoDelay - * Sets the TCP_NODELAY socket option. @@ -792,7 +767,7 @@ * Ewan Mellor <eem21@cam.ac.uk>. * ---------- */ #if (!defined(WIN32) || defined(WIN32_NON_BLOCKING_CONNECTIONS)) && !defined(USE_SSL) - if (!connectMakeNonblocking(conn)) + if (PQsetnonblocking(conn, TRUE) != 0) goto connect_errReturn; #endif@@ -904,7 +879,7 @@
/* This makes the connection non-blocking, for all those cases which forced us
not to do it above. */
#if (defined(WIN32) && !defined(WIN32_NON_BLOCKING_CONNECTIONS)) || defined(USE_SSL)
- if (!connectMakeNonblocking(conn))
+ if (PQsetnonblocking(conn, TRUE) != 0)
goto connect_errReturn;
#endif@@ -1702,6 +1677,7 @@
conn->inBuffer = (char *) malloc(conn->inBufSize);
conn->outBufSize = 8 * 1024;
conn->outBuffer = (char *) malloc(conn->outBufSize);
+ conn->nonblocking = FALSE;
initPQExpBuffer(&conn->errorMessage);
initPQExpBuffer(&conn->workBuffer);
if (conn->inBuffer == NULL ||
@@ -1811,6 +1787,7 @@
conn->lobjfuncs = NULL;
conn->inStart = conn->inCursor = conn->inEnd = 0;
conn->outCount = 0;
+ conn->nonblocking = FALSE;}
Index: fe-exec.c =================================================================== RCS file: /home/pgcvs/pgsql/src/interfaces/libpq/fe-exec.c,v retrieving revision 1.86 diff -u -u -r1.86 fe-exec.c --- fe-exec.c 1999/11/11 00:10:14 1.86 +++ fe-exec.c 1999/12/14 05:55:11 @@ -13,6 +13,7 @@ */ #include <errno.h> #include <ctype.h> +#include <fcntl.h>#include "postgres.h"
#include "libpq-fe.h"
@@ -24,7 +25,6 @@
#include <unistd.h>
#endif- /* keep this in same order as ExecStatusType in libpq-fe.h */ const char *const pgresStatus[] = { "PGRES_EMPTY_QUERY", @@ -574,7 +574,15 @@ * we will NOT block waiting for more input. */ if (pqReadData(conn) < 0) + { + /* + * try to flush the send-queue otherwise we may never get a + * resonce for something that may not have already been sent + * because it's in our write buffer! + */ + pqFlush(conn); return 0; + } /* Parsing of the data waits till later. */ return 1; } @@ -1088,8 +1096,17 @@ { PGresult *result; PGresult *lastResult; + bool savedblocking;/* + * we assume anyone calling PQexec wants blocking behaviour, + * we force the blocking status of the connection to blocking + * for the duration of this function and restore it on return + */ + savedblocking = PQisnonblocking(conn); + PQsetnonblocking(conn, FALSE); + + /* * Silently discard any prior query result that application didn't * eat. This is probably poor design, but it's here for backward * compatibility. @@ -1102,14 +1119,15 @@ PQclear(result); printfPQExpBuffer(&conn->errorMessage, "PQexec: you gotta get out of a COPY state yourself.\n"); - return NULL; + /* restore blocking status */ + goto errout; } PQclear(result); }/* OK to send the message */ if (!PQsendQuery(conn, query)) - return NULL; + goto errout;/* * For backwards compatibility, return the last result if there are @@ -1142,7 +1160,13 @@ result->resultStatus == PGRES_COPY_OUT) break; } + + PQsetnonblocking(conn, savedblocking); return lastResult; + +errout: + PQsetnonblocking(conn, savedblocking); + return NULL; }@@ -1431,8 +1455,14 @@ "PQendcopy() -- I don't think there's a copy in progress.\n"); return 1; } + + /* make sure no data is waiting to be sent */ + if (pqFlush(conn)) + return (1);- (void) pqFlush(conn); /* make sure no data is waiting to be sent */ + /* non blocking connections may have to abort at this point. */ + if (PQisnonblocking(conn) && PQisBusy(conn)) + return (1);/* Return to active duty */ conn->asyncStatus = PGASYNC_BUSY; @@ -2025,4 +2055,72 @@ return 1; else return 0; +} + +/* PQsetnonblocking: + sets the PGconn's database connection non-blocking if the arg is TRUE + or makes it non-blocking if the arg is FALSE, this will not protect + you from PQexec(), you'll only be safe when using the non-blocking + API + Needs to be called only on a connected database connection. +*/ + +int +PQsetnonblocking(PGconn *conn, int arg) +{ + int fcntlarg; + + arg = (arg == TRUE) ? 1 : 0; + if (arg == conn->nonblocking) + return (0); + +#ifdef USE_SSL + if (conn->ssl) + { + printfPQExpBuffer(&conn->errorMessage, + "PQsetnonblocking() -- not supported when using SSL\n"); + return (-1); + } +#endif /* USE_SSL */ + +#ifndef WIN32 + fcntlarg = fcntl(conn->sock, F_GETFL, 0); + if (fcntlarg == -1) + return (-1); + + if ((arg == TRUE && + fcntl(conn->sock, F_SETFL, fcntlarg | O_NONBLOCK) == -1) || + (arg == FALSE && + fcntl(conn->sock, F_SETFL, fcntlarg & ~O_NONBLOCK) == -1)) +#else + fcntlarg = arg; + if (ioctlsocket(conn->sock, FIONBIO, &fcntlarg) != 0) +#endif + { + printfPQExpBuffer(&conn->errorMessage, + "PQsetblocking() -- unable to set nonblocking status to %s\n", + arg == TRUE ? "TRUE" : "FALSE"); + return (-1); + } + + conn->nonblocking = arg; + return (0); +} + +/* return the blocking status of the database connection, TRUE == nonblocking, + FALSE == blocking +*/ +int +PQisnonblocking(PGconn *conn) +{ + + return (conn->nonblocking); +} + +/* try to force data out, really only useful for non-blocking users */ +int +PQflush(PGconn *conn) +{ + + return (pqFlush(conn)); } Index: fe-misc.c =================================================================== RCS file: /home/pgcvs/pgsql/src/interfaces/libpq/fe-misc.c,v retrieving revision 1.33 diff -u -u -r1.33 fe-misc.c --- fe-misc.c 1999/11/30 03:08:19 1.33 +++ fe-misc.c 1999/12/14 08:21:09 @@ -86,6 +86,34 @@ { size_t avail = Max(conn->outBufSize - conn->outCount, 0);+ /* + * if we are non-blocking and the send queue is too full to buffer this + * request then try to flush some and return an error + */ + if (PQisnonblocking(conn) && nbytes > avail && pqFlush(conn)) + { + /* + * even if the flush failed we may still have written some + * data, recalculate the size of the send-queue relative + * to the amount we have to send, we may be able to queue it + * afterall even though it's not sent to the database it's + * ok, any routines that check the data coming from the + * database better call pqFlush() anyway. + */ + if (nbytes > Max(conn->outBufSize - conn->outCount, 0)) + { + printfPQExpBuffer(&conn->errorMessage, + "pqPutBytes -- pqFlush couldn't flush enough" + " data: space available: %d, space needed %d\n", + Max(conn->outBufSize - conn->outCount, 0), nbytes); + return EOF; + } + } + + /* + * the non-blocking code above makes sure that this isn't true, + * essentially this is no-op + */ while (nbytes > avail) { memcpy(conn->outBuffer + conn->outCount, s, avail); @@ -548,6 +576,14 @@ return EOF; }+ /* + * don't try to send zero data, allows us to use this function + * without too much worry about overhead + */ + if (len == 0) + return (0); + + /* while there's still data to send */ while (len > 0) { /* Prevent being SIGPIPEd if backend has closed the connection. */ @@ -556,6 +592,7 @@ #endifint sent;
+
#ifdef USE_SSL
if (conn->ssl)
sent = SSL_write(conn->ssl, ptr, len);
@@ -585,6 +622,8 @@
case EWOULDBLOCK:
break;
#endif
+ case EINTR:
+ continue;case EPIPE: #ifdef ECONNRESET @@ -616,13 +655,31 @@ ptr += sent; len -= sent; } + if (len > 0) { /* We didn't send it all, wait till we can send more */ + + /* + * if the socket is in non-blocking mode we may need + * to abort here + */ +#ifdef USE_SSL + /* can't do anything for our SSL users yet */ + if (conn->ssl == NULL) + { +#endif + if (PQisnonblocking(conn)) + { + /* shift the contents of the buffer */ + memmove(conn->outBuffer, ptr, len); + conn->outCount = len; + return EOF; + } +#ifdef USE_SSL + } +#endif- /* At first glance this looks as though it should block. I think - * that it will be OK though, as long as the socket is - * non-blocking. */ if (pqWait(FALSE, TRUE, conn)) return EOF; } Index: libpq-fe.h =================================================================== RCS file: /home/pgcvs/pgsql/src/interfaces/libpq/libpq-fe.h,v retrieving revision 1.53 diff -u -u -r1.53 libpq-fe.h --- libpq-fe.h 1999/11/30 03:08:19 1.53 +++ libpq-fe.h 1999/12/14 01:30:01 @@ -269,6 +269,13 @@ extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes); extern int PQendcopy(PGconn *conn);+ /* Set blocking/nonblocking connection to the backend */ + extern int PQsetnonblocking(PGconn *conn, int arg); + extern int PQisnonblocking(PGconn *conn); + + /* Force the write buffer to be written (or at least try) */ + extern int PQflush(PGconn *conn); + /* * "Fast path" interface --- not really recommended for application * use Index: libpq-int.h =================================================================== RCS file: /home/pgcvs/pgsql/src/interfaces/libpq/libpq-int.h,v retrieving revision 1.14 diff -u -u -r1.14 libpq-int.h --- libpq-int.h 1999/11/30 03:08:19 1.14 +++ libpq-int.h 1999/12/14 01:30:01 @@ -215,6 +215,9 @@ int inEnd; /* offset to first position after avail * data */+ int nonblocking; /* whether this connection is using a blocking + * socket to the backend or not */ + /* Buffer for data not yet sent to backend */ char *outBuffer; /* currently allocated buffer */ int outBufSize; /* allocated size of buffer */************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 15 10:10:37 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id KAA08185
for <hackers@postgresql.org>; Wed, 15 Dec 1999 10:10:03 -0500 (EST)
(envelope-from vev@michvhf.com)
Date: Wed, 15 Dec 1999 10:10:03 -0500 (EST)
Message-Id: <199912151510.KAA08185@hub.org>
Received: (qmail 4320 invoked by alias); 15 Dec 1999 15:10:04 -0000
Received: from localhost (HELO michvhf.com) (127.0.0.1)
by localhost with SMTP; 15 Dec 1999 15:10:04 -0000
To: hackers@postgresql.org
Subject:
From: Vince Vielhaber <vev@michvhf.com>
X-Mailer: TWIG 2.0.0
I think I asked this before but don't recall seeing an answer. Do we
have a logical AND? partial example:
SELECT (( sum(case dict.word when 'enable' then 1 else 0 end) && sum(case
dict.word when 'test' then 1 else 0 end))) FROM blahblahblah
Note the && in the first line. I'm guessing this came from MySQL, it's
a query that UdmSearch created.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Wed Dec 15 10:42:39 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA14963;
Wed, 15 Dec 1999 10:42:13 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id PAA02977;
Wed, 15 Dec 1999 15:46:40 GMT
Sender: lockhart@hub.org
Message-ID: <3857B7E0.751E21CD@alumni.caltech.edu>
Date: Wed, 15 Dec 1999 15:46:40 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: owner-pgsql-hackers@postgreSQL.org
CC: hackers@postgreSQL.org
Subject: Re: [HACKERS] From: Vince Vielhaber <vev@michvhf.com>
References: <199912151510.KAA08185@hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I think I asked this before but don't recall seeing an answer. Do we
have a logical AND?
Uh, yes. It's called "AND" ;)
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Dec 15 10:56:37 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA16677
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 10:55:40 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id KAA30353;
Wed, 15 Dec 1999 10:55:35 -0500
Message-ID: <3857B9F0.8E0A2CAA@wgcr.org>
Date: Wed, 15 Dec 1999 10:55:28 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] ordering RH6.1
References: <16598.945214137@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
I wonder if this could be a LOCALE or MULTIBYTE issue. Do you have
either feature enabled in your copy, and if so what locale/encoding
do you use? (I'm running plain vanilla no-USE_LOCALE, no-MULTIBYTE
code, so that might be why I don't see anything funny...)
He's running the RPM distribution, which at that release has
--enable-locale but no multibyte.
Using the no-locale RPM's I last built, I can't reproduce his results.
Frans, try out the no-locale rpm set and see if the result changes, if
you please. (using wget, you would do: wget
http://www.ramifordistat.net/postgres/RPMS/redhat-6.x/postgresql*-2nl.i386.rpm
)
This will verify whether it is locale-related or not. I would install
the locale RPMs and test for you right now, but my 6.1 machine is at
home. If it is inconvenient for you to download this, let me know, and
I'll try to test tonight at home -- although, I've been meaning to do
just that for nearly a week now, but I haven't even fired up the machine
at home in the last week.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Wed Dec 15 10:57:38 1999
Received: from henry.newn.cam.ac.uk (henry.newn.cam.ac.uk [131.111.204.130])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA16837
for <hackers@postgresql.org>; Wed, 15 Dec 1999 10:56:44 -0500 (EST)
(envelope-from prlw1@newn.cam.ac.uk)
Received: from [131.111.204.180] (helo=quartz.newn.cam.ac.uk)
by henry.newn.cam.ac.uk with esmtp (Exim 2.12 #1) id 11yGnP-0005JC-00
for hackers@postgresql.org; Wed, 15 Dec 1999 15:56:55 +0000
Received: from prlw1 by quartz.newn.cam.ac.uk with local (Exim 2.12 #1)
id 11yGnF-0001jz-00
for hackers@postgresql.org; Wed, 15 Dec 1999 15:56:45 +0000
Subject: initdb / pg_version
To: hackers@postgresql.org
Date: Wed, 15 Dec 1999 15:56:45 +0000 (GMT)
From: "Patrick Welche" <prlw1@newn.cam.ac.uk>
Reply-To: prlw1@cam.ac.uk
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <E11yGnF-0001jz-00@quartz.newn.cam.ac.uk>
I just spent some time trying to work out why PG_VERSION contained 6.6 rather
than 7.0 in my freshly initdb'd directory. End result: I don't understand
why after doing a make in src/bin/pg_version, doing a make install recompiles
pg_version even though it was just made. This leads to the problem that I
do the first make as prlw1, then the make install as postgres. As make install
insists on relinking pg_version even though it is up to date, postgres tries
to write pg_version to prlw1's src directory which fails, so it doesn't
install. (I suspect that the general trend is to do everything as user
postgres, but there must be something up with the Makefile..)
Any thoughts to fix the build process?
Cheers,
Patrick
From bouncefilter Wed Dec 15 11:01:38 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id LAA18427
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 11:00:43 -0500 (EST)
(envelope-from vev@michvhf.com)
Date: Wed, 15 Dec 1999 11:00:43 -0500 (EST)
Message-Id: <199912151600.LAA18427@hub.org>
Received: (qmail 4778 invoked by alias); 15 Dec 1999 16:00:41 -0000
Received: from localhost (HELO michvhf.com) (127.0.0.1)
by localhost with SMTP; 15 Dec 1999 16:00:41 -0000
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Subject: Re: [HACKERS] AND &&
From: Vince Vielhaber <vev@michvhf.com>
X-Mailer: TWIG 2.0.0
Cc: hackers@postgreSQL.org
Thomas Lockhart <lockhart@alumni.caltech.edu> said:
I think I asked this before but don't recall seeing an answer. Do we
have a logical AND?Uh, yes. It's called "AND" ;)
That's what I was afraid of.
ERROR: left-hand side of AND is type 'int4', not bool
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Wed Dec 15 11:24:38 1999
Received: from henry.newn.cam.ac.uk (henry.newn.cam.ac.uk [131.111.204.130])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA23468
for <hackers@postgresql.org>; Wed, 15 Dec 1999 11:24:26 -0500 (EST)
(envelope-from prlw1@newn.cam.ac.uk)
Received: from [131.111.204.180] (helo=quartz.newn.cam.ac.uk)
by henry.newn.cam.ac.uk with esmtp (Exim 2.12 #1) id 11yHED-0005K6-00
for hackers@postgresql.org; Wed, 15 Dec 1999 16:24:37 +0000
Received: from prlw1 by quartz.newn.cam.ac.uk with local (Exim 2.12 #1)
id 11yHE3-0001o7-00
for hackers@postgresql.org; Wed, 15 Dec 1999 16:24:27 +0000
Subject: dumpall prob
To: hackers@postgresql.org
Date: Wed, 15 Dec 1999 16:24:27 +0000 (GMT)
From: "Patrick Welche" <prlw1@newn.cam.ac.uk>
Reply-To: prlw1@cam.ac.uk
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <E11yHE3-0001o7-00@quartz.newn.cam.ac.uk>
CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet" using btree ( "ip" "network_ops" );
was generated by dumpall. "network_ops" apparently don't exist (not sure what
is should be called). Changing to
using btree ( "ip" )
was sufficient to fix, but I don't know what it should be to fix dumpall.
patrimoine=> create unique index "ethernet_ip_key" on "ethernet" using btree ( "ip" );
CREATE
patrimoine=> \d ethernet_ip_key
Index "ethernet_ip_key"
Attribute | Type
-----------+------
ip | inet
unique btree
Cheers,
Patrick
From bouncefilter Wed Dec 15 11:30:44 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA24193
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 11:30:02 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id IAA00308;
Wed, 15 Dec 1999 08:29:42 -0800 (PST)
Message-Id: <3.0.1.32.19991215082736.0109b040@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Wed, 15 Dec 1999 08:27:36 -0800
To: Vince Vielhaber <vev@michvhf.com>,
Thomas Lockhart <lockhart@alumni.caltech.edu>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] AND &&
Cc: hackers@postgreSQL.org
In-Reply-To: <199912151600.LAA18427@hub.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 11:00 AM 12/15/99 -0500, Vince Vielhaber wrote:
Thomas Lockhart <lockhart@alumni.caltech.edu> said:
I think I asked this before but don't recall seeing an answer. Do we
have a logical AND?Uh, yes. It's called "AND" ;)
That's what I was afraid of.
ERROR: left-hand side of AND is type 'int4', not bool
SELECT (( sum(case dict.word when 'enable' then 1 else 0 end) && sum(case
dict.word when 'test' then 1 else 0 end)))
try something like
select ((sum(case dict.work when 'enable' then 1 else 0 end) > 0 and
sum(case dict.word when 'test' then 1 else 0 end) > 0))
or perhaps rewrite the query to use "exists"??? That appears to be the
point of this snippet.
Apparently mySQL is misnamed. Perhaps it should be renamed myC-ishQL.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Wed Dec 15 11:45:38 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA29491
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 11:45:13 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id QAA03079;
Wed, 15 Dec 1999 16:49:43 GMT
Sender: lockhart@hub.org
Message-ID: <3857C6A7.87497E1A@alumni.caltech.edu>
Date: Wed, 15 Dec 1999 16:49:43 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: prlw1@cam.ac.uk
CC: hackers@postgreSQL.org
Subject: Re: [HACKERS] dumpall prob
References: <E11yHE3-0001o7-00@quartz.newn.cam.ac.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Patrick Welche wrote:
CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet"
using btree ( "ip" "network_ops" );
was generated by dumpall.
What version? If your example above is verbatim, then there seems to
be a missing comma in the arguments to the USING clause; if you are
using a recent/current version of pg_dump, then it is not likely
fixed...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Dec 15 12:06:38 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA48449
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 12:06:17 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA18450
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 12:05:41 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Date: Wed, 15 Dec 1999 12:05:41 -0500
Message-ID: <18447.945277541@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Who's up for a little language-lawyering discussion?
I have just noticed that our parser is probably in error in treating
GROUP BY and ORDER BY expressions similarly. This came up while
checking whether we were doing the right thing in rejecting
SELECT complicated-expression AS foo FROM table WHERE foo < 42;
Our parser will accept AS-names in ORDER BY and GROUP BY clauses,
but not in WHERE or HAVING. But eyeballing the spec makes it look like
AS-names should *only* be recognized in ORDER BY, nowhere else. The
spec's organization of a SELECT query is
<direct select statement: multiple rows> ::=
<query expression> [ <order by clause> ]
<query specification> ::=
SELECT [ <set quantifier> ] <select list> <table expression>
<table expression> ::=
<from clause>
[ <where clause> ]
[ <group by clause> ]
[ <having clause> ]
(<query expression> reduces to <query specification>s combined by
UNION/INTERSECT/EXCEPT, which are not of interest here).
Now the interesting thing about this is that WHERE, GROUP BY, and HAVING
are all defined to use column names that are defined by the <table
expression> they're in. As far as I can see, that means they can use
column names that come from tables in the FROM clause. There isn't any
suggestion that they can refer to SELECT-list items from the enclosing
<query specification>.
The ORDER BY clause, however, is allowed to reference columns of the
<query expression>'s result --- ie, columns from the <select list>
--- either by name or number. So it's definitely OK to use an AS-name
in ORDER BY.
Currently, because the parser uses the same code to interpret ORDER BY
and GROUP BY lists, it will accept AS-names and column numbers in both
kinds of clauses. Unless I've misread the spec, this is an error.
Can anyone confirm or refute my reasoning?
Next question is, do we want to leave the code as-is, or tighten up
the parser to reject AS-names and column numbers in GROUP BY?
It seems to me we should change it, because there are cases where the
existing code will do the wrong thing according to the SQL spec.
If "foo" is a column name and also an AS-name for something else,
"GROUP BY foo" should group on the raw column according to the spec,
but right now we will pick the SELECT result value instead.
regards, tom lane
From bouncefilter Wed Dec 15 12:23:38 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA50757
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 12:22:54 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA18489;
Wed, 15 Dec 1999 12:21:45 -0500 (EST)
To: prlw1@cam.ac.uk
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] initdb / pg_version
In-reply-to: Your message of Wed, 15 Dec 1999 15:56:45 +0000 (GMT)
<E11yGnF-0001jz-00@quartz.newn.cam.ac.uk>
Date: Wed, 15 Dec 1999 12:21:44 -0500
Message-ID: <18487.945278504@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Patrick Welche" <prlw1@newn.cam.ac.uk> writes:
I just spent some time trying to work out why PG_VERSION contained 6.6
rather than 7.0 in my freshly initdb'd directory. End result: I don't
understand why after doing a make in src/bin/pg_version, doing a make
install recompiles pg_version even though it was just made.
You know, I'd always assumed that it was done that way deliberately
to put an up-to-date build date into pg_version ... but on looking
at the code, pg_version doesn't know anything about its build date.
It just cares about the PG_VERSION string.
Any thoughts to fix the build process?
The dependency on a phony submake target is the problem;
need to put in real dependencies for version.o instead.
Might be easier if version.c were removed from .../utils
and put in bin/pg_version.
regards, tom lane
From bouncefilter Wed Dec 15 12:24:38 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA50959
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 12:24:24 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA18505;
Wed, 15 Dec 1999 12:22:51 -0500 (EST)
To: Vince Vielhaber <vev@michvhf.com>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>, hackers@postgreSQL.org
Subject: Re: [HACKERS] AND &&
In-reply-to: Your message of Wed, 15 Dec 1999 11:00:43 -0500 (EST)
<199912151600.LAA18427@hub.org>
Date: Wed, 15 Dec 1999 12:22:51 -0500
Message-ID: <18503.945278571@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Vince Vielhaber <vev@michvhf.com> writes:
Uh, yes. It's called "AND" ;)
That's what I was afraid of.
ERROR: left-hand side of AND is type 'int4', not bool
1 => 't'::bool, etc.
regards, tom lane
From bouncefilter Wed Dec 15 12:25:38 1999
Received: from henry.newn.cam.ac.uk (henry.newn.cam.ac.uk [131.111.204.130])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA51099
for <hackers@postgresql.org>; Wed, 15 Dec 1999 12:25:16 -0500 (EST)
(envelope-from prlw1@newn.cam.ac.uk)
Received: from [131.111.204.180] (helo=quartz.newn.cam.ac.uk)
by henry.newn.cam.ac.uk with esmtp (Exim 2.12 #1)
id 11yIAz-0005M5-00; Wed, 15 Dec 1999 17:25:21 +0000
Received: from prlw1 by quartz.newn.cam.ac.uk with local (Exim 2.12 #1)
id 11yIAo-0001sw-00; Wed, 15 Dec 1999 17:25:10 +0000
Subject: Re: [HACKERS] dumpall prob
To: lockhart@alumni.caltech.edu (Thomas Lockhart)
Date: Wed, 15 Dec 1999 17:25:10 +0000 (GMT)
From: "Patrick Welche" <prlw1@newn.cam.ac.uk>
Cc: hackers@postgresql.org
Reply-To: prlw1@cam.ac.uk
In-Reply-To: <3857C6A7.87497E1A@alumni.caltech.edu> from "Thomas Lockhart" at
Dec 15, 99 04:49:43 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <E11yIAo-0001sw-00@quartz.newn.cam.ac.uk>
Thomas Lockhart wrote:
Patrick Welche wrote:
CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet"
using btree ( "ip" "network_ops" );
was generated by dumpall.What version? If your example above is verbatim, then there seems to
be a missing comma in the arguments to the USING clause; if you are
using a recent/current version of pg_dump, then it is not likely
fixed...
Oops - my fault. Obviously I pg_dump'd before installing the new one, so
it's the old one that had the "network_ops" problem.
Funnily enough I thought I would pg_dump with the new one and diff it
against the new, but
% pg_dumpall > db.out2
Connection to database 'List' failed.
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
pg_dump failed on List, exiting
... investigating ...
Cheers,
Patrick
From bouncefilter Wed Dec 15 12:29:39 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA51726
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 12:29:12 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA18539;
Wed, 15 Dec 1999 12:27:42 -0500 (EST)
To: Vince Vielhaber <vev@michvhf.com>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>, hackers@postgreSQL.org
Subject: Re: [HACKERS] AND &&
In-reply-to: Your message of Wed, 15 Dec 1999 12:22:51 -0500
<18503.945278571@sss.pgh.pa.us>
Date: Wed, 15 Dec 1999 12:27:41 -0500
Message-ID: <18537.945278861@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
I wrote:
1 => 't'::bool, etc.
Er, ignore that ... I missed the sum() operator. Don Baccus has
more reasonable comments ...
regards, tom lane
From bouncefilter Wed Dec 15 12:38:39 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA56025
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 12:37:59 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id SAA181170
for <pgsql-hackers@postgreSQL.org>; Wed, 15 Dec 1999 18:37:56 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <Y93Q7ZFS>; Wed, 15 Dec 1999 18:37:56 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1C6@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Date: Wed, 15 Dec 1999 18:37:55 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
Next question is, do we want to leave the code as-is, or tighten up
the parser to reject AS-names and column numbers in GROUP BY?
The numbers are also allowed in other DBMS's, so I would leave that as is.
It seems to me we should change it, because there are cases where the
existing code will do the wrong thing according to the SQL spec.
If "foo" is a column name and also an AS-name for something else,
"GROUP BY foo" should group on the raw column according to the spec,
but right now we will pick the SELECT result value instead.
This of course should be handeled the other way around.
Imho the feature to use the AS-names is too convenient,
to drop it alltogether. Remember, that the lable could stand for
a complete subselect, and writing the same subselect again and
again is quite bad for readability.
I would rather extend this AS-names capability to the where
and having clause too.
select
(select max(colname) from syscolumns c
where c.tabid = systables.tabid) as collabel
from systables
where tabname='systables' and collabel matches 'n*';
is imho a very nice and readable syntax .
Andreas
From bouncefilter Wed Dec 15 12:39:39 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA56298
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 12:39:17 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA18584;
Wed, 15 Dec 1999 12:38:14 -0500 (EST)
To: prlw1@cam.ac.uk
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] dumpall prob
In-reply-to: Your message of Wed, 15 Dec 1999 16:24:27 +0000 (GMT)
<E11yHE3-0001o7-00@quartz.newn.cam.ac.uk>
Date: Wed, 15 Dec 1999 12:38:14 -0500
Message-ID: <18582.945279494@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Patrick Welche" <prlw1@newn.cam.ac.uk> writes:
CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet" using btree ( "ip" "network_ops" );
was generated by dumpall. "network_ops" apparently don't exist (not sure what
is should be called).
Current sources dump this as "inet_ops". I think the problem in 6.5.*
was caused by bogus entries in the pg_opclass table (same classname for
inet and cidr types). You could try reaching in and changing the system
table entries, but it might be safer just to live with manually patching
the dump file until the next release.
regards, tom lane
From bouncefilter Wed Dec 15 12:42:39 1999
Received: from henry.newn.cam.ac.uk (henry.newn.cam.ac.uk [131.111.204.130])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA56927
for <hackers@postgresql.org>; Wed, 15 Dec 1999 12:42:21 -0500 (EST)
(envelope-from prlw1@newn.cam.ac.uk)
Received: from [131.111.204.180] (helo=quartz.newn.cam.ac.uk)
by henry.newn.cam.ac.uk with esmtp (Exim 2.12 #1)
id 11yIRc-0005Mb-00; Wed, 15 Dec 1999 17:42:32 +0000
Received: from prlw1 by quartz.newn.cam.ac.uk with local (Exim 2.12 #1)
id 11yIRR-0001u1-00; Wed, 15 Dec 1999 17:42:21 +0000
Subject: Re: [HACKERS] initdb / pg_version
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Wed, 15 Dec 1999 17:42:20 +0000 (GMT)
From: "Patrick Welche" <prlw1@newn.cam.ac.uk>
Cc: hackers@postgresql.org
Reply-To: prlw1@cam.ac.uk
In-Reply-To: <18487.945278504@sss.pgh.pa.us> from "Tom Lane" at Dec 15,
99 12:21:44 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <E11yIRR-0001u1-00@quartz.newn.cam.ac.uk>
Tom Lane wrote:
The dependency on a phony submake target is the problem;
need to put in real dependencies for version.o instead.
Might be easier if version.c were removed from .../utils
and put in bin/pg_version.
Agreed, though not sure what is best. utils/version.c defines
ValidatePgVersion
SetPgVersion
exported in include/version.h. The only source files which reference them
are:
backend/postmaster/postmaster.c uses ValidatePgVersion
bin/pg_version/pg_version.c uses SetPgVersion
backend/utils/init/postinit.c uses ValidatePgVersion
Now, postmaster and postinit don't have the same problem as pg_version
as they both link against SUBSYS.o rather than version.o. I also note that
there are lots of mentions of version.o in backend/Makefile that I don't
follow.
Cheers,
Patrick
From bouncefilter Wed Dec 15 13:20:40 1999
Received: from henry.newn.cam.ac.uk (henry.newn.cam.ac.uk [131.111.204.130])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA65733
for <hackers@postgresql.org>; Wed, 15 Dec 1999 13:20:14 -0500 (EST)
(envelope-from prlw1@newn.cam.ac.uk)
Received: from [131.111.204.180] (helo=quartz.newn.cam.ac.uk)
by henry.newn.cam.ac.uk with esmtp (Exim 2.12 #1)
id 11yJ2G-0005Nj-00; Wed, 15 Dec 1999 18:20:24 +0000
Received: from prlw1 by quartz.newn.cam.ac.uk with local (Exim 2.12 #1)
id 11yJ25-00022w-00; Wed, 15 Dec 1999 18:20:13 +0000
Subject: Re: [HACKERS] dumpall prob
To: lockhart@alumni.caltech.edu (Thomas Lockhart)
Date: Wed, 15 Dec 1999 18:20:12 +0000 (GMT)
From: "Patrick Welche" <prlw1@newn.cam.ac.uk>
Cc: hackers@postgresql.org
Reply-To: prlw1@cam.ac.uk
In-Reply-To: <E11yIAo-0001sw-00@quartz.newn.cam.ac.uk> from "Patrick Welche"
at Dec 15, 99 05:25:10 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-Id: <E11yJ25-00022w-00@quartz.newn.cam.ac.uk>
% pg_dumpall > db.out2
Connection to database 'List' failed.
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.pg_dump failed on List, exiting
... investigating ...
Reason:
In pg_dumpall, line 50 is:
psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 ' | \
which outputs:
% psql -l -A -q -t| tr '|' ' ' | grep -v '^template1 '
List of databases
Database Owner
darwin prlw1
...
(5 rows)
so presumably, it tries to open a connection to "List" as user "of"
this implies that "-q" isn't quite as quiet as it could be...
I tried changing it to
psql -l -A -q -t| tr '|' ' ' | egrep -v '(^template1 |^List of databases|^Database Owner| rows)' | \
as a work around, but then:
\connect template1 ERROR: attribute 'prlw1' not found
create database darwin;
\connect darwin ERROR: attribute 'prlw1' not found
etc
and this is because line 56 wants to read
where usesysid = \'$DBUSERID\'; \" | \
rather than
where usesysid = $DBUSERID; \" | \
Cheers,
Patrick
From bouncefilter Wed Dec 15 14:26:42 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA80669
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 14:26:15 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id LAA29862;
Wed, 15 Dec 1999 11:24:55 -0800 (PST)
Message-Id: <3.0.1.32.19991215111254.010968e0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Wed, 15 Dec 1999 11:12:54 -0800
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
In-Reply-To: <18447.945277541@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 12:05 PM 12/15/99 -0500, Tom Lane wrote:
Who's up for a little language-lawyering discussion?
I have just noticed that our parser is probably in error in treating
GROUP BY and ORDER BY expressions similarly. This came up while
checking whether we were doing the right thing in rejectingSELECT complicated-expression AS foo FROM table WHERE foo < 42;
FWIW, here's what Oracle does:
SQL> select * from foo;
I J
---------- ----------
1 2
SQL> select i as ii from foo where ii=3;
select i as ii from foo where ii=3
*
ERROR at line 1:
ORA-00904: invalid column name
This seems in agreement with PostgreSQL's rejection of the query.
Our parser will accept AS-names in ORDER BY and GROUP BY clauses,
Oracle, again:
SQL> select i as ii from foo where i=1 group by ii;
select i as ii from foo where i=1 group by ii
*
ERROR at line 1:
ORA-00904: invalid column name
BTW, at times at least it seems that PostgreSQL REQUIRES use of the
"as" name in group by, at least I've had queries I've been unable to move
from Oracle to PostgreSQL unless I've done so. It's not consistent,
though, i.e. there's some kind of bug that pops up for some queries.
I've not had time to attempt to figure out exactly what differentiates
queries that work from queries that fail if I don't use the "as" name.
Here's Oracle's pronouncement on order by:
SQL> select i as ii from foo where i=1 order by ii;
II
----------
1
but not in WHERE or HAVING. But eyeballing the spec makes it look like
AS-names should *only* be recognized in ORDER BY, nowhere else.
And this jives with Oracle. I offer this as supporting evidence only,
of course, I'm sure Oracle violates the standard in some ways as well
so we can't take their implementation as being definitive in regard
to standards issues.
<direct select statement: multiple rows> ::=
<query expression> [ <order by clause> ]<query specification> ::=
SELECT [ <set quantifier> ] <select list> <table expression><table expression> ::=
<from clause>
[ <where clause> ]
[ <group by clause> ]
[ <having clause> ](<query expression> reduces to <query specification>s combined by
UNION/INTERSECT/EXCEPT, which are not of interest here).Now the interesting thing about this is that WHERE, GROUP BY, and HAVING
are all defined to use column names that are defined by the <table
expression> they're in.
Well, really it's a scoping issue, not a syntax issue. What is the scope
of an identifier defined by an "as" identifier? Of course, this is simple
enough that they might've been able to encapsulate the scope in the syntax.
Do you have the syntax for the various clauses available? For instance,
two kinds of identifiers might be defined, say a column_id which must
really be the name of a real column and a more general id which is the
union of real column ids and "as" names.
I just looked at the grammar in Date's book, and it says:
order-item ::= { column | integer } [ ASC | DESC ]
and GROUP BY is followed by a "column-ref-commalist"
which would leave me to think that the issue of where an "as" identifier
can be used is addressed semantically, not syntactically, since both
simply refer to "column" identifiers. I don't have time at the
moment to dig into Date's book further to see what he says, I can look
later if you want.
Keep in mind this is the very first time I've looked at the formal
syntax for SQL. I have a background in language-lawyering, though.
Next question is, do we want to leave the code as-is, or tighten up
the parser to reject AS-names and column numbers in GROUP BY?
My personal feeling is that minor extensions, including accidental
ones, work against the goal of standards which is of course to make
it easier to move stuff from one implementation to another. From my
current perspective of moving nearly 9,000 lines of Oracle SQL (just
in the data model, with thousands more in the code that uses it) examples
like this where postgres implements a superset of the standard is a lot
easier to deal with than those areasa where postgres implements a subset
(no outer joins, for instance)!
But philosophically I'm a believer in standards and in making it
as easy as possible to move code back and forth between various
SQL engines.
Can it silently break a query, i.e. are there examples where an
identifier might refer to different columns in the two cases? If not,
I wouldn't worry about it too much though if it were up to me I'd probably
adhere to the standard. Silent breakage (i.e. "working" but returning an
incorrect result compared to the result you'd get with a standard
implementation)
is more insidious as such queries can be hard to uncover when porting
something.
It seems to me we should change it, because there are cases where the
existing code will do the wrong thing according to the SQL spec.
If "foo" is a column name and also an AS-name for something else,
"GROUP BY foo" should group on the raw column according to the spec,
but right now we will pick the SELECT result value instead.
Oops...silent breakage, all right. Bad. Yeah, it should be fixed, I
don't think there should be any question about it - assuming that a
closer reading of the standard verifies that it should work as you
and Oracle both seem to think it should.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Wed Dec 15 14:25:40 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA80532
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 14:25:18 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id LAA29898;
Wed, 15 Dec 1999 11:25:02 -0800 (PST)
Message-Id: <3.0.1.32.19991215111812.010879c0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Wed, 15 Dec 1999 11:18:12 -0800
To: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>,
"'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP
BY/HAVING
In-Reply-To: <219F68D65015D011A8E000006F8590C603FDC1C6@sdexcsrv1.f000.d0
188.sd.spardat.at>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 06:37 PM 12/15/99 +0100, Zeugswetter Andreas SB wrote:
Next question is, do we want to leave the code as-is, or tighten up
the parser to reject AS-names and column numbers in GROUP BY?The numbers are also allowed in other DBMS's, so I would leave that as is.
From Oracle:
SQL> select i from foo group by i;
I
----------
1
SQL> select i from foo group by 1;
select i from foo group by 1
*
ERROR at line 1:
ORA-00979: not a GROUP BY expression
Oracle doesn't appear to allow column numbers here, FWIW and if we
care.
Which dbms's allow it? Or is there an error in my query (I don't
use column numbering, I'm into names myself)?
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Wed Dec 15 14:41:41 1999
Received: from redbox.venux.net (redbox.venux.net [216.47.238.10])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA85961
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 14:40:54 -0500 (EST)
(envelope-from matthew@venux.net)
Received: from thunder (net4842.hcv.com [216.93.48.42])
by redbox.venux.net (Postfix) with SMTP
id BC6D22E227; Wed, 15 Dec 1999 14:35:15 -0500 (EST)
Message-Id: <4.1.19991215143828.00aae6d0@mail.venux.net>
X-Sender: mhagerty@mail.venux.net
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Wed, 15 Dec 1999 14:40:32 -0500
To: Oleg Bartunov <oleg@sai.msu.su>, pgsql-hackers@postgreSQL.org
From: Matthew Hagerty <matthew@venux.net>
Subject: Re: [HACKERS] postmaster dies (6.5.3)
Cc: "E.Rodichev" <er@sai.msu.su>
In-Reply-To: <Pine.GSO.3.96.SK.991215105557.10383h-100000@ra>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Thanks for the patch. I think I'm going to upgrade to FreeBSD-3.3 and
PG-6.5.3 tonight. Will I still need the patch with 6.5.3? I'm also going
to do a connection test on another offline server to see if it is indeed a
load problem. I'll post the results if anyone is interested.
Thank you for the help,
Matthew
At 11:15 AM 12/15/99 +0300, Oleg Bartunov wrote:
Hi,
I got seriuos problem this night with postgres which is running as
db backend to apache. I have cron job which vacuuming database
every hour and it worked for weeks without problem
(well, there is problem with concurrent processes under high load,
but this night was very quiet)Here is the processes currently seen:
167 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
168 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
169 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
170 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
171 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
26578 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
29372 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd discovery
idlefrom apache's error log:
[Wed Dec 15 02:10:08 1999] [error] DBI->connect failed: connectDB() --
couldn't
send startup packet: errno=32
Broken pipe
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138[Wed Dec 15 02:10:08 1999] [error] DBI->connect failed: pqReadData() --
backend
closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138[Wed Dec 15 02:10:43 1999] [error] DBI->connect failed: connectDB() --
connect()
failed: No such file or directory
Is the postmaster running at 'localhost' and accepting connections on Unix
socke
t '5432'?
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138fortunately postmaster was started with debug option:
StartTransactionCommand
query: SET client_encoding = 'KOI8'
ProcessUtility: SET client_encoding = 'KOI8'
CommitTransactionCommand
postmaster: StreamConnection: accept: Invalid argument
/usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6
/usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6
FATAL 1: ReleaseLruFile: No opened files - no one can be closed
proc_exit(0) [#0]
shmem_exit(0) [#0]
exit(0)Aha,
From system log files I found probable explanation - file table overflow !
Could this be a reason of postmaster dead and how to avoid this ?
Dec 15 01:47:27 zeus kernel: Unable to load interpreter
Dec 15 02:09:28 zeus xntpd[103]: kernel pll status change 89
Dec 15 02:10:08 zeus squid[133]: file_open: error opening file
/d4/squid/cache/0
2/69/00001692: (23) File table overflow
Dec 15 02:10:08 zeus squid[133]: storeSwapInStart: Failed for
'http://xyz.tvcom.
ru/99/12/100_2.jpg'
Dec 15 02:10:12 zeus kernel: Unable to load interpreter
Dec 15 03:26:16 zeus xntpd[103]: kernel pll status change 89Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83************
From bouncefilter Wed Dec 15 14:57:41 1999
Received: from redbox.venux.net (redbox.venux.net [216.47.238.10])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA90973
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 14:57:23 -0500 (EST)
(envelope-from matthew@venux.net)
Received: from thunder (net4842.hcv.com [216.93.48.42])
by redbox.venux.net (Postfix) with SMTP
id D95BC2E227; Wed, 15 Dec 1999 14:51:47 -0500 (EST)
Message-Id: <4.1.19991215145654.009a5d10@mail.venux.net>
X-Sender: mhagerty@mail.venux.net
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Wed, 15 Dec 1999 14:57:04 -0500
To: Tatsuo Ishii <t-ishii@sra.co.jp>, tgl@sss.pgh.pa.us
From: Matthew Hagerty <matthew@venux.net>
Subject: Re: [HACKERS] Re: Backend core dump, Please help, Urgent!
Cc: pgsql-hackers@postgreSQL.org
In-Reply-To: <19991215204333E.t-ishii@sra.co.jp>
References: <16289.945207576@sss.pgh.pa.us>
<4.1.19991214124701.0416e100@mail.venux.net>
<16289.945207576@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Thanks for the patch. I think I'm going to upgrade to FreeBSD-3.3 and
PG-6.5.3 tonight. Will I still need the patch with 6.5.3? I'm also going
to do a connection test on another offline server to see if it is indeed a
load problem. I'll post the results if anyone is interested.
Thank you for the help,
Matthew
At 08:43 PM 12/15/99 +0900, Tatsuo Ishii wrote:
Sure sounds like a corrupted-data problem. Can you use gdb on the
corefiles to get a backtrace of what they were doing?My biggest hang-up is why all of a sudden?
Good question. We'll probably know the answer when we find the problem.
Besides the problem Tom has pointed out its possibility, there is a
known problem with 6.5.x on FreeBSD. It would be rather important,
since it results in a core dump as well. The problem occurs while a
backend is waiting for acquiring a lock. Thus it tends to happen on
relatively heavy load (I observed the problem starting with 4
concurrent transactions). As far as I know, Linux does not have the
problem at all, but FreeBSD does. I'm not sure about other
platforms. Solaris seems to be not suffered.You could try following patch. It was made for 6.5.3, but you could
apply it to 6.5.1 or 6.5.2 as well. Current has been already fixed
with more complex and long-term-aid solution. But I would prefer to
minimize the impact to existing releases. Keeping that in mind, I have
made the patch the simplest.
--
Tatsuo Ishii---------------------------- cut here ----------------------------- *** postgresql-6.5.3/src/backend/storage/lmgr/lock.c~ Sat May 29 15:14:42 1999 --- postgresql-6.5.3/src/backend/storage/lmgr/lock.c Mon Dec 13 16:45:47 1999 *************** *** 940,946 **** { PROC_QUEUE *waitQueue = &(lock->waitProcs); LOCKMETHODTABLE *lockMethodTable = LockMethodTable[lockmethod]; ! char old_status[64], new_status[64];Assert(lockmethod < NumLockMethods); --- 940,946 ---- { PROC_QUEUE *waitQueue = &(lock->waitProcs); LOCKMETHODTABLE *lockMethodTable = LockMethodTable[lockmethod]; ! static char old_status[64], new_status[64];Assert(lockmethod < NumLockMethods);
From bouncefilter Wed Dec 15 14:59:42 1999
Received: from redbox.venux.net (redbox.venux.net [216.47.238.10])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA91214
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 14:58:42 -0500 (EST)
(envelope-from matthew@venux.net)
Received: from thunder (net4842.hcv.com [216.93.48.42])
by redbox.venux.net (Postfix) with SMTP
id 502D12E228; Wed, 15 Dec 1999 14:53:06 -0500 (EST)
Message-Id: <4.1.19991215145750.009e0910@mail.venux.net>
X-Sender: mhagerty@mail.venux.net
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Wed, 15 Dec 1999 14:58:22 -0500
To: Oleg Bartunov <oleg@sai.msu.su>, pgsql-hackers@postgreSQL.org
From: Matthew Hagerty <matthew@venux.net>
Subject: Re: [HACKERS] postmaster dies (6.5.3)
Cc: "E.Rodichev" <er@sai.msu.su>
In-Reply-To: <4.1.19991215143828.00aae6d0@mail.venux.net>
References: <Pine.GSO.3.96.SK.991215105557.10383h-100000@ra>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Umm, sorry, I hit reply to the wrong message...
Matthew
At 02:40 PM 12/15/99 -0500, Matthew Hagerty wrote:
Thanks for the patch. I think I'm going to upgrade to FreeBSD-3.3 and
PG-6.5.3 tonight. Will I still need the patch with 6.5.3? I'm also going
to do a connection test on another offline server to see if it is indeed a
load problem. I'll post the results if anyone is interested.Thank you for the help,
MatthewAt 11:15 AM 12/15/99 +0300, Oleg Bartunov wrote:
Hi,
I got seriuos problem this night with postgres which is running as
db backend to apache. I have cron job which vacuuming database
every hour and it worked for weeks without problem
(well, there is problem with concurrent processes under high load,
but this night was very quiet)Here is the processes currently seen:
167 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
168 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
169 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
170 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
171 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
26578 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd nature
idle
29372 ? S 0:00 /usr/local/pgsql/bin/postgres localhost httpd discovery
idlefrom apache's error log:
[Wed Dec 15 02:10:08 1999] [error] DBI->connect failed: connectDB() --
couldn't
send startup packet: errno=32
Broken pipe
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138[Wed Dec 15 02:10:08 1999] [error] DBI->connect failed: pqReadData() --
backend
closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138[Wed Dec 15 02:10:43 1999] [error] DBI->connect failed: connectDB() --
connect()
failed: No such file or directory
Is the postmaster running at 'localhost' and accepting connections on Unix
socke
t '5432'?
at /opt/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138fortunately postmaster was started with debug option:
StartTransactionCommand
query: SET client_encoding = 'KOI8'
ProcessUtility: SET client_encoding = 'KOI8'
CommitTransactionCommand
postmaster: StreamConnection: accept: Invalid argument
/usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6
/usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6
FATAL 1: ReleaseLruFile: No opened files - no one can be closed
proc_exit(0) [#0]
shmem_exit(0) [#0]
exit(0)Aha,
From system log files I found probable explanation - file table overflow !
Could this be a reason of postmaster dead and how to avoid this ?
Dec 15 01:47:27 zeus kernel: Unable to load interpreter
Dec 15 02:09:28 zeus xntpd[103]: kernel pll status change 89
Dec 15 02:10:08 zeus squid[133]: file_open: error opening file
/d4/squid/cache/0
2/69/00001692: (23) File table overflow
Dec 15 02:10:08 zeus squid[133]: storeSwapInStart: Failed for
'http://xyz.tvcom.
ru/99/12/100_2.jpg'
Dec 15 02:10:12 zeus kernel: Unable to load interpreter
Dec 15 03:26:16 zeus xntpd[103]: kernel pll status change 89Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83************
************
From bouncefilter Wed Dec 15 15:44:41 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA03613
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 15:44:08 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id VAA09626
for <pgsql-hackers@postgreSQL.org>; Wed, 15 Dec 1999 21:30:12 +0100
Date: Wed, 15 Dec 1999 21:30:11 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: pg_dump --help
Message-ID: <Pine.LNX.3.96.991215210710.15100J-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
and see:
$ pg_dump --help
/usr/lib/postgresql/bin/pg_dump: invalid option -- -
hmm ?
Prepare anyone long options for pg_dump, pg_passwd, pg_version ?
If not, I make it, current state is disgraceful.
Karel
PS. If I meet with any mazy M$-Win user I always tell him: "..in
open-source software we have good practice, all software has
nice face and open work with unknow software is easy..."
----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------
From bouncefilter Thu Dec 16 09:39:55 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA32866
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 09:38:57 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <ZAKMYY1K>; Thu, 16 Dec 1999 16:35:42 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C359@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'Tom Lane '" <tgl@sss.pgh.pa.us>, "'pgsql-hackers@postgreSQL.org '"
<pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Date: Wed, 15 Dec 1999 22:47:51 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
Hi, Tom,
It's my understanding that WHERE and GROUP BY will only accept table or view
columns, while ORDER BY and HAVING will accept SELECT columns (aliases) as
well. I'll double check this with Oracle (Oracle tends to be pretty SQL
compliant), but it makes sense to me.
So according to my view of the world ;-) HAVING is broken, because it
rejects aliases, and GROUP BY is broken because it accepts them. Of course,
I haven't looked at the spec, and Oracle could adhere to an older spec which
may have changed. At least I don't have to take any responsibility for my
claims ;-)
OK, I've just checked it against Oracle, and what you had originally seems
to be the way to go: no aliases for WHERE, GROUP BY, or HAVING. However,
aggregates are allowed in the HAVING clause. Also, aliases are allowed for
ORDER BY.
So, according to Oracle's view of the world, HAVING is orrect because it
rejects aliases, but GROUP BY is broken because it accepts them.
MikeA
-----Original Message-----
From: Tom Lane
To: pgsql-hackers@postgreSQL.org
Sent: 99/12/15 07:05
Subject: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Who's up for a little language-lawyering discussion?
I have just noticed that our parser is probably in error in treating
GROUP BY and ORDER BY expressions similarly. This came up while
checking whether we were doing the right thing in rejecting
SELECT complicated-expression AS foo FROM table WHERE foo < 42;
Our parser will accept AS-names in ORDER BY and GROUP BY clauses,
but not in WHERE or HAVING. But eyeballing the spec makes it look like
AS-names should *only* be recognized in ORDER BY, nowhere else. The
spec's organization of a SELECT query is
<direct select statement: multiple rows> ::=
<query expression> [ <order by clause> ]
<query specification> ::=
SELECT [ <set quantifier> ] <select list> <table
expression>
<table expression> ::=
<from clause>
[ <where clause> ]
[ <group by clause> ]
[ <having clause> ]
(<query expression> reduces to <query specification>s combined by
UNION/INTERSECT/EXCEPT, which are not of interest here).
Now the interesting thing about this is that WHERE, GROUP BY, and HAVING
are all defined to use column names that are defined by the <table
expression> they're in. As far as I can see, that means they can use
column names that come from tables in the FROM clause. There isn't any
suggestion that they can refer to SELECT-list items from the enclosing
<query specification>.
The ORDER BY clause, however, is allowed to reference columns of the
<query expression>'s result --- ie, columns from the <select list>
--- either by name or number. So it's definitely OK to use an AS-name
in ORDER BY.
Currently, because the parser uses the same code to interpret ORDER BY
and GROUP BY lists, it will accept AS-names and column numbers in both
kinds of clauses. Unless I've misread the spec, this is an error.
Can anyone confirm or refute my reasoning?
Next question is, do we want to leave the code as-is, or tighten up
the parser to reject AS-names and column numbers in GROUP BY?
It seems to me we should change it, because there are cases where the
existing code will do the wrong thing according to the SQL spec.
If "foo" is a column name and also an AS-name for something else,
"GROUP BY foo" should group on the raw column according to the spec,
but right now we will pick the SELECT result value instead.
regards, tom lane
************
From bouncefilter Wed Dec 15 18:27:43 1999
Received: from redbox.venux.net (redbox.venux.net [216.47.238.10])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA35778
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 18:26:52 -0500 (EST)
(envelope-from matthew@venux.net)
Received: from thunder (net4842.hcv.com [216.93.48.42])
by redbox.venux.net (Postfix) with SMTP id 6A5392E20B
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 18:21:16 -0500 (EST)
Message-Id: <4.1.19991215180215.00ab0590@mail.venux.net>
X-Sender: mhagerty@mail.venux.net
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Wed, 15 Dec 1999 18:26:31 -0500
To: pgsql-hackers@postgreSQL.org
From: Matthew Hagerty <matthew@venux.net>
Subject: Postmaster options, process spawning, logging, etc.
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Greetings,
Sorry for all the posts, but I'm trying to put my finger on my backend crash.
Any insight on any of the following would be very helpful:
How many backend processes is considered a large number? The man pages
says the default is 32. Does anyone set their number higher?
Kind of related to the question above; when does the postmaster spawn
another backend process? Is it for each additional connection, or will
each backend process handle several connections/queries before another
process is started?
The postmaster log file, why are the entries not datestamped? If I start
the postmaster with a debug level of 2 or greater do I get datestamped
entries? Also, what is the highest debug level and how big can I expect
the log to grow? Can I rotate the log without stopping the postmaster?
What is the pg_log file in the data directory?
What are the major system resources used by postgres, i.e. semaphores, file
handles, mbufs, etc.? I'm trying to determine if I have my resources
configured high enough for my user base.
Again, thank you! I'll try not to be such a problem in the future! :)
Matthew
From bouncefilter Wed Dec 15 18:33:43 1999
Received: from finch-post-10.mail.demon.net (finch-post-10.mail.demon.net
[194.217.242.38]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA39069
for <hackers@postgresql.org>; Wed, 15 Dec 1999 18:33:23 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by finch-post-10.mail.demon.net with esmtp (Exim 2.12 #1)
id 11yNv8-000F5n-0A
for hackers@postgreSQL.org; Wed, 15 Dec 1999 23:33:22 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id XAA26727; Wed, 15 Dec 1999 23:33:17 GMT
Message-Id: <199912152333.XAA26727@mtcc.demon.co.uk>
Date: Wed, 15 Dec 1999 23:33:17 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: NOTICE: LockRelease: locktable lookup failed, no lock
To: hackers@postgresql.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: gc5TkdDnOOeHjCKXlW5JZg==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
Since the new parallel regression tests I've always had a few
lock NOTICE messages like the following.
In my latest run (from a CVS update today) I seem to have
a significantly higher level of failures and NOTICE messages.
I'm not sure where to look for the problem.
Platform Is Solaris 7 SPARC.
Here's just a sample from the 1st few parallel tests:-
bash-2.03$ ./checkresults | more
====== boolean ======
0a1,2
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
====== varchar ======
0a1,2
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: xid table corrupted
====== int2 ======
0a1,4
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
10c14
From bouncefilter Wed Dec 15 18:41:43 1999
Received: from redbox.venux.net (redbox.venux.net [216.47.238.10])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA39976
for <pgsql-hackers@postgresql.org>;
Wed, 15 Dec 1999 18:41:02 -0500 (EST)
(envelope-from matthew@venux.net)
Received: from thunder (net4842.hcv.com [216.93.48.42])
by redbox.venux.net (Postfix) with SMTP id 31E1B2E20B
for <pgsql-hackers@postgresql.org>;
Wed, 15 Dec 1999 18:35:26 -0500 (EST)
Message-Id: <4.1.19991215183733.00a08e90@mail.venux.net>
X-Sender: mhagerty@mail.venux.net
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Wed, 15 Dec 1999 18:40:40 -0500
To: pgsql-hackers@postgresql.org
From: Matthew Hagerty <matthew@venux.net>
Subject: Finding corrupt data
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Greetings,
If there was corrupt data in a table, how would one go about finding it?
Is it possible that corrupt data could cause a backend crash?
Thank you,
Matthew
From bouncefilter Wed Dec 15 18:43:46 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA40329
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 18:43:24 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id PAA24228;
Wed, 15 Dec 1999 15:43:04 -0800 (PST)
Message-Id: <3.0.1.32.19991215154059.010a17e0@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Wed, 15 Dec 1999 15:40:59 -0800
To: Matthew Hagerty <matthew@venux.net>, pgsql-hackers@postgreSQL.org
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Postmaster options, process spawning, logging,
etc.
In-Reply-To: <4.1.19991215180215.00ab0590@mail.venux.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 06:26 PM 12/15/99 -0500, Matthew Hagerty wrote:
How many backend processes is considered a large number? The man pages
says the default is 32. Does anyone set their number higher?
That would depend on your situation. I use AOLserver to service
my web site. It maintains a pool of persistent connections and
I throttle the number of connections to the database via the
web server. So, I like having a high limit on backend processes
for the postmaster itself, and 32 suits me fine. I like throttling
at the webserver level because I can throttle on individual virtual
servers, etc.
Kind of related to the question above; when does the postmaster spawn
another backend process? Is it for each additional connection,
Yes. Each connection. I assume your PHP environment includes some
means to allocate a database handle either out of a persistent pool
or otherwise. Each time that pool mechanism opens a database
connection the postmaster forks a new backend process. It goes
away when you close a connection (normally, unless the backend
crashes etc).
or will
each backend process handle several connections/queries before another
process is started?
Once forked, the process stays alive until the connection's closed.
You can feed that process as many queries as you want in serial
fashion.
However, in practice, the API you're using to connect PHP to the
database may or may not pool persistent connections. In this case,
it will probably be shutting down and reopening connections
frequently, say once per web page or the like.
I'll leave your other questions to folks who know more about
postgres specifics.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Wed Dec 15 18:43:43 1999
Received: from thelab.hub.org (nat196.191.mpoweredpc.net [142.177.196.191])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA40346
for <pgsql-hackers@postgresql.org>;
Wed, 15 Dec 1999 18:43:37 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id TAA49002;
Wed, 15 Dec 1999 19:43:34 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Wed, 15 Dec 1999 19:43:34 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Matthew Hagerty <matthew@venux.net>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
In-Reply-To: <4.1.19991215180215.00ab0590@mail.venux.net>
Message-ID: <Pine.BSF.4.21.9912151941500.651-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 15 Dec 1999, Matthew Hagerty wrote:
Greetings,
Sorry for all the posts, but I'm trying to put my finger on my backend crash.
Any insight on any of the following would be very helpful:
How many backend processes is considered a large number? The man pages
says the default is 32. Does anyone set their number higher?Kind of related to the question above; when does the postmaster spawn
another backend process? Is it for each additional connection, or will
each backend process handle several connections/queries before another
process is started?
spawns a new backend for each new connection...
The postmaster log file, why are the entries not datestamped? If I start
the postmaster with a debug level of 2 or greater do I get datestamped
entries? Also, what is the highest debug level and how big can I expect
the log to grow? Can I rotate the log without stopping the postmaster?
pg_options provides the ability to send the log to syslog, which would
give you both the timestamping, and the ability to 'cleanly' rotate the
logs...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Wed Dec 15 18:47:44 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA41086
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 18:47:28 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id SAA19764;
Wed, 15 Dec 1999 18:46:52 -0500 (EST)
To: Matthew Hagerty <matthew@venux.net>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
In-reply-to: Your message of Wed, 15 Dec 1999 18:26:31 -0500
<4.1.19991215180215.00ab0590@mail.venux.net>
Date: Wed, 15 Dec 1999 18:46:52 -0500
Message-ID: <19762.945301612@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Matthew Hagerty <matthew@venux.net> writes:
How many backend processes is considered a large number? The man pages
says the default is 32. Does anyone set their number higher?
I've run test cases with 100, which is about as high as I can go on my
personal box without running out of swap space. I think some people
are using several hundred.
Kind of related to the question above; when does the postmaster spawn
another backend process? Is it for each additional connection,
Per connection. The backend quits when the client disconnects. Of
course, it's up to the client how long it stays connected or how many
queries it asks...
The postmaster log file, why are the entries not datestamped?
Uncomment #define ELOG_TIMESTAMPS in include/config.h after configure
and before make...
Also, what is the highest debug level and how big can I expect
the log to grow? Can I rotate the log without stopping the postmaster?
Not very readily. There is someone working on using syslog logging,
which'd be a lot nicer than what we have.
What is the pg_log file in the data directory?
Transaction commit data. Don't touch it ;-). It shouldn't be all that
big, though...
What are the major system resources used by postgres, i.e. semaphores, file
handles, mbufs, etc.? I'm trying to determine if I have my resources
configured high enough for my user base.
In 6.5, the postmaster won't start up if you don't have enough
semaphores and shared memory. I've never heard of anyone running out of
file handles, but it certainly seems possible if you start enough
backends. Still, though, I wouldn't expect a hard coredump such as you
are getting from running out of any of these resources. There should at
least be something showing up in the postmaster log if we fail to open a
file or something like that...
regards, tom lane
From bouncefilter Wed Dec 15 19:14:44 1999
Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA48553
for <pgsql-hackers@postgresql.org>;
Wed, 15 Dec 1999 19:13:58 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.93.40.30]) by mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Wed, 15 Dec 1999 18:14:18 -0600
Sender: ed
Message-ID: <38582F01.9C35A243@austin.rr.com>
Date: Wed, 15 Dec 1999 18:14:57 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
References: <12685.945123878@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Ed Loehr <ELOEHR@austin.rr.com> writes:
Anyone know what this error is or how to prevent it? Seems to
usually show up on large queries...
"ExecInitIndexScan: both left and right op's are rel-vars"Sounds like you've found a bug. How about a specific example of
a query that causes this?
Unfortunately, this is the simplest example I have to offer. The
following query succeeds numerous times before going into a continuous
failure mode due to the error above. Vacuuming the DB fixes the
problem temporarily "for a while".
SELECT sum( cet.default_budget_per_unit * cahrn.hr_count )
FROM contract_activity_hr_need cahrn, contract_expense_type cet,
contract_activity_type_expense_type catet,
contract_activity_type cat, activity pa
WHERE -- lame attempt at making this easy on the eye...
cet.contract_id = 1 AND catet.contract_id = 1 AND
cahrn.contract_id = 1 AND pa.contract_id = 1 AND
cat.contract_id = 1 AND cet.expense_unit_id = 6 AND
pa.activity_state_id <> 5 AND
pa.activity_state_id <> 4 AND
(pa.billable = 0 OR cahrn.billable = 0) AND
catet.expense_type_id = cet.expense_type_id AND
catet.activity_type_id = cat.activity_type_id AND
cahrn.contract_activity_type_id = cat.id AND
pa.activity_type_id = cat.activity_type_id;
Without including the rather lengthy schema definition for the 5
tables involved, let me clarify the data types of the example by
saying that every single column in the query above is of type INTEGER
except for cet.default_budget_per_unit in the SELECT clause, which is
of type FLOAT8. Note that all columns above ending in 'XXX_id' are
foreign keys referencing the 'id' column of the 'XXX' table, which is
declared as type SERIAL. Note also that every table has a couple of
book-keeping columns ('creation_time' and 'record_status'). For
example, cet.contract_id is an INTEGER value acting as a foreign key
to the 'contract' table:
CREATE TABLE contract (
id SERIAL, -- pkey, ref'd as fkey 'contract_id'
...
creation_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
record_status INTEGER NOT NULL DEFAULT 1
);
CREATE TABLE contract_expense_type (
id SERIAL,
contract_id INTEGER NOT NULL, -- fkey to contract table
...
creation_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
record_status INTEGER NOT NULL DEFAULT 1
);
One might suspect the size of my tuples might be a factor. I believe
my **largest** rowsize in any table is 152 bytes, though I'm not sure
how VARCHARs are sized (all my varchar values are considerably less
than 256 bytes, and rarely are there more than 2 of these in a table).
I think the error comes from line 862 of
.../src/backend/executor/nodeIndexscan.c, though it's possible it may
have come at times from line 925 of the same file (a similar error msg
differing only by an apostrophe).
Other current configuration details:
Pgsql configured with: ./configure --prefix=/usr/local/pgsql
-with-odbc
PG: PostgreSQL 6.5.2 on i686-pc-linux-gnu, compiled by gcc
egcs-2.91.66
OS: RH6.1 Linux XXX 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT
1999 i686 unknown,
HW: dual P3 600Mhz w/1Gb RAM and 3 UW 9Gb SCSI drives in software
RAID.
SW: Apache 1.3.9 with mod_ssl 2.4.9, mod_perl 1.21, DBI 1.13,
DBD/Pg 0.92
I've also seen this problem on RH6.0, Pg6.5.2, Linux2.2.12-15,
512MbRAM, dual450MhzP3, NoRAID, mod_ssl 2.4.5...
Any help would be greatly appreciated. I can code around this, of
course, but it'd be nice...
Cheers,
Ed Loehr
From bouncefilter Wed Dec 15 20:21:45 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA59909
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 20:21:33 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA11097;
Wed, 15 Dec 1999 20:17:44 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912160117.UAA11097@candle.pha.pa.us>
Subject: Re: [HACKERS] dumpall prob
In-Reply-To: <18582.945279494@sss.pgh.pa.us> from Tom Lane at "Dec 15,
1999 12:38:14 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Wed, 15 Dec 1999 20:17:44 -0500 (EST)
CC: prlw1@cam.ac.uk, hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
"Patrick Welche" <prlw1@newn.cam.ac.uk> writes:
CREATE UNIQUE INDEX "ethernet_ip_key" on "ethernet" using btree ( "ip" "network_ops" );
was generated by dumpall. "network_ops" apparently don't exist (not sure what
is should be called).Current sources dump this as "inet_ops". I think the problem in 6.5.*
was caused by bogus entries in the pg_opclass table (same classname for
inet and cidr types). You could try reaching in and changing the system
table entries, but it might be safer just to live with manually patching
the dump file until the next release.
Fixed in the current source tree.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 15 20:25:44 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA60368
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 20:25:29 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA11353;
Wed, 15 Dec 1999 20:25:07 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912160125.UAA11353@candle.pha.pa.us>
Subject: Re: [HACKERS] pg_dump --help
In-Reply-To: <Pine.LNX.3.96.991215210710.15100J-100000@ara.zf.jcu.cz> from
Karel Zak - Zakkr at "Dec 15, 1999 09:30:11 pm"
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
Date: Wed, 15 Dec 1999 20:25:07 -0500 (EST)
CC: pgsql-hackers <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Hi,
and see:
$ pg_dump --help
/usr/lib/postgresql/bin/pg_dump: invalid option -- -hmm ?
Prepare anyone long options for pg_dump, pg_passwd, pg_version ?
If not, I make it, current state is disgraceful.
#$ pg_dump -h
pg_dump: option requires an argument -- h
usage: pg_dump [options] dbname
-a dump out only the data, no schema
-c clean(drop) schema prior to create
-d dump data as proper insert strings
-D dump data as inserts with attribute names
-f filename script output filename
-h hostname server host name
-n suppress most quotes around identifiers
-N enable most quotes around identifiers
-o dump object id's (oids)
-p port server port number
-s dump out only the schema, no data
-t table dump for this table only
-u use password authentication
-v verbose
-x do not dump ACL's (grant/revoke)
If dbname is not supplied, then the DATABASE environment variable value
is used.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Someone submitted this patch. It should fix your problem. It will
appear in the next release.
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique index
dns=> select * from test;
zone|net
- ----+--------
1|1.2.3/24
1|2.3.4/24
1|1.2.3/24
(3 rows)Once a unique error is reported, uniqueness seems to be maintained.
Also, if you enter 4 values, then try a duplicate, it all works.The threshold seems to be 3.
A select before the duplicate add also seems to fix it.
~f
************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Attachments:
Fixed by recently submitted patch.
Vadim Mikheev <vadim@krs.ru> writes:
Yes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):Yes. Looks like the low-order bits of a CIDR address are garbage,
but network_cmp() compares them as though all bits are significant.
So, indeed, it may think two different instances of '1.2.3/24'
are not equal.The regular inet comparison functions at least *try* to mask out
garbage bits, but I think they get it wrong too --- they should be
taking the smaller of ip_bits(a1) and ip_bits(a2) as the number of
bits to compare. They don't. Thus, for example,regression=> select '1.2.5/16'::cidr < '1.2.3/24'::cidr;
?column?
--------
f
(1 row)which looks wrong to me.
In short, it's a bug in the inet data types, not a generic problem
with unique indexes.regards, tom lane
************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Never mind. Patch is fir mac, not inet.
Vadim Mikheev <vadim@krs.ru> writes:
Yes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):Yes. Looks like the low-order bits of a CIDR address are garbage,
but network_cmp() compares them as though all bits are significant.
So, indeed, it may think two different instances of '1.2.3/24'
are not equal.The regular inet comparison functions at least *try* to mask out
garbage bits, but I think they get it wrong too --- they should be
taking the smaller of ip_bits(a1) and ip_bits(a2) as the number of
bits to compare. They don't. Thus, for example,regression=> select '1.2.5/16'::cidr < '1.2.3/24'::cidr;
?column?
--------
f
(1 row)which looks wrong to me.
In short, it's a bug in the inet data types, not a generic problem
with unique indexes.regards, tom lane
************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Never mind. Patch is fir mac, not inet. Sorry.
Problem still exists.
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique index
dns=> select * from test;
zone|net
- ----+--------
1|1.2.3/24
1|2.3.4/24
1|1.2.3/24
(3 rows)Once a unique error is reported, uniqueness seems to be maintained.
Also, if you enter 4 values, then try a duplicate, it all works.The threshold seems to be 3.
A select before the duplicate add also seems to fix it.
~f
************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 15 22:10:46 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA82437
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 22:10:00 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA20396;
Wed, 15 Dec 1999 22:09:28 -0500 (EST)
To: Matthew Hagerty <matthew@venux.net>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Finding corrupt data
In-reply-to: Your message of Wed, 15 Dec 1999 18:40:40 -0500
<4.1.19991215183733.00a08e90@mail.venux.net>
Date: Wed, 15 Dec 1999 22:09:27 -0500
Message-ID: <20394.945313767@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Matthew Hagerty <matthew@venux.net> writes:
Is it possible that corrupt data could cause a backend crash?
Absolutely. The scenario I've seen most is that the length word of a
variable-length field value (a "varlena" value in pghackers-speak)
contains garbage. The backend comes along and tries to allocate space
equal to the claimed field length in order to copy the value to
someplace, and the usual result is that the backend process exceeds
its allowed memory usage and is summarily killed by the kernel.
If there was corrupt data in a table, how would one go about finding it?
The brute-force way is to do a SELECT * or COPY TO and see if the
backend survives ;-). If not, narrowing down which record is bad
is left as an exercise for the student...
regards, tom lane
From bouncefilter Wed Dec 15 22:37:51 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA88389
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 22:37:14 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id WAA23183;
Wed, 15 Dec 1999 22:36:37 -0500 (EST)
To: Keith Parks <emkxp01@mtcc.demon.co.uk>
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
In-reply-to: Your message of Wed, 15 Dec 1999 23:33:17 +0000 (GMT)
<199912152333.XAA26727@mtcc.demon.co.uk>
Date: Wed, 15 Dec 1999 22:36:37 -0500
Message-ID: <23179.945315397@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Since the new parallel regression tests I've always had a few
lock NOTICE messages like the following.
Interesting --- I had not run the parallel test for a while,
but I tried it just now and got half a dozen of these:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)
Something's been broken fairly recently. Does anyone have an
idea what changed?
regards, tom lane
From bouncefilter Wed Dec 15 22:47:45 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA89433
for <hackers@postgreSQL.org>; Wed, 15 Dec 1999 22:46:51 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA17074;
Wed, 15 Dec 1999 22:46:31 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912160346.WAA17074@candle.pha.pa.us>
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
In-Reply-To: <23179.945315397@sss.pgh.pa.us> from Tom Lane at "Dec 15,
1999 10:36:37 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Wed, 15 Dec 1999 22:46:31 -0500 (EST)
CC: Keith Parks <emkxp01@mtcc.demon.co.uk>, hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Since the new parallel regression tests I've always had a few
lock NOTICE messages like the following.Interesting --- I had not run the parallel test for a while,
but I tried it just now and got half a dozen of these:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Something's been broken fairly recently. Does anyone have an
idea what changed?
Good question. I can't imagine what it would be. We didn't do much,
and parallel regression is not that old.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 15 23:03:46 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA94224
for <pgsql-hackers@postgreSQL.org>;
Wed, 15 Dec 1999 23:03:41 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id XAA23310;
Wed, 15 Dec 1999 23:03:08 -0500 (EST)
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
In-reply-to: Your message of Wed, 15 Dec 1999 18:14:57 -0600
<38582F01.9C35A243@austin.rr.com>
Date: Wed, 15 Dec 1999 23:03:08 -0500
Message-ID: <23308.945316988@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Ed Loehr <ELOEHR@austin.rr.com> writes:
Sounds like you've found a bug. How about a specific example of
a query that causes this?
Unfortunately, this is the simplest example I have to offer. The
following query succeeds numerous times before going into a continuous
failure mode due to the error above. Vacuuming the DB fixes the
problem temporarily "for a while".
Oh my, *that's* interesting. I have no idea what could be causing that.
The error message you're getting suggests that the planner is generating
an incorrect plan tree for the query, which I'd believe soon enough,
but I don't understand why the behavior would change over time.
A VACUUM could change the planner's results by altering the stored
statistics for the tables --- but if you're not vacuuming, the plan
should be the same every time.
Does the EXPLAIN output showing the query plan change from when it's
working to when it's not? What would really be helpful is to see the
EXPLAIN VERBOSE output in both states (preferably, the pretty-printed
version that gets put in the postmaster log file, not the compressed
version that gets sent to the client).
Also, what indexes do you have on these tables?
regards, tom lane
From bouncefilter Thu Dec 16 01:34:47 1999
Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA20435
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 01:34:32 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.93.40.30]) by mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Thu, 16 Dec 1999 00:34:48 -0600
Sender: ed
Message-ID: <3858882F.3AEAE401@austin.rr.com>
Date: Thu, 16 Dec 1999 00:35:27 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
References: <23308.945316988@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Ed Loehr <ELOEHR@austin.rr.com> writes:
... query succeeds numerous times before going into a continuous
failure mode due to the error above. Vacuuming the DB fixes the
problem "for a while".Oh my, *that's* interesting. I have no idea what could be causing that.
The error message you're getting suggests that the planner is generating
an incorrect plan tree for the query, which I'd believe soon enough,
but I don't understand why the behavior would change over time.
A VACUUM could change the planner's results by altering the stored
statistics for the tables --- but if you're not vacuuming, the plan
should be the same every time.
No intermediate vacuuming is occurring, AFAIK (though I'm trying to figure
out how to trigger vacuuming on this error). Speculating, does the genetic
algorithm twiddle any of the planner's stats? I ask because I know some
of my other queries involve 6 or more tables, and I seem to recall that was
a trigger point for genetic algorithms to kick in with default settings.
I am running with defaults.
Does the EXPLAIN output showing the query plan change from when it's
working to when it's not? What would really be helpful is to see the
EXPLAIN VERBOSE output in both states (preferably, the pretty-printed
version that gets put in the postmaster log file, not the compressed
version that gets sent to the client).
I will attempt to capture EXPLAIN output for the problem situation.
Also, what indexes do you have on these tables?
I have single-column indices on most every foreign key field (ie,
contract_id), some unique and some not, and on every primary key field
(i.e., 'id' in the 'contract' table). I have a few multi-column indices.
The only types I use in the entire database are INTEGER, SERIAL, FLOAT8,
DATETIME, and VARCHAR, and I have indices involving on all of these types
at one point or another. I also have a few of what I'd call "overlapping"
indices, i.e.,
create table mytable (
id serial,
dog_id integer,
cat_id integer,
...
);
create index mytable_dog_idx on mytable(dog_id);
create index mytable_cat_idx on mytable(cat_id);
create index mytable_dogcat_idx on mytable(dog_id,cat_id);
...thinking these indices would allow the fastest lookups from 3 different
angles (at the cost of slower inserts, of course). Not sure my intuition
here corresponds directly with the technical reality...
Your question also reminds me of a scenario I'd wondered about:
create table mytable (
id serial,
...
primary key (id)
);
create unique index mytable_id on mytable(id);
The primary key designation implicitly creates a unique index
('mytable_id_pkey', is it?). What happens if I inadvertently create
another unique index on the same field (other than being worthless,
redundant, and a needless performance hit)? I believe I have this
situation in some cases as a result of adding the 'primary key' designation
later, and hadn't gotten around to cleaning it up. Does that smell like a
rat? Any other ideas?
Cheers,
Ed Loehr
From bouncefilter Thu Dec 16 02:05:48 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA28686
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 02:05:30 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id CAA23637;
Thu, 16 Dec 1999 02:04:53 -0500 (EST)
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
In-reply-to: Your message of Thu, 16 Dec 1999 00:35:27 -0600
<3858882F.3AEAE401@austin.rr.com>
Date: Thu, 16 Dec 1999 02:04:53 -0500
Message-ID: <23635.945327893@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Ed Loehr <ELOEHR@austin.rr.com> writes:
Tom Lane wrote:
Oh my, *that's* interesting. I have no idea what could be causing that.
Speculating, does the genetic algorithm twiddle any of the planner's
stats?
No, or at least no more than regular planning does. Let's say it's not
*supposed* to. When dealing with a hard-to-characterize bug, it's wise
not to rule anything out...
I ask because I know some of my other queries involve 6 or
more tables, and I seem to recall that was a trigger point for genetic
algorithms to kick in with default settings.
I think the default is 11 tables in 6.5.*. At least I get
play=> show geqo;
NOTICE: GEQO is ON beginning with 11 relations
SHOW VARIABLE
create index mytable_dog_idx on mytable(dog_id);
create index mytable_cat_idx on mytable(cat_id);
create index mytable_dogcat_idx on mytable(dog_id,cat_id);
...thinking these indices would allow the fastest lookups from 3 different
angles (at the cost of slower inserts, of course). Not sure my intuition
here corresponds directly with the technical reality...
I doubt the 2-column index earns its keep given that you have another
index on the front column. A multicolumn index is a pretty specialized
beast, so I don't recommend creating one unless you have a very specific
heavily-used query in mind. (Of course, if you're making a multicol
UNIQUE index to enforce uniqueness of a multicol primary key, that's
a different matter entirely. But if you're just fishing for performance
improvements, you're probably fishing in the wrong place.)
Your question also reminds me of a scenario I'd wondered about:
create table mytable (
id serial,
...
primary key (id)
);
create unique index mytable_id on mytable(id);
The primary key designation implicitly creates a unique index
('mytable_id_pkey', is it?).
Yes, I think so.
What happens if I inadvertently create
another unique index on the same field (other than being worthless,
redundant, and a needless performance hit)?
AFAIK it should work, but as you say it's a useless performance hit.
It's barely conceivable that there's a bug lurking in there, since
it's a very-seldom-exercised case. But having lots of (nonidentical)
indexes on one table is very well exercised, and it's tough to see
why it would matter if two of them happened to have identical
parameters.
regards, tom lane
From bouncefilter Thu Dec 16 03:04:48 1999
Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA44810
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 03:04:20 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.93.40.30]) by mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Thu, 16 Dec 1999 02:04:40 -0600
Sender: ed
Message-ID: <38589D3E.40C8174@austin.rr.com>
Date: Thu, 16 Dec 1999 02:05:18 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Matthew Hagerty <matthew@venux.net>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Finding corrupt data
References: <20394.945313767@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
If there was corrupt data in a table, how would one go about finding it?
The brute-force way is to do a SELECT * or COPY TO and see if the
backend survives ;-). If not, narrowing down which record is bad
is left as an exercise for the student...
One RDBMS I used had a utility called 'dbcheck' which did some sort of
examination of indices, tables, etc., and issued an 'OK' or 'CORRUPT' for
each examined object. Such a utility for pgsql might simply do some
combination of SELECT * or COPY TO as you suggest above.
Would it be reasonable to put such a tool make its way onto the todo list, in
the absence of better alternatives? I'd argue it's important for pgsql's
future popular prospects to be able to be _operated_ (i.e., live dbs backed
up, diagnosed as corrupted, and restored) by folks who may know very little
about the internals or the design of the schema/code. Quick and correct
diagnosis of the problem is the key for them. Such a tool would seem to go a
long way toward that end.
Cheers,
Ed Loehr
From bouncefilter Thu Dec 16 03:30:49 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA48847
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 03:30:28 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id JAA179896
for <pgsql-hackers@postgreSQL.org>; Thu, 16 Dec 1999 09:30:25 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <Y93Q76R4>; Thu, 16 Dec 1999 09:30:26 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1C9@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: AW: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVIN
G
Date: Thu, 16 Dec 1999 09:30:23 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="windows-1252"
Which dbms's allow it? Or is there an error in my query (I don't
use column numbering, I'm into names myself)?
Informix and DB/2 allow column numbering in the group by clause.
Andreas
From bouncefilter Thu Dec 16 05:08:50 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA67812
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 05:08:30 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id KAA30472;
Thu, 16 Dec 1999 10:54:25 +0100
Date: Thu, 16 Dec 1999 10:54:25 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] pg_dump --help
In-Reply-To: <199912160125.UAA11353@candle.pha.pa.us>
Message-ID: <Pine.LNX.3.96.991216104322.28849A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 15 Dec 1999, Bruce Momjian wrote:
$ pg_dump --help
/usr/lib/postgresql/bin/pg_dump: invalid option -- -hmm ?
Prepare anyone long options for pg_dump, pg_passwd, pg_version ?
If not, I make it, current state is disgraceful.#$ pg_dump -h
pg_dump: option requires an argument -- h
usage: pg_dump [options] dbname
-a dump out only the data, no schema
-c clean(drop) schema prior to create
--cut--
$ mysqldump --help
mysqldump Ver 4.0 Distrib 3.21.31, for pc-linux-gnu (i586)
By Igor Romanenko & Monty & Jani. This software is in public Domain
This software comes with ABSOLUTELY NO WARRANTY
Dumping definition and data mysql database or table
Usage: mysqldump [OPTIONS] database [tables]
-#, --debug=... Output debug log. Often this is 'd:t:o,filename
-?, --help Displays this help and exits.
-c, --compleat-insert Use complete insert statements.
.....etc.
I send patch with long options next week.....
Karel
From bouncefilter Thu Dec 16 04:59:50 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA62958
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 04:59:18 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id 270E7B3CF; Thu, 16 Dec 1999 12:01:56 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <3858B894.C7CBA49C@tm.ee>
Date: Thu, 16 Dec 1999 12:01:56 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ed Loehr <ELOEHR@austin.rr.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
References: <23635.945327893@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Ed Loehr <ELOEHR@austin.rr.com> writes:
create index mytable_dog_idx on mytable(dog_id);
create index mytable_cat_idx on mytable(cat_id);
create index mytable_dogcat_idx on mytable(dog_id,cat_id);...thinking these indices would allow the fastest lookups from 3 different
angles (at the cost of slower inserts, of course). Not sure my intuition
here corresponds directly with the technical reality...I doubt the 2-column index earns its keep given that you have another
index on the front column. A multicolumn index is a pretty specialized
beast, so I don't recommend creating one unless you have a very specific
heavily-used query in mind. (Of course, if you're making a multicol
UNIQUE index to enforce uniqueness of a multicol primary key, that's
a different matter entirely. But if you're just fishing for performance
improvements, you're probably fishing in the wrong place.)
Actually I think that the first (dog_id) is worthless in this situation as
(dog_id,cat_id) can be used instead of it.
I vaguely remember that Hiroshi posted a patch some time ago that fixed
the plan to use more then only the first column of multi-column index
if possible.
The first column of a multi-column index has always been used afaik.
------------------------
Hannu
From bouncefilter Thu Dec 16 07:00:52 1999
Received: from mta4.263.net ([202.96.44.46])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA86820
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 07:00:21 -0500 (EST)
(envelope-from fenghao263@263.net)
Received: by mta4.263.net (Postfix, from userid 60001)
id 32CF01C7C0380; Thu, 16 Dec 1999 20:05:13 +0800 (CST)
MIME-Version: 1.0
Message-Id: <3858D579.01418@mta4>
Date: Thu, 16 Dec 1999 20:05:13 +0800 (CST)
From: "feng hao" <fenghao263@263.net>
To: pgsql-hackers@postgresql.org
Subject:
X-Priority: 3
subscribe
_____________________________________________
��������������������--���������������������������������������� http://www.263.net
��������������������� ���������������� ���������������� �������������������� ����������������������
������������������������ �������������������� �������������������� ������������������������ ����������������
������������������������ �������������������� �������������������� ������������������������ ������������������������
����������������������������������e����������
From bouncefilter Thu Dec 16 07:29:51 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id HAA90977
for <hackers@postgreSQL.org>; Thu, 16 Dec 1999 07:29:20 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11yZhx-0003kGC; Thu, 16 Dec 99 13:08 MET
Message-Id: <m11yZhx-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Thu, 16 Dec 1999 13:08:32 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, emkxp01@mtcc.demon.co.uk, hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912160346.WAA17074@candle.pha.pa.us> from "Bruce Momjian" at
Dec 15, 99 10:46:31 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Since the new parallel regression tests I've always had a few
lock NOTICE messages like the following.Interesting --- I had not run the parallel test for a while,
but I tried it just now and got half a dozen of these:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Something's been broken fairly recently. Does anyone have an
idea what changed?Good question. I can't imagine what it would be. We didn't do much,
and parallel regression is not that old.
While building the parallel test, I've ran the tests dozens
of times to figure out which tests can be run grouped, which
not. Haven't seen such a message while doing so.
Also, I used it after another dozen times without. Now I see
them too. So I assume it was a recent change that introduced
the problem.
And if not, much better. Would show that running all tests
serialized had hidden a bug for a long time.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Dec 16 07:15:55 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id HAA89576
for <hackers@postgreSQL.org>; Thu, 16 Dec 1999 07:15:04 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Utter.DoCS.UU.SE (e99re41@Utter.DoCS.UU.SE [130.238.9.105]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id NAA22160;
Thu, 16 Dec 1999 13:15:02 +0100
Received: from localhost (e99re41@localhost) by Utter.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id NAA18576;
Thu, 16 Dec 1999 13:15:00 +0100
X-Authentication-Warning: Utter.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Thu, 16 Dec 1999 13:14:59 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: prlw1@cam.ac.uk
cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] initdb / pg_version
In-Reply-To: <E11yGnF-0001jz-00@quartz.newn.cam.ac.uk>
Message-ID: <Pine.GSO.4.02A.9912161312380.18547-100000@Utter.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 15 Dec 1999, Patrick Welche wrote:
Any thoughts to fix the build process?
Oh yeah. It's on my wish/todo list. But I just looked at some of those
things the other day and it looks like for a complete solution, much of
the makefiles will simply need to be scrapped and rewritten. So I don't
expect to bother with that soon.
The latest weirdness I experienced was in fact that the clean target
compiled half the source before deciding to delete it ...
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Dec 16 07:23:51 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id HAA90381
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 07:23:04 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Utter.DoCS.UU.SE (e99re41@Utter.DoCS.UU.SE [130.238.9.105]) by
Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id NAA22230;
Thu, 16 Dec 1999 13:23:02 +0100
Received: from localhost (e99re41@localhost) by Utter.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id NAA18580;
Thu, 16 Dec 1999 13:23:01 +0100
X-Authentication-Warning: Utter.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Thu, 16 Dec 1999 13:23:00 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] pg_dump --help
In-Reply-To: <Pine.LNX.3.96.991215210710.15100J-100000@ara.zf.jcu.cz>
Message-ID: <Pine.GSO.4.02A.9912161316180.18547-100000@Utter.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 15 Dec 1999, Karel Zak - Zakkr wrote:
$ pg_dump --help
/usr/lib/postgresql/bin/pg_dump: invalid option -- -hmm ?
Prepare anyone long options for pg_dump, pg_passwd, pg_version ?
If not, I make it, current state is disgraceful.
Only GNU (Linux) systems support long options. What you consider
disgraceful is normal behavior on the majority of platforms.
I put in long options into psql and into the wrapper scripts (under some
protests). But I agree that we should if at all only provide them, not
advertise them, since it's going to be a support nightmare.
If you plan on doing this, please look there and use the same options
whereever possible. I have been trying to establish some consistent
options naming across client applications. Also check out how psql copes
with systems where there are no long options available.
Meanwhile I have been getting closer to resolving to scratch pg_dump and
write a new one for 7.1, so whatever you do now might not live long. :(
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Dec 16 07:59:53 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA10871
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 07:59:16 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id NAA12123;
Thu, 16 Dec 1999 13:45:02 +0100
Date: Thu, 16 Dec 1999 13:45:01 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Peter Eisentraut <peter_e@gmx.net>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] pg_dump --help
In-Reply-To: <Pine.GSO.4.02A.9912161316180.18547-100000@Utter.DoCS.UU.SE>
Message-ID: <Pine.LNX.3.96.991216131903.10164A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 16 Dec 1999, Peter Eisentraut wrote:
On Wed, 15 Dec 1999, Karel Zak - Zakkr wrote:
$ pg_dump --help
/usr/lib/postgresql/bin/pg_dump: invalid option -- -hmm ?
Prepare anyone long options for pg_dump, pg_passwd, pg_version ?
If not, I make it, current state is disgraceful.
Hi,
Only GNU (Linux) systems support long options. What you consider
disgraceful is normal behavior on the majority of platforms.
Yes, I know this (it is not first program, which I hacking :-),
IMHO is good resolution (?) add getopt_long() to str/utils and use it
for non-GNU (non getopt_long) platforms, or not?
I put in long options into psql and into the wrapper scripts (under some
protests). But I agree that we should if at all only provide them, not
advertise them, since it's going to be a support nightmare.
I saw/use your current psql (great!). Plan you add long option to
usage() output? If yes, will good make identical output format for
all pg_ routines (nice is example 'mc --help' styl).
If you plan on doing this, please look there and use the same options
whereever possible. I have been trying to establish some consistent
options naming across client applications. Also check out how psql copes
with systems where there are no long options available.
Yes, I agree and I use your options.
Meanwhile I have been getting closer to resolving to scratch pg_dump and
write a new one for 7.1, so whatever you do now might not live long. :(
Hmm.. :-(, but I not worry, it is only small work for me and you can use
this options (and code) for your 7.1 version.
Karel
From bouncefilter Thu Dec 16 08:21:52 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA15955
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 08:21:17 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id OAA13095
for <pgsql-hackers@postgreSQL.org>; Thu, 16 Dec 1999 14:06:56 +0100
Date: Thu, 16 Dec 1999 14:06:56 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: INSERT in 7.0
Message-ID: <Pine.LNX.3.96.991216135929.10164B-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
What is changed on INSERT/max() in v7.0? (CVS - today).
See:
--- new version:
template1=> select * from pg_group;
groname | grosysid | grolist
---------+----------+---------
_dummy_ | 0 | {}
(1 row)
template1=> INSERT INTO pg_group VALUES ('abg_root', max(grosysid)+1, '{}');
ERROR: attribute 'grosysid' not found
--- old version (6.5):
template1=> select * from pg_group;
groname|grosysid|grolist
-------+--------+-------
_dummy_| 0|{}
(1 row)
template1=> INSERT INTO pg_group VALUES ('abg_root', max(grosysid)+1, '{}');
INSERT 10173952 1
Karel
From bouncefilter Thu Dec 16 08:40:52 1999
Received: from email.fdn.com (email.fdn.com [216.199.0.136])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA20438
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 08:40:07 -0500 (EST)
(envelope-from mtsinc@southeast.net)
Received: from southeast.net (mail.mousetech.com [216.199.14.19] (may be
forged)) by email.fdn.com (8.9.3/8.9.3) with ESMTP id IAA24698;
Thu, 16 Dec 1999 08:32:23 -0500 (EST)
Message-ID: <3858E90B.6961E17B@southeast.net>
Date: Thu, 16 Dec 1999 08:28:43 -0500
From: Tim Holloway <mtsinc@southeast.net>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Matthew Hagerty <matthew@venux.net>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
References: <19762.945301612@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
1. Matthew's problem sounds an awful lot like what's being reported
by Lucio Andres Perez in v6.4.2. Maybe some kind of bug in detecting
and handling over-the-limit backends. Can someone cook up a Q&D backend-
spawner? I've spend enough time inside that part of the system lately that
I could probably track it down from a core file.
2. Yup, there's a "patch" out on pgsql-patches that previews an advanced log
system. Although the traditional elog method has seen a lot of enhancement
lately, it tends to be more geared towards development over administration.
Plus it was never designed to support national languages or machine parsing.
So far I've had not feedback on itm however, so I don't know if it will ever
make its way into a production release.
regards,
Tim Holloway
Tom Lane wrote:
Matthew Hagerty <matthew@venux.net> writes:
How many backend processes is considered a large number? The man pages
says the default is 32. Does anyone set their number higher?I've run test cases with 100, which is about as high as I can go on my
personal box without running out of swap space. I think some people
are using several hundred.Kind of related to the question above; when does the postmaster spawn
another backend process? Is it for each additional connection,Per connection. The backend quits when the client disconnects. Of
course, it's up to the client how long it stays connected or how many
queries it asks...The postmaster log file, why are the entries not datestamped?
Uncomment #define ELOG_TIMESTAMPS in include/config.h after configure
and before make...Also, what is the highest debug level and how big can I expect
the log to grow? Can I rotate the log without stopping the postmaster?Not very readily. There is someone working on using syslog logging,
which'd be a lot nicer than what we have.What is the pg_log file in the data directory?
Transaction commit data. Don't touch it ;-). It shouldn't be all that
big, though...What are the major system resources used by postgres, i.e. semaphores, file
handles, mbufs, etc.? I'm trying to determine if I have my resources
configured high enough for my user base.In 6.5, the postmaster won't start up if you don't have enough
semaphores and shared memory. I've never heard of anyone running out of
file handles, but it certainly seems possible if you start enough
backends. Still, though, I wouldn't expect a hard coredump such as you
are getting from running out of any of these resources. There should at
least be something showing up in the postmaster log if we fail to open a
file or something like that...regards, tom lane
************
From bouncefilter Thu Dec 16 09:24:53 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA28163
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 09:24:36 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA24291;
Thu, 16 Dec 1999 09:23:48 -0500 (EST)
To: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
cc: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: Re: AW: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVIN
G
In-reply-to: Your message of Thu, 16 Dec 1999 09:30:23 +0100
<219F68D65015D011A8E000006F8590C603FDC1C9@sdexcsrv1.f000.d0188.sd.spardat.at>
Date: Thu, 16 Dec 1999 09:23:48 -0500
Message-ID: <24289.945354228@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
Informix and DB/2 allow column numbering in the group by clause.
What do they do with
SELECT foo AS bar FROM table GROUP BY bar
?
What do they do if bar is the real name of another column in the table?
regards, tom lane
From bouncefilter Thu Dec 16 11:47:54 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA63178
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 11:47:23 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id LAA06872
for pgsql-hackers@postgreSQL.org; Thu, 16 Dec 1999 11:47:00 -0500 (EST)
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id KAA03683
for <pgman@candle.pha.pa.us>; Thu, 16 Dec 1999 10:01:21 -0500 (EST)
Received: from doc.mssm.edu (doc.mssm.edu [146.203.1.10]) by renoir.op.net
(o1/$Revision: 1.18 $) with ESMTP id JAA23948 for
<pgman@candle.pha.pa.us>; Thu, 16 Dec 1999 09:43:02 -0500 (EST)
Received: from doc.mssm.edu (adwr44.mssm.edu [146.203.33.44])
by doc.mssm.edu (8.9.3/8.9.2) with ESMTP id JAA20271
for <pgman@candle.pha.pa.us>; Thu, 16 Dec 1999 09:39:22 -0500 (EST)
Message-ID: <3858F60E.312E3BA3@doc.mssm.edu>
Date: Thu, 16 Dec 1999 09:24:14 -0500
From: Edwin Ramirez <ramirez@doc.mssm.edu>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
Subject: Oracle Compatibility (Translate function)
References: <199912160129.UAA11666@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: pgman@candle.pha.pa.us
Hello,
I have modified the translate function in order to improve its
compatibility with Oracle. It now supports the replacement of multiple
characters and it will also shorten the length of the string when characters
are replaced with nothing.
[Note: The arguments are different from the original translate]
Can this function replace the existing function in the distribution?
-------NEW FUNCTION--------------------------------------
text *
translate(text *string, text *from, text *to)
{
text *ret;
char *ptr_ret, *from_ptr, *to_ptr, *source, *target, *temp,
rep;
int m, fromlen, tolen, retlen, i;
if ((string == (text *) NULL) ||
((m = VARSIZE(string) - VARHDRSZ) <= 0))
return string;
target = (char *) palloc(VARSIZE(string) - VARHDRSZ);
source = VARDATA(string);
temp = target;
fromlen = VARSIZE(from) - VARHDRSZ;
from_ptr = VARDATA(from);
tolen = VARSIZE(to) - VARHDRSZ;
to_ptr = VARDATA(to);
retlen = 0;
while (m--)
{
rep = *source;
for(i=0;i<fromlen;i++) {
if(from_ptr[i] == *source) {
if(i < tolen) {
rep = to_ptr[i];
} else {
rep = 0;
}
break;
}
}
if(rep != 0) {
*target++ = rep;
retlen++;
}
source++;
}
ret = (text *) palloc(retlen + VARHDRSZ);
VARSIZE(ret) = retlen + VARHDRSZ;
ptr_ret = VARDATA(ret);
for(i=0;i<retlen;i++) {
*ptr_ret++ = temp[i];
}
pfree(target);
return ret;
}
Thanks,
Edwin S. Ramirez
From bouncefilter Thu Dec 16 09:27:53 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA28452
for <hackers@postgreSQL.org>; Thu, 16 Dec 1999 09:27:00 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA24319;
Thu, 16 Dec 1999 09:25:51 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: prlw1@cam.ac.uk, hackers@postgreSQL.org
Subject: Re: [HACKERS] initdb / pg_version
In-reply-to: Your message of Thu, 16 Dec 1999 13:14:59 +0100 (MET)
<Pine.GSO.4.02A.9912161312380.18547-100000@Utter.DoCS.UU.SE>
Date: Thu, 16 Dec 1999 09:25:51 -0500
Message-ID: <24317.945354351@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
Oh yeah. It's on my wish/todo list. But I just looked at some of those
things the other day and it looks like for a complete solution, much of
the makefiles will simply need to be scrapped and rewritten.
Perhaps GNU automake would give a good running start on the problem.
regards, tom lane
From bouncefilter Thu Dec 16 09:36:54 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA32550
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 09:36:53 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA24383;
Thu, 16 Dec 1999 09:35:46 -0500 (EST)
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] INSERT in 7.0
In-reply-to: Your message of Thu, 16 Dec 1999 14:06:56 +0100 (CET)
<Pine.LNX.3.96.991216135929.10164B-100000@ara.zf.jcu.cz>
Date: Thu, 16 Dec 1999 09:35:45 -0500
Message-ID: <24381.945354945@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Karel Zak - Zakkr <zakkr@zf.jcu.cz> writes:
What is changed on INSERT/max() in v7.0? (CVS - today).
template1=> INSERT INTO pg_group VALUES ('abg_root', max(grosysid)+1, '{}');
ERROR: attribute 'grosysid' not found
That's the way it should work, AFAICS. VALUES() isn't supposed to
contain anything except constant expressions. Perhaps what you are
after would be more properly expressed as
INSERT INTO pg_group SELECT 'abg_root', max(grosysid)+1, '{}' FROM pg_group;
6.5 may have accepted the other, but it was an artifact of extremely
broken code...
regards, tom lane
From bouncefilter Thu Dec 16 09:41:54 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA33269
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 09:41:49 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA24419;
Thu, 16 Dec 1999 09:40:40 -0500 (EST)
To: Tim Holloway <mtsinc@southeast.net>
cc: Matthew Hagerty <matthew@venux.net>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
In-reply-to: Your message of Thu, 16 Dec 1999 08:28:43 -0500
<3858E90B.6961E17B@southeast.net>
Date: Thu, 16 Dec 1999 09:40:39 -0500
Message-ID: <24417.945355239@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Tim Holloway <mtsinc@southeast.net> writes:
1. Matthew's problem sounds an awful lot like what's being reported
by Lucio Andres Perez in v6.4.2. Maybe some kind of bug in detecting
and handling over-the-limit backends.
6.4.* didn't really have any check/defense against spawning more
backends than it had resources for. 6.5 does check and enforce the
maxbackends limit. It's certainly possible that Matthew's running into
some kind of resource-exhaustion problem, but I doubt that it's just
the number of backends that's at issue, except indirectly. (He could
be running out of swap space or filetable slots, possibly.)
regards, tom lane
From bouncefilter Thu Dec 16 09:46:53 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA34183
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 09:46:46 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA24471;
Thu, 16 Dec 1999 09:46:11 -0500 (EST)
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: Matthew Hagerty <matthew@venux.net>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Finding corrupt data
In-reply-to: Your message of Thu, 16 Dec 1999 02:05:18 -0600
<38589D3E.40C8174@austin.rr.com>
Date: Thu, 16 Dec 1999 09:46:11 -0500
Message-ID: <24469.945355571@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Ed Loehr <ELOEHR@austin.rr.com> writes:
One RDBMS I used had a utility called 'dbcheck' which did some sort of
examination of indices, tables, etc., and issued an 'OK' or 'CORRUPT' for
each examined object. Such a utility for pgsql might simply do some
combination of SELECT * or COPY TO as you suggest above.
Would it be reasonable to put such a tool make its way onto the todo list, in
the absence of better alternatives?
What'd be really nice is some kind of 'fsck' for databases. But it'd be
a lot of work to write one, and more work to keep it up to date in the
face of continuing changes to the database representation.
One simpler thing that I'd like to see is for VACUUM to recreate indexes
from scratch instead of trying to compact them. This would provide a
very simple recovery procedure for corrupted indexes, and it seems
possible that it'd actually be faster than what VACUUM does now.
regards, tom lane
From bouncefilter Thu Dec 16 09:52:53 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA35243
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 09:52:38 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id PAA114208;
Thu, 16 Dec 1999 15:52:26 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <Y93Q79KH>; Thu, 16 Dec 1999 15:52:26 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1CE@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'Tom Lane'" <tgl@sss.pgh.pa.us>
Cc: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVIN G
Date: Thu, 16 Dec 1999 15:52:26 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
Informix and DB/2 allow column numbering in the group by clause.
What do they do with
SELECT foo AS bar FROM table GROUP BY bar
What do they do if bar is the real name of another column in
the table?
They don't allow labels, only numbers,
(SELECT foo AS bar FROM table GROUP BY 1)
In the special case where a label collides with a colname,
we need to use the colname, because that behavior is
ruled by the standard (since it doesn't allow a label).
The order by clause is the other way around.
DB Vendors probably disallow this syntax,
because the two different interpretations would be a bit awkward.
Best would of course be if the standard allowed labels in the
group by and where clause and take label before colname.
Andreas
From bouncefilter Thu Dec 16 12:03:57 1999
Received: from tapon.overnet.com.ar (tapon.overnet.com.ar [200.10.96.30])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA69520
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 12:03:29 -0500 (EST)
(envelope-from nnappe@uflo.overnet.com.ar)
Received: from uflo.UUCP (uucp@localhost) by tapon.overnet.com.ar
(8.8.5/8.8.3) with UUCP id OAA17319 for
postgresql.org!pgsql-hackers; Thu, 16 Dec 1999 14:17:08 -0300
Received: from warbird.uflo.edu.ar by uflo1.uflo.edu.ar with smtp
(Linux Smail3.2.0.92 #1) id m11ycpe-000NBZC;
Thu, 16 Dec 1999 12:28:42 -0300 (ARST)
Received: by warbird.uflo.edu.ar with Microsoft Mail
id <01BF47C3.FD30ECA0@warbird.uflo.edu.ar>;
Thu, 16 Dec 1999 12:49:28 -0300
Message-ID: <01BF47C3.FD30ECA0@warbird.uflo.edu.ar>
From: Nicolas Nappe <nnappe@uflo1.uflo.edu.ar.overnet.com.ar>
To: "'pgsql-hackers@postgresql.org'" <pgsql-hackers@postgresql.org>
Subject: Arrays and pg_groupr
Date: Thu, 16 Dec 1999 12:49:26 -0300
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id MAB69629
I���m trying to implement a security scheme based on groups, so I tried to
write some little functions in C. Unfortunately, although I managed to read the
internal format, I couldn���t create the ArrayType to return to the backend. It shouldn���t
be very difficult. I mean, it���s only one dimension.
I tried to use a string and array_in, too; but array_in keeps saying
"array_in:need to specify dimension"
Are there some functions already written to implement this kind of security.
From bouncefilter Thu Dec 16 12:03:55 1999
Received: from tapon.overnet.com.ar (tapon.overnet.com.ar [200.10.96.30])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA69510
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 12:03:25 -0500 (EST)
(envelope-from nnappe@uflo.overnet.com.ar)
Received: from uflo.UUCP (uucp@localhost) by tapon.overnet.com.ar
(8.8.5/8.8.3) with UUCP id OAA17321 for
postgresql.org!pgsql-hackers; Thu, 16 Dec 1999 14:17:10 -0300
Received: from warbird.uflo.edu.ar by uflo1.uflo.edu.ar with smtp
(Linux Smail3.2.0.92 #1) id m11ycv4-000NBZC;
Thu, 16 Dec 1999 12:34:18 -0300 (ARST)
Received: by warbird.uflo.edu.ar with Microsoft Mail
id <01BF47C4.C5BE2C00@warbird.uflo.edu.ar>;
Thu, 16 Dec 1999 12:55:04 -0300
Message-ID: <01BF47C4.C5BE2C00@warbird.uflo.edu.ar>
From: Nicolas Nappe <nnappe@uflo1.uflo.edu.ar.overnet.com.ar>
To: "'pgsql-hackers@postgresql.org'" <pgsql-hackers@postgresql.org>
Subject: access control lists ( acl )
Date: Thu, 16 Dec 1999 12:55:03 -0300
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id MAA69634
How can I display the current privileges of a group or
a user in a particular table? I could read relacl from pg_class,
but I can���t process the acltype. In acl.c, acltype is an int4!!!
Is there any code to reuse?
Nicolas Nappe
From bouncefilter Thu Dec 16 11:23:54 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA56778
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 11:23:24 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id RAA11624;
Thu, 16 Dec 1999 17:22:56 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <Y93Q798T>; Thu, 16 Dec 1999 17:22:57 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1D1@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'Ansley, Michael'" <Michael.Ansley@intec.co.za>,
"'pgsql-hackers@postgreSQL.org '" <pgsql-hackers@postgreSQL.org>
Subject: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Date: Thu, 16 Dec 1999 17:22:54 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
So, according to Oracle's view of the world, HAVING is orrect
because it
rejects aliases, but GROUP BY is broken because it accepts them.
Just because it is more powerful than the standard does not mean it is
broken.
The only thing, that is broken is that the alias is taken before the
colname,
and thus results in wrong output for a standard conformant query.
Andreas
From bouncefilter Thu Dec 16 11:26:54 1999
Received: from bologna.nettuno.it (bologna.nettuno.it [193.43.2.1])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA57124;
Thu, 16 Dec 1999 11:26:24 -0500 (EST)
(envelope-from jose@sferacarta.com)
Received: from proxy.sferacarta.com (sfcabop1.nettuno.it [193.207.10.213])
by bologna.nettuno.it (8.9.3/8.9.3/NETTuno 4.1) with ESMTP id RAA25936;
Thu, 16 Dec 1999 17:26:22 +0100 (MET)
Received: from rosso.sferacarta.com (sferacarta.com) [10.20.30.5]
by proxy.sferacarta.com with esmtp (Exim 2.05 #1 (Debian))
id 11yeeV-0002EF-00; Thu, 16 Dec 1999 17:25:19 +0000
Message-ID: <385912F6.88CC2E7F@sferacarta.com>
Date: Thu, 16 Dec 1999 17:27:34 +0100
From: Jose Soares <jose@sferacarta.com>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: general <pgsql-general@postgresql.org>,
hackers <pgsql-hackers@postgresql.org>
Subject: \copy problem
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi all,
I have a problem using \copy to load data into tables.
I have to load data into a table that contains data type fields with
NULL values.
I tried using \N but it doesn't work.
What can I do to insert a null into a data field?
To arrive this conclusion I had to try many solutions because I cannot
understand
the \copy error messages..
What about to have the row number and the error type instead of that...
hygea=> \copy movimentazioni from 4;
pqReadData() -- read() failed: errno=32
Broken pipe
PQendcopy: resetting connection
Copy failed.
Comments!
Jose'
From bouncefilter Thu Dec 16 11:32:55 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA60755
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 11:32:37 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA05501;
Thu, 16 Dec 1999 11:29:05 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912161629.LAA05501@candle.pha.pa.us>
Subject: Re: [HACKERS] Finding corrupt data
In-Reply-To: <38589D3E.40C8174@austin.rr.com> from Ed Loehr at "Dec 16, 1999
02:05:18 am"
To: Ed Loehr <ELOEHR@austin.rr.com>
Date: Thu, 16 Dec 1999 11:29:05 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Matthew Hagerty <matthew@venux.net>,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
If there was corrupt data in a table, how would one go about finding it?
The brute-force way is to do a SELECT * or COPY TO and see if the
backend survives ;-). If not, narrowing down which record is bad
is left as an exercise for the student...One RDBMS I used had a utility called 'dbcheck' which did some sort of
examination of indices, tables, etc., and issued an 'OK' or 'CORRUPT' for
each examined object. Such a utility for pgsql might simply do some
combination of SELECT * or COPY TO as you suggest above.
Does vacuum already do that?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 16 11:31:58 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA60605
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 11:31:34 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA05695;
Thu, 16 Dec 1999 11:31:15 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912161631.LAA05695@candle.pha.pa.us>
Subject: Re: [HACKERS] pg_dump --help
In-Reply-To: <Pine.LNX.3.96.991216104322.28849A-100000@ara.zf.jcu.cz> from
Karel Zak - Zakkr at "Dec 16, 1999 10:54:25 am"
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
Date: Thu, 16 Dec 1999 11:31:15 -0500 (EST)
CC: pgsql-hackers <pgsql-hackers@postgresql.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
#$ pg_dump -h
pg_dump: option requires an argument -- h
usage: pg_dump [options] dbname
-a dump out only the data, no schema
-c clean(drop) schema prior to create--cut--
$ mysqldump --help
mysqldump Ver 4.0 Distrib 3.21.31, for pc-linux-gnu (i586)
By Igor Romanenko & Monty & Jani. This software is in public Domain
This software comes with ABSOLUTELY NO WARRANTYDumping definition and data mysql database or table
Usage: mysqldump [OPTIONS] database [tables]-#, --debug=... Output debug log. Often this is 'd:t:o,filename
-?, --help Displays this help and exits.
-c, --compleat-insert Use complete insert statements......etc.
I send patch with long options next week.....
It must be portable. See src/bin/psql/startup.c for an example of a
portable solution.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 16 12:29:55 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA77130
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 12:29:32 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.3.138]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Thu, 16 Dec 1999 11:20:15 -0600
Sender: ed
Message-ID: <3859217B.9C3A338B@austin.rr.com>
Date: Thu, 16 Dec 1999 11:29:32 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: Tom Lane <tgl@sss.pgh.pa.us>, Matthew Hagerty <matthew@venux.net>,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Finding corrupt data
References: <199912161629.LAA05501@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
One RDBMS I used had a utility called 'dbcheck' which did some sort of
examination of indices, tables, etc., and issued an 'OK' or 'CORRUPT' for
each examined object. Such a utility for pgsql might simply do some
combination of SELECT * or COPY TO as you suggest above.Does vacuum already do that?
Not as far as I can tell. Here's the kind of output I see from vacuum:
DEBUG: --Relation pg_class--
DEBUG: Pages 10: Changed 0, Reapped 1, Empty 0, New 0; Tup 695: Vac 0, Keep/VTL
0/0, Crash 0, UnUsed 35, MinLen 102, MaxLen 132; Re-using: Free/Avail. Space
3828/0; EndEmpty/Avail. Pages 0/0. Elapsed 0/0 sec.
DEBUG: Index pg_class_relname_index: Pages 16; Tuples 695: Deleted 0. Elapsed
0/0 sec.
DEBUG: Index pg_class_oid_index: Pages 7; Tuples 695: Deleted 0. Elapsed 0/0
sec.
Am I missing something?
Cheers,
Ed Loehr
From bouncefilter Thu Dec 16 12:34:55 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA80653
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 12:34:06 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA17285;
Thu, 16 Dec 1999 12:31:11 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912161731.MAA17285@candle.pha.pa.us>
Subject: Re: [HACKERS] Finding corrupt data
In-Reply-To: <3859217B.9C3A338B@austin.rr.com> from Ed Loehr at "Dec 16, 1999
11:29:32 am"
To: Ed Loehr <ELOEHR@austin.rr.com>
Date: Thu, 16 Dec 1999 12:31:10 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Matthew Hagerty <matthew@venux.net>,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
One RDBMS I used had a utility called 'dbcheck' which did some sort of
examination of indices, tables, etc., and issued an 'OK' or 'CORRUPT' for
each examined object. Such a utility for pgsql might simply do some
combination of SELECT * or COPY TO as you suggest above.Does vacuum already do that?
Not as far as I can tell. Here's the kind of output I see from vacuum:
DEBUG: --Relation pg_class--
DEBUG: Pages 10: Changed 0, Reapped 1, Empty 0, New 0; Tup 695: Vac 0, Keep/VTL
0/0, Crash 0, UnUsed 35, MinLen 102, MaxLen 132; Re-using: Free/Avail. Space
3828/0; EndEmpty/Avail. Pages 0/0. Elapsed 0/0 sec.
DEBUG: Index pg_class_relname_index: Pages 16; Tuples 695: Deleted 0. Elapsed
0/0 sec.
DEBUG: Index pg_class_oid_index: Pages 7; Tuples 695: Deleted 0. Elapsed 0/0
sec.Am I missing something?
Vacuum does catch some problems, not all of them.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 16 12:58:55 1999
Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA87029
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 12:58:41 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.3.138]) by mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Thu, 16 Dec 1999 11:58:52 -0600
Sender: ed
Message-ID: <38592882.655BF33C@austin.rr.com>
Date: Thu, 16 Dec 1999 11:59:30 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: Tom Lane <tgl@sss.pgh.pa.us>, Matthew Hagerty <matthew@venux.net>,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Finding corrupt data
References: <199912161731.MAA17285@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
Bruce Momjian wrote:
One RDBMS I used had a utility called 'dbcheck' which did some sort of
examination of indices, tables, etc., and issued an 'OK' or 'CORRUPT' for
each examined object. Such a utility for pgsql might simply do some
combination of SELECT * or COPY TO as you suggest above.Does vacuum already do that?
Not as far as I can tell. Here's the kind of output I see from vacuum:
DEBUG: --Relation pg_class--
DEBUG: Pages 10: Changed 0, Reapped 1, Empty 0, New 0; Tup 695: Vac 0, Keep/VTL
0/0, Crash 0, UnUsed 35, MinLen 102, MaxLen 132; Re-using: Free/Avail. Space
3828/0; EndEmpty/Avail. Pages 0/0. Elapsed 0/0 sec.
DEBUG: Index pg_class_relname_index: Pages 16; Tuples 695: Deleted 0. Elapsed
0/0 sec.
DEBUG: Index pg_class_oid_index: Pages 7; Tuples 695: Deleted 0. Elapsed 0/0
sec.Am I missing something?
Vacuum does catch some problems, not all of them.
Yes, and vacuum appears to be the only known remedy to my current postgresql
showstopper. For that, I'm grateful. However, I think that misses the point I'm
trying to convey...
There are a three basic tasks critically important to an operationally viable
database, from my perspective. First, I need to be able to easily create a backup of
the database at any point. The pg_dump appears to serve that function.
Second, I need to be able to restore from a backup copy if something goes terribly
wrong. Psql coupled with pg_dump output seems to support that. So far, so good.
Third, and most importantly, I need to be able to tell *when* I need to restore from
a backup. A restoration from a backup copy usually involves a likely loss of data,
and that can be a Very Big Deal. "Is this database corrupt?", is a critically
important question. And I need to be able to answer it without knowing the details
of postgresql C code. If I can't somehow answer that question when a problem arises,
the total cost of ownership of the database jumps pretty dramatically due to wasted
time and data loss, and the operability/viability drops in tandem.
Cheers,
Ed Loehr
From bouncefilter Thu Dec 16 14:24:56 1999
Received: from finch-post-10.mail.demon.net (finch-post-10.mail.demon.net
[194.217.242.38]) by hub.org (8.9.3/8.9.3) with ESMTP id OAA04937
for <hackers@postgresql.org>; Thu, 16 Dec 1999 14:24:48 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by finch-post-10.mail.demon.net with esmtp (Exim 2.12 #1)
id 11ygW0-0003FE-0A; Thu, 16 Dec 1999 19:24:40 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id TAA17303; Thu, 16 Dec 1999 19:24:35 GMT
Message-Id: <199912161924.TAA17303@mtcc.demon.co.uk>
Date: Thu, 16 Dec 1999 19:24:35 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: pgman@candle.pha.pa.us, wieck@debis.com
Cc: tgl@sss.pgh.pa.us, hackers@postgresql.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: UrTvvkM2rco9sGn5ePzBQQ==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
wieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Since the new parallel regression tests I've always had a few
lock NOTICE messages like the following.Interesting --- I had not run the parallel test for a while,
but I tried it just now and got half a dozen of these:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Something's been broken fairly recently. Does anyone have an
idea what changed?Good question. I can't imagine what it would be. We didn't do much,
and parallel regression is not that old.Also, I used it after another dozen times without. Now I see
them too. So I assume it was a recent change that introduced
the problem.
I'm not sure it's that recent, I think I've had 1 or 2 such errors
ever since I've been running the "runcheck".
What I will say is that the parallel running arrived at around the
same time as the new psql and I didn't have an old version available
to run the tests until sometime after. (had to download and build 6.5!)
And if not, much better. Would show that running all tests
serialized had hidden a bug for a long time.
Quite possible, although something recent has aggrevated it somewhat ;-)
Keith.
From bouncefilter Thu Dec 16 14:38:56 1999
Received: from email.fdn.com (email.fdn.com [216.199.0.136])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA09543
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 14:38:33 -0500 (EST)
(envelope-from mtsinc@southeast.net)
Received: from southeast.net (mail.mousetech.com [216.199.14.19] (may be
forged)) by email.fdn.com (8.9.3/8.9.3) with ESMTP id OAA08682;
Thu, 16 Dec 1999 14:30:54 -0500 (EST)
Message-ID: <38593D02.652337C7@southeast.net>
Date: Thu, 16 Dec 1999 14:26:58 -0500
From: Tim Holloway <mtsinc@southeast.net>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Matthew Hagerty <matthew@venux.net>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
References: <24417.945355239@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Ah. I hadn't noticed they were that far back. I've passed your news on
to our distraught friends in Columbia with a suggestion to try the 6.5.3
RPM.
Tom Lane wrote:
Tim Holloway <mtsinc@southeast.net> writes:
1. Matthew's problem sounds an awful lot like what's being reported
by Lucio Andres Perez in v6.4.2. Maybe some kind of bug in detecting
and handling over-the-limit backends.6.4.* didn't really have any check/defense against spawning more
backends than it had resources for. 6.5 does check and enforce the
maxbackends limit. It's certainly possible that Matthew's running into
some kind of resource-exhaustion problem, but I doubt that it's just
the number of backends that's at issue, except indirectly. (He could
be running out of swap space or filetable slots, possibly.)regards, tom lane
************
From bouncefilter Thu Dec 16 15:01:56 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA15008
for <hackers@postgreSQL.org>; Thu, 16 Dec 1999 15:01:43 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
OAA22633;
Thu, 16 Dec 1999 14:58:41 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912161958.OAA22633@candle.pha.pa.us>
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
In-Reply-To: <199912161924.TAA17303@mtcc.demon.co.uk> from Keith Parks at "Dec
16, 1999 07:24:35 pm"
To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Date: Thu, 16 Dec 1999 14:58:40 -0500 (EST)
CC: wieck@debis.com, tgl@sss.pgh.pa.us, hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
wieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Since the new parallel regression tests I've always had a few
lock NOTICE messages like the following.Interesting --- I had not run the parallel test for a while,
but I tried it just now and got half a dozen of these:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Something's been broken fairly recently. Does anyone have an
idea what changed?Good question. I can't imagine what it would be. We didn't do much,
and parallel regression is not that old.Also, I used it after another dozen times without. Now I see
them too. So I assume it was a recent change that introduced
the problem.I'm not sure it's that recent, I think I've had 1 or 2 such errors
ever since I've been running the "runcheck".What I will say is that the parallel running arrived at around the
same time as the new psql and I didn't have an old version available
to run the tests until sometime after. (had to download and build 6.5!)
Has anyone used CVS -D date to backtrack to the date it first started?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 16 15:44:57 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id PAA22739
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 15:44:21 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <ZAKMYYJF>; Thu, 16 Dec 1999 22:41:50 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C35C@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'Zeugswetter Andreas SB '" <ZeugswetterA@wien.spardat.at>,
"Ansley, Michael" <Michael.Ansley@intec.co.za>,
"''pgsql-hackers@postgreSQL.org ' '" <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Date: Thu, 16 Dec 1999 22:31:36 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
Yes, you are right, of course, it doesn't mean that it's incorrect.
However, assuming that Oracle adheres strictly to the standard (which is a
good, but not infallible, assumption), it means that we don't. Of course,
we may just extend the standard, but in this particular area, I'm not sure
that it's a good idea, because it can be very confusing, and lead to
inadvertent mistakes, which can be very difficult to find.
MikeA
-----Original Message-----
From: Zeugswetter Andreas SB
To: 'Ansley, Michael'; 'pgsql-hackers@postgreSQL.org '
Sent: 99/12/16 06:22
Subject: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
So, according to Oracle's view of the world, HAVING is orrect
because it
rejects aliases, but GROUP BY is broken because it accepts them.
Just because it is more powerful than the standard does not mean it is
broken.
The only thing, that is broken is that the alias is taken before the
colname,
and thus results in wrong output for a standard conformant query.
Andreas
From bouncefilter Thu Dec 16 17:31:58 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id RAA49736
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 17:31:53 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11yjKc-0003kGC; Thu, 16 Dec 99 23:25 MET
Message-Id: <m11yjKc-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Prepared for LONG
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Thu, 16 Dec 1999 23:25:06 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
I just committed some changes to a couple of files (43).
They're required for the ability to have HeapTuple and
HeapTupleHeader in different allocations.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Dec 16 17:52:58 1999
Received: from atbib.be (IDENT:root@a04-179.antw.online.be [62.112.5.179])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA52039
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 17:52:31 -0500 (EST) (envelope-from fve@atbib.be)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id AAA25050;
Fri, 17 Dec 1999 00:52:27 +0100
Message-Id: <3.0.6.32.19991216235345.00886530@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Thu, 16 Dec 1999 23:53:45 +0100
To: pgsql-hackers@postgreSQL.org
From: Frans Van Elsacker <fve@atbib.be>
Subject: Re: [HACKERS] ordering RH6.1
Cc: lamar.owen@wgcr.org
In-Reply-To: <3857B9F0.8E0A2CAA@wgcr.org>
References: <16598.945214137@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
I download all the rpm from
(http://www.ramifordistat.net/postgres/RPMS/redhat-6.x/postgresql*-2nl.i386.
rpm)
and have install each of them in redhat 6.1.
But we received the same bad results as before.
- my redhat was downloaded from a mirror site as a cd-image
- and there where some older version of postgres (v 6.5.2-1) installed on
our test system before. They were first uninstalled.
This are the only two packages that we have running on our machine. I've
choose the half-automatic graphic install of redhat. Selected some standard
tools like ftp, network tool,... and choose a belgian keyboard. I have left
the timezone selection as default.
Strange things!
I see only the following posibilities :
- Our redhat cd-image is different from yours (Why ??)
- influence of the older versions
- keyboard settings ???
This is our result :
[postgres@dekatest pgsql]$ psql test
Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.3 on i586-pc-linux-gnu, compiled by gcc egcs-2.91.66]
type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: test
test=> CREATE TABLE BLANK (column1 varchar(5));
CREATE
test=> INSERT INTO BLANK (column1) VALUES (' 1');
INSERT 587145 1
test=> INSERT INTO BLANK (column1) VALUES (' 11');
INSERT 587146 1
test=> INSERT INTO BLANK (column1) VALUES (' 100');
INSERT 587147 1
test=> INSERT INTO BLANK (column1) VALUES (' 2');
INSERT 587148 1
test=> SELECT * FROM BLANK order by column1;
column1
-------
1
100
11
2
(4 rows)
Any Idea ?
greetings,
Frans
At 10:55 15/12/99 -0500, you wrote:
Tom Lane wrote:
I wonder if this could be a LOCALE or MULTIBYTE issue. Do you have
either feature enabled in your copy, and if so what locale/encoding
do you use? (I'm running plain vanilla no-USE_LOCALE, no-MULTIBYTE
code, so that might be why I don't see anything funny...)He's running the RPM distribution, which at that release has
--enable-locale but no multibyte.Using the no-locale RPM's I last built, I can't reproduce his results.
Frans, try out the no-locale rpm set and see if the result changes, if
you please. (using wget, you would do: wget
http://www.ramifordistat.net/postgres/RPMS/redhat-6.x/postgresql*-2nl.i386.
rpm
)
This will verify whether it is locale-related or not. I would install
the locale RPMs and test for you right now, but my 6.1 machine is at
home. If it is inconvenient for you to download this, let me know, and
I'll try to test tonight at home -- although, I've been meaning to do
just that for nearly a week now, but I haven't even fired up the machine
at home in the last week.--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Thu Dec 16 19:20:59 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA68607
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 19:20:56 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id TAA00608;
Thu, 16 Dec 1999 19:20:48 -0500
Message-ID: <385981DF.9762BFC8@wgcr.org>
Date: Thu, 16 Dec 1999 19:20:47 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Frans Van Elsacker <fve@atbib.be>
CC: pgsql-hackers@postgresql.org, jbj@redhat.com, gafton@redhat.com,
tgl@sss.pgh.pa.us
Subject: Re: [HACKERS] ordering RH6.1
References: <16598.945214137@sss.pgh.pa.us>
<3.0.6.32.19991216235345.00886530@193.75.233.1>
Content-Type: multipart/mixed; boundary="------------A6AB73BD46D1E6B7BFC9AE67"
This is a multi-part message in MIME format.
--------------A6AB73BD46D1E6B7BFC9AE67
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
[Cristian, Jeff: we have a problem here. RedHat 6.1 Install versus
RedHat 6.0 upgraded to 6.1 behaves differently. Ideas of where to start
looking?]
Frans Van Elsacker wrote:
But we received the same bad results as before.
column1
-------
1
100
11
2
(4 rows)Any Idea ?
Ok, I bit the bullet and spent the whole day (plus or minus a couple of
hours) putting together a test bed. I have three machines in this
testbed:
1.) My production server, running Mandrake 5.3, Postgresql 6.5.3-2nl;
2.) My backup server, running RedHat 6.0, Postgresql 6.5.3-2nl;
3.) My development server, freshly installed with RH 6.1 + all updates,
PostgreSQL 6.5.3-2nl.
I have now reproduced the results. HOWEVER, my home machine didn't
reproduce the earlier results, and it is RedHat 6.1 (an upgrade from RH
6.0).
For Mandrake 5.3:
column1
-------
1
2
11
100
(4 rows)
For RH 6.0: ditto Mandrake 5.3.
for RH 6.1 (fresh install):
column1
-------
1
100
11
2
So, I moved the physical database structure over from the 6.1 machine to
the 6.0 machine and redid the select: the right results.
The RedHat 6.0 machine is running the same exact postgres binaries that
the RedHat 6.1 machine is running -- the 6.5.3-2nl rpms were built on my
home RedHat 6.1 machine. The Mandrake 5.3 machine is running the RedHat
5.2 binaries built by the alternate boot set on the development server
(which is why it took most of the day to set things up....).
Ok, hackers:
What library routine is used to do the order by in this case?
I'm going to retry this exact set of queries again at home -- I wasn't
able to reproduce the last set of results -- but we'll see what happens
here.
Strange.
I'll see what I can find -- this also explains some strange regression
results I was mailed awhile back. In fact, let's try regression on the
RH 6.1 fresh install.... AND I AM GETTING FAILURES THAT I HAVE NEVER
GOTTEN AT HOME ON MY UPGRADE REDHAT 6.1!
Recap while I'm waiting for regression to finish:
The fresh install of RedHat 6.1 is from the exact same CD that I
upgraded my home box from RH 6.0. The ONLY difference is the fresh
install versus the upgrade -- same versions of PostgreSQL. I am going to
double check regression at home, but I have not seen these results
before, and I distinctly remember running regression at home. I'll keep
you all updated.
[Nine minutes later]
Failures: float8, geometry, select implicit, select having, and select
views. The regress.out and regression.diffs are attached. Float8 and
geometry are normal.
Looking at the regression diffs, it is obvious that there is a collation
problem here. But where is this collation sequence problem coming from?
(Note that the 6.5.3-2nl RPMs are built without locale support.)
I'm going to go digging into a diff of my home machine versus this new
RH 6.1 install.
--
Lamar Owen
WGCR Internet Radio
--------------A6AB73BD46D1E6B7BFC9AE67
Content-Type: text/plain; charset=us-ascii;
name="regression.diffs"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="regression.diffs"
*** expected/float8.out Sat Jan 23 19:12:59 1999
--- results/float8.out Thu Dec 16 19:02:15 1999
***************
*** 189,201 ****
QUERY: SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
ERROR: Bad float8 input format -- overflow
QUERY: SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
! ERROR: pow() result is out of range
QUERY: SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 = '0.0' ;
ERROR: can't take log of zero
QUERY: SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 < '0.0' ;
ERROR: can't take log of a negative number
QUERY: SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
! ERROR: exp() result is out of range
QUERY: SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;
ERROR: float8div: divide by zero error
QUERY: SELECT '' AS five, FLOAT8_TBL.*;
--- 189,217 ----
QUERY: SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
ERROR: Bad float8 input format -- overflow
QUERY: SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
! bad|?column?
! ---+--------
! |0
! |NaN
! |NaN
! |NaN
! |NaN
! (5 rows)
!
QUERY: SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 = '0.0' ;
ERROR: can't take log of zero
QUERY: SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 < '0.0' ;
ERROR: can't take log of a negative number
QUERY: SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
! bad| ?column?
! ---+--------------------
! | 1
! |7.39912306090513e-16
! | 0
! | 0
! | 1
! (5 rows)
!
QUERY: SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;
ERROR: float8div: divide by zero error
QUERY: SELECT '' AS five, FLOAT8_TBL.*;
----------------------
*** expected/geometry.out Sun Dec 13 18:49:18 1998
--- results/geometry.out Thu Dec 16 19:02:21 1999
***************
*** 112,118 ****
|(-5,-12) |[(10,-10),(-3,-4)] |(-1.60487804878049,-4.64390243902439)
|(10,10) |[(10,-10),(-3,-4)] |(2.39024390243902,-6.48780487804878)
|(0,0) |[(-1000000,200),(300000,-40)]|(0.0028402365895872,15.384614860264)
! |(-10,0) |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140473)
|(-3,4) |[(-1000000,200),(300000,-40)]|(-2.99789812267519,15.3851688427303)
|(5.1,34.5)|[(-1000000,200),(300000,-40)]|(5.09647083221496,15.3836744976925)
|(-5,-12) |[(-1000000,200),(300000,-40)]|(-4.99494420845634,15.3855375281616)
--- 112,118 ----
|(-5,-12) |[(10,-10),(-3,-4)] |(-1.60487804878049,-4.64390243902439)
|(10,10) |[(10,-10),(-3,-4)] |(2.39024390243902,-6.48780487804878)
|(0,0) |[(-1000000,200),(300000,-40)]|(0.0028402365895872,15.384614860264)
! |(-10,0) |[(-1000000,200),(300000,-40)]|(-9.99715942258202,15.3864610140472)
|(-3,4) |[(-1000000,200),(300000,-40)]|(-2.99789812267519,15.3851688427303)
|(5.1,34.5)|[(-1000000,200),(300000,-40)]|(5.09647083221496,15.3836744976925)
|(-5,-12) |[(-1000000,200),(300000,-40)]|(-4.99494420845634,15.3855375281616)
***************
*** 409,433 ****
QUERY: SELECT '' AS six, polygon(f1)
FROM CIRCLE_TBL;
six|polygon
! ---+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
! |((-3,0),(-2.59807621135332,1.5),(-1.5,2.59807621135332),(-1.83690953073357e-16,3),(1.5,2.59807621135332),(2.59807621135332,1.5),(3,3.67381906146713e-16),(2.59807621135332,-1.5),(1.5,-2.59807621135332),(5.5107285922007e-16,-3),(-1.5,-2.59807621135332),(-2.59807621135332,-1.5))
! |((-99,2),(-85.6025403784439,52),(-49,88.6025403784439),(0.999999999999994,102),(51,88.6025403784439),(87.6025403784439,52),(101,2.00000000000001),(87.6025403784439,-48),(51,-84.6025403784438),(1.00000000000002,-98),(-49,-84.6025403784439),(-85.6025403784438,-48))
! |((-4,3),(-3.33012701892219,5.5),(-1.5,7.33012701892219),(1,8),(3.5,7.33012701892219),(5.33012701892219,5.5),(6,3),(5.33012701892219,0.500000000000001),(3.5,-1.33012701892219),(1,-2),(-1.5,-1.33012701892219),(-3.33012701892219,0.499999999999998))
! |((-2,2),(-1.59807621135332,3.5),(-0.5,4.59807621135332),(1,5),(2.5,4.59807621135332),(3.59807621135332,3.5),(4,2),(3.59807621135332,0.500000000000001),(2.5,-0.598076211353315),(1,-1),(-0.5,-0.598076211353316),(-1.59807621135332,0.499999999999999))
! |((90,200),(91.3397459621556,205),(95,208.660254037844),(100,210),(105,208.660254037844),(108.660254037844,205),(110,200),(108.660254037844,195),(105,191.339745962156),(100,190),(95,191.339745962156),(91.3397459621556,195))
! |((0,0),(13.3974596215561,50),(50,86.6025403784439),(100,100),(150,86.6025403784439),(186.602540378444,50),(200,1.22460635382238e-14),(186.602540378444,-50),(150,-86.6025403784438),(100,-100),(50,-86.6025403784439),(13.3974596215562,-50))
(6 rows)
QUERY: SELECT '' AS six, polygon(8, f1)
FROM CIRCLE_TBL;
six|polygon
! ---+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
! |((-3,0),(-2.12132034355964,2.12132034355964),(-1.83690953073357e-16,3),(2.12132034355964,2.12132034355964),(3,3.67381906146713e-16),(2.12132034355964,-2.12132034355964),(5.5107285922007e-16,-3),(-2.12132034355964,-2.12132034355964))
! |((-99,2),(-69.7106781186548,72.7106781186548),(0.999999999999994,102),(71.7106781186547,72.7106781186548),(101,2.00000000000001),(71.7106781186548,-68.7106781186547),(1.00000000000002,-98),(-69.7106781186547,-68.7106781186548))
! |((-4,3),(-2.53553390593274,6.53553390593274),(1,8),(4.53553390593274,6.53553390593274),(6,3),(4.53553390593274,-0.535533905932737),(1,-2),(-2.53553390593274,-0.535533905932738))
! |((-2,2),(-1.12132034355964,4.12132034355964),(1,5),(3.12132034355964,4.12132034355964),(4,2),(3.12132034355964,-0.121320343559642),(1,-1),(-1.12132034355964,-0.121320343559643))
! |((90,200),(92.9289321881345,207.071067811865),(100,210),(107.071067811865,207.071067811865),(110,200),(107.071067811865,192.928932188135),(100,190),(92.9289321881345,192.928932188135))
! |((0,0),(29.2893218813452,70.7106781186548),(100,100),(170.710678118655,70.7106781186548),(200,1.22460635382238e-14),(170.710678118655,-70.7106781186547),(100,-100),(29.2893218813453,-70.7106781186548))
(6 rows)
QUERY: SELECT '' AS six, circle(f1, 50.0)
--- 409,433 ----
QUERY: SELECT '' AS six, polygon(f1)
FROM CIRCLE_TBL;
six|polygon
! ---+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
! |((-3,0),(-2.59807621135076,1.50000000000442),(-1.49999999999116,2.59807621135842),(1.53102359017709e-11,3),(1.50000000001768,2.59807621134311),(2.59807621136607,1.4999999999779),(3,-3.06204718035418e-11),(2.59807621133545,-1.50000000003094),(1.49999999996464,-2.59807621137373),(-4.59307077053127e-11,-3),(-1.5000000000442,-2.5980762113278),(-2.59807621138138,-1.49999999995138))
! |((-99,2),(-85.6025403783588,52.0000000001473),(-48.9999999997054,88.602540378614),(1.00000000051034,102),(51.0000000005893,88.6025403781036),(87.6025403788692,51.9999999992634),(101,1.99999999897932),(87.6025403778485,-48.0000000010313),(50.9999999988214,-84.6025403791243),(0.999999998468976,-98),(-49.0000000014732,-84.6025403775933),(-85.6025403793795,-47.9999999983795))
! |((-4,3),(-3.33012701891794,5.50000000000737),(-1.49999999998527,7.3301270189307),(1.00000000002552,8),(3.50000000002946,7.33012701890518),(5.33012701894346,5.49999999996317),(6,2.99999999994897),(5.33012701889242,0.499999999948437),(3.49999999994107,-1.33012701895622),(0.999999999923449,-2),(-1.50000000007366,-1.33012701887966),(-3.33012701896897,0.500000000081028))
! |((-2,2),(-1.59807621135076,3.50000000000442),(-0.499999999991161,4.59807621135842),(1.00000000001531,5),(2.50000000001768,4.59807621134311),(3.59807621136607,3.4999999999779),(4,1.99999999996938),(3.59807621133545,0.499999999969062),(2.49999999996464,-0.59807621137373),(0.999999999954069,-1),(-0.500000000044197,-0.598076211327799),(-1.59807621138138,0.500000000048617))
! |((90,200),(91.3397459621641,205.000000000015),(95.0000000000295,208.660254037861),(100.000000000051,210),(105.000000000059,208.66025403781),(108.660254037887,204.999999999926),(110,199.999999999898),(108.660254037785,194.999999999897),(104.999999999882,191.339745962088),(99.9999999998469,190),(94.9999999998527,191.339745962241),(91.3397459620621,195.000000000162))
! |((0,0),(13.3974596216412,50.0000000001473),(50.0000000002946,86.602540378614),(100.00000000051,100),(150.000000000589,86.6025403781036),(186.602540378869,49.9999999992634),(200,-1.02068239345139e-09),(186.602540377848,-50.0000000010313),(149.999999998821,-86.6025403791243),(99.999999998469,-100),(49.9999999985268,-86.6025403775933),(13.3974596206205,-49.9999999983795))
(6 rows)
QUERY: SELECT '' AS six, polygon(8, f1)
FROM CIRCLE_TBL;
six|polygon
! ---+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
! |((-3,0),(-2.12132034355423,2.12132034356506),(1.53102359017709e-11,3),(2.12132034357588,2.1213203435434),(3,-3.06204718035418e-11),(2.12132034353258,-2.12132034358671),(-4.59307077053127e-11,-3),(-2.12132034359753,-2.12132034352175))
! |((-99,2),(-69.7106781184743,72.7106781188352),(1.00000000051034,102),(71.710678119196,72.7106781181134),(101,1.99999999897932),(71.7106781177526,-68.7106781195569),(0.999999998468976,-98),(-69.7106781199178,-68.7106781173917))
! |((-4,3),(-2.53553390592372,6.53553390594176),(1.00000000002552,8),(4.5355339059598,6.53553390590567),(6,2.99999999994897),(4.53553390588763,-0.535533905977846),(0.999999999923449,-2),(-2.53553390599589,-0.535533905869586))
! |((-2,2),(-1.12132034355423,4.12132034356506),(1.00000000001531,5),(3.12132034357588,4.1213203435434),(4,1.99999999996938),(3.12132034353258,-0.121320343586707),(0.999999999954069,-1),(-1.12132034359753,-0.121320343521752))
! |((90,200),(92.9289321881526,207.071067811884),(100.000000000051,210),(107.07106781192,207.071067811811),(110,199.999999999898),(107.071067811775,192.928932188044),(99.9999999998469,190),(92.9289321880082,192.928932188261))
! |((0,0),(29.2893218815257,70.7106781188352),(100.00000000051,100),(170.710678119196,70.7106781181134),(200,-1.02068239345139e-09),(170.710678117753,-70.7106781195569),(99.999999998469,-100),(29.2893218800822,-70.7106781173917))
(6 rows)
QUERY: SELECT '' AS six, circle(f1, 50.0)
----------------------
*** expected/select_implicit.out Sun Aug 8 17:39:34 1999
--- results/select_implicit.out Thu Dec 16 19:04:51 1999
***************
*** 14,23 ****
--------+-----
AAAA | 2
BBBB | 2
- CCCC | 2
- XXXX | 1
bbbb | 1
cccc | 2
(6 rows)
QUERY: SELECT count(*) FROM test_missing_target GROUP BY test_missing_target.c;
--- 14,23 ----
--------+-----
AAAA | 2
BBBB | 2
bbbb | 1
+ CCCC | 2
cccc | 2
+ XXXX | 1
(6 rows)
QUERY: SELECT count(*) FROM test_missing_target GROUP BY test_missing_target.c;
***************
*** 25,34 ****
-----
2
2
- 2
- 1
1
2
(6 rows)
QUERY: SELECT count(*) FROM test_missing_target GROUP BY a ORDER BY b;
--- 25,34 ----
-----
2
2
1
2
+ 2
+ 1
(6 rows)
QUERY: SELECT count(*) FROM test_missing_target GROUP BY a ORDER BY b;
***************
*** 87,96 ****
--------+-----
AAAA | 2
BBBB | 2
- CCCC | 2
- XXXX | 1
bbbb | 1
cccc | 2
(6 rows)
QUERY: SELECT c, count(*) FROM test_missing_target GROUP BY 3;
--- 87,96 ----
--------+-----
AAAA | 2
BBBB | 2
bbbb | 1
+ CCCC | 2
cccc | 2
+ XXXX | 1
(6 rows)
QUERY: SELECT c, count(*) FROM test_missing_target GROUP BY 3;
----------------------
*** expected/select_having.out Wed Sep 2 19:37:11 1998
--- results/select_having.out Thu Dec 16 19:04:52 1999
***************
*** 30,37 ****
GROUP BY c HAVING count(*) > 2 OR min(a) = max(a);
c |max
--------+---
- XXXX | 0
bbbb | 5
(2 rows)
QUERY: DROP TABLE test_having;
--- 30,37 ----
GROUP BY c HAVING count(*) > 2 OR min(a) = max(a);
c |max
--------+---
bbbb | 5
+ XXXX | 0
(2 rows)
QUERY: DROP TABLE test_having;
----------------------
*** expected/select_views.out Mon Feb 23 08:59:17 1998
--- results/select_views.out Thu Dec 16 19:05:21 1999
***************
*** 411,416 ****
--- 411,430 ----
I- 580 | 21
I- 580 | 22
I- 580 | 22
+ I- 580/I-680 Ramp| 2
+ I- 580/I-680 Ramp| 2
+ I- 580/I-680 Ramp| 2
+ I- 580/I-680 Ramp| 2
+ I- 580/I-680 Ramp| 2
+ I- 580/I-680 Ramp| 2
+ I- 580/I-680 Ramp| 4
+ I- 580/I-680 Ramp| 4
+ I- 580/I-680 Ramp| 4
+ I- 580/I-680 Ramp| 4
+ I- 580/I-680 Ramp| 5
+ I- 580/I-680 Ramp| 6
+ I- 580/I-680 Ramp| 6
+ I- 580/I-680 Ramp| 6
I- 580 Ramp| 2
I- 580 Ramp| 2
I- 580 Ramp| 2
***************
*** 661,680 ****
I- 580 Ramp| 8
I- 580 Ramp| 8
I- 580 Ramp| 8
- I- 580/I-680 Ramp| 2
- I- 580/I-680 Ramp| 2
- I- 580/I-680 Ramp| 2
- I- 580/I-680 Ramp| 2
- I- 580/I-680 Ramp| 2
- I- 580/I-680 Ramp| 2
- I- 580/I-680 Ramp| 4
- I- 580/I-680 Ramp| 4
- I- 580/I-680 Ramp| 4
- I- 580/I-680 Ramp| 4
- I- 580/I-680 Ramp| 5
- I- 580/I-680 Ramp| 6
- I- 580/I-680 Ramp| 6
- I- 580/I-680 Ramp| 6
I- 680 | 2
I- 680 | 2
I- 680 | 2
--- 675,680 ----
----------------------
--------------A6AB73BD46D1E6B7BFC9AE67
Content-Type: application/x-unknown-content-type-out_auto_file;
name="regress.out"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="regress.out"
PT09PT09PT09PT09PT09IE5vdGVzLi4uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
PT09PT09PT09PT09PT09PT0KcG9zdG1hc3RlciBtdXN0IGFscmVhZHkgYmUgcnVubmluZyBm
b3IgdGhlIHJlZ3Jlc3Npb24gdGVzdHMgdG8gc3VjY2VlZC4KVGhlIHRpbWUgem9uZSBpcyBu
b3cgc2V0IHRvIFBTVDhQRFQgZXhwbGljaXRseSBieSB0aGlzIHJlZ3Jlc3Npb24gdGVzdAog
Y2xpZW50IGZyb250ZW5kLiBQbGVhc2UgcmVwb3J0IGFueSBhcHBhcmVudCBwcm9ibGVtcyB0
bwogICBwb3J0c0Bwb3N0Z3Jlc3FsLm9yZwpTZWUgcmVncmVzcy9SRUFETUUgZm9yIG1vcmUg
aW5mb3JtYXRpb24uCgo9PT09PT09PT09PT09PT0gZGVzdHJveWluZyBvbGQgcmVncmVzc2lv
biBkYXRhYmFzZS4uLiA9PT09PT09PT09PT09PT09PQpkZXN0cm95ZGI6IGRhdGFiYXNlIGRl
c3Ryb3kgZmFpbGVkIG9uIHJlZ3Jlc3Npb24uCj09PT09PT09PT09PT09PSBjcmVhdGluZyBu
ZXcgcmVncmVzc2lvbiBkYXRhYmFzZS4uLiAgID09PT09PT09PT09PT09PT09Cj09PT09PT09
PT09PT09PSBpbnN0YWxsaW5nIFBML3BnU1FMLi4uICAgICAgICAgICAgICAgID09PT09PT09
PT09PT09PT09Cj09PT09PT09PT09PT09PSBydW5uaW5nIHJlZ3Jlc3Npb24gcXVlcmllcy4u
LiAgICAgICAgID09PT09PT09PT09PT09PT09CmJvb2xlYW4gLi4gb2sKY2hhciAuLiBvawpu
YW1lIC4uIG9rCnZhcmNoYXIgLi4gb2sKdGV4dCAuLiBvawpzdHJpbmdzIC4uIG9rCmludDIg
Li4gb2sKaW50NCAuLiBvawppbnQ4IC4uIG9rCm9pZCAuLiBvawpmbG9hdDQgLi4gb2sKZmxv
YXQ4IC4uIGZhaWxlZApudW1lcm9sb2d5IC4uIG9rCnBvaW50IC4uIG9rCmxzZWcgLi4gb2sK
Ym94IC4uIG9rCnBhdGggLi4gb2sKcG9seWdvbiAuLiBvawpjaXJjbGUgLi4gb2sKZ2VvbWV0
cnkgLi4gZmFpbGVkCnRpbWVzcGFuIC4uIG9rCmRhdGV0aW1lIC4uIG9rCnJlbHRpbWUgLi4g
b2sKYWJzdGltZSAuLiBvawp0aW50ZXJ2YWwgLi4gb2sKaG9yb2xvZ3kgLi4gb2sKaW5ldCAu
LiBvawpjb21tZW50cyAuLiBvawpvaWRqb2lucyAuLiBvawp0eXBlX3Nhbml0eSAuLiBvawpv
cHJfc2FuaXR5IC4uIG9rCmNyZWF0ZV9mdW5jdGlvbl8xIC4uIG9rCmNyZWF0ZV90eXBlIC4u
IG9rCmNyZWF0ZV90YWJsZSAuLiBvawpjcmVhdGVfZnVuY3Rpb25fMiAuLiBvawpjb25zdHJh
aW50cyAuLiBvawp0cmlnZ2VycyAuLiBvawpjb3B5IC4uIG9rCmNyZWF0ZV9taXNjIC4uIG9r
CmNyZWF0ZV9hZ2dyZWdhdGUgLi4gb2sKY3JlYXRlX29wZXJhdG9yIC4uIG9rCmNyZWF0ZV92
aWV3IC4uIG9rCmNyZWF0ZV9pbmRleCAuLiBvawpzYW5pdHlfY2hlY2sgLi4gb2sKZXJyb3Jz
IC4uIG9rCnNlbGVjdCAuLiBvawpzZWxlY3RfaW50byAuLiBvawpzZWxlY3RfZGlzdGluY3Qg
Li4gb2sKc2VsZWN0X2Rpc3RpbmN0X29uIC4uIG9rCnNlbGVjdF9pbXBsaWNpdCAuLiBmYWls
ZWQKc2VsZWN0X2hhdmluZyAuLiBmYWlsZWQKc3Vic2VsZWN0IC4uIG9rCnVuaW9uIC4uIG9r
CmNhc2UgLi4gb2sKam9pbiAuLiBvawphZ2dyZWdhdGVzIC4uIG9rCnRyYW5zYWN0aW9ucyAu
LiBvawpyYW5kb20gLi4gb2sKcG9ydGFscyAuLiBvawptaXNjIC4uIG9rCmFycmF5cyAuLiBv
awpidHJlZV9pbmRleCAuLiBvawpoYXNoX2luZGV4IC4uIG9rCnNlbGVjdF92aWV3cyAuLiBm
YWlsZWQKYWx0ZXJfdGFibGUgLi4gb2sKcG9ydGFsc19wMiAuLiBvawpydWxlcyAuLiBvawps
aW1pdCAuLiBvawpwbHBnc3FsIC4uIG9rCnRlbXAgLi4gb2sKbnVtZXJpYyAuLiBvawo=
--------------A6AB73BD46D1E6B7BFC9AE67--
From bouncefilter Thu Dec 16 19:27:08 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA69151
for <hackers@postgresql.org>; Thu, 16 Dec 1999 19:26:27 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:61512 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKMAK133201>; Fri, 17 Dec 1999 01:25:58 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11ylIp-0001nB-00; Fri, 17 Dec 1999 01:31:23 +0100
Date: Fri, 17 Dec 1999 01:31:23 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Postgres Hackers List <hackers@postgresql.org>
Subject: Re: [HACKERS] Re: [PATCHES] createdb/dropdb fixes
In-Reply-To: <16628.945215055@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.21.9912161948210.5199-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-14, Tom Lane mentioned:
Yes. In fact, I'd argue for filtering the names more heavily than that;
just to take a for-example, Bad Things would ensue if we accepted a
database name of "..".
My rm refuses to remove '..' and '.'.
It is easy to devise cases in which accepting leading "." or embedded "/"
leads to disaster; if you think those are OK, allow me to destroy your
installation for you ;-). I haven't yet thought of a way to cause
trouble with a back-quote in a DB name (given that single quotes are
disallowed) ... but I bet some enterprising hacker can find one.
The slash problem will disappear (I hope) when I fix that alternate
location issue.
Beyond the bare minimum security issues, I also think we should take
pity on the poor dbadmin who may have to be looking at these
subdirectories or filenames. Is it really a good idea to allow carriage
returns or other control characters in file/directory names? Is it
even a good idea to allow spaces? I don't think so. If we were not
Spaces why not? I use spaces all the time in filenames. But perhaps we
should make a definite list of things we won't allow, such as dots (.),
slashes (/), tildes (~), etc., and everything below ASCII 32. But limiting
it to a finite list of characters would really be a blow to people using
other character sets.
Of course this particular case might as well use unlink(),
Not unless your system's unlink is much different from mine's...
Is it just me or is your system intentionally designed to be different
from anybody elses? :) Last time I checked rm does call unlink. Relying on
sh-utils sort of commands has its own set of problems. For example in the
6.5 source, run the postmaster on a terminal, revoke all permissions on a
database directory (chmod a-rwx testdb) and try to drop it. My rm will
prompt on the postmaster terminal for verification while the whole thing
hangs ...
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Dec 16 19:27:01 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA69157
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 19:26:37 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:61608 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKMAb108622>; Fri, 17 Dec 1999 01:26:15 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11ylJ5-0001nh-00; Fri, 17 Dec 1999 01:31:39 +0100
Date: Fri, 17 Dec 1999 01:31:39 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
In-Reply-To: <18447.945277541@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.21.9912162008200.5199-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-15, Tom Lane mentioned:
Next question is, do we want to leave the code as-is, or tighten up
the parser to reject AS-names and column numbers in GROUP BY?
It seems to me we should change it, because there are cases where the
existing code will do the wrong thing according to the SQL spec.
If "foo" is a column name and also an AS-name for something else,
"GROUP BY foo" should group on the raw column according to the spec,
but right now we will pick the SELECT result value instead.
The AS-names are way too convenient to drop them. In the particular
example of ambiguity you could send a notice or a reject it. (What does
ORDER BY foo do in this case? Same problem.)
Perhaps it's really time for the --enable-sql option. :)
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Dec 16 19:27:59 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA69303
for <hackers@postgresql.org>; Thu, 16 Dec 1999 19:27:18 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:61840 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKMBD98379>; Fri, 17 Dec 1999 01:26:55 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11ylJd-0001oO-00; Fri, 17 Dec 1999 01:32:13 +0100
Date: Fri, 17 Dec 1999 01:32:13 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: prlw1@cam.ac.uk, hackers@postgresql.org
Subject: Re: [HACKERS] initdb / pg_version
In-Reply-To: <24317.945354351@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.21.9912162033350.5199-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-16, Tom Lane mentioned:
Peter Eisentraut <e99re41@DoCS.UU.SE> writes:
Oh yeah. It's on my wish/todo list. But I just looked at some of those
things the other day and it looks like for a complete solution, much of
the makefiles will simply need to be scrapped and rewritten.Perhaps GNU automake would give a good running start on the problem.
Aah, I was going to suggest that but feared too many people being
reluctant to adding more GNU stuff and learning another macro set, but now
that you said it it's fair game. :) I agree we should investigate that
sometime.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Dec 16 19:28:03 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA69302;
Thu, 16 Dec 1999 19:27:17 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:61848 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKMBG102476>; Fri, 17 Dec 1999 01:26:58 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11ylJj-0001oQ-00; Fri, 17 Dec 1999 01:32:19 +0100
Date: Fri, 17 Dec 1999 01:32:19 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Jose Soares <jose@sferacarta.com>
cc: general <pgsql-general@postgresql.org>,
hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] \copy problem
In-Reply-To: <385912F6.88CC2E7F@sferacarta.com>
Message-ID: <Pine.LNX.4.21.9912162038270.5199-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-16, Jose Soares mentioned:
I have a problem using \copy to load data into tables.
I have to load data into a table that contains data type fields with
NULL values.
I tried using \N but it doesn't work.
What can I do to insert a null into a data field?
Works for me. I also just messed with that part in the devel sources the
other day and I don't see a reason why it wouldn't. Perhaps you could run
the COPY command instead (and make sure the file is accessible to the
server process) or simply run a COPY FROM STDIN; and enter a few things by
hand and see what you get.
the \copy error messages..
What about to have the row number and the error type instead of that...
hygea=> \copy movimentazioni from 4;
pqReadData() -- read() failed: errno=32
Broken pipe
PQendcopy: resetting connection
Copy failed.
When the backend sends garbage it cannot possibly send the error
message. The error was that the read from the connection failed. Of course
one could argue why that is ... Hmm.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Thu Dec 16 21:46:01 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA12182
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 21:45:56 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id SAA15728;
Thu, 16 Dec 1999 18:45:36 -0800 (PST)
Message-Id: <3.0.1.32.19991216170601.010c1380@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 16 Dec 1999 17:06:01 -0800
To: Lamar Owen <lamar.owen@wgcr.org>, Frans Van Elsacker <fve@atbib.be>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] ordering RH6.1
Cc: pgsql-hackers@postgreSQL.org, jbj@redhat.com, gafton@redhat.com,
tgl@sss.pgh.pa.us
In-Reply-To: <385981DF.9762BFC8@wgcr.org>
References: <16598.945214137@sss.pgh.pa.us>
<3.0.6.32.19991216235345.00886530@193.75.233.1>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 07:20 PM 12/16/99 -0500, Lamar Owen wrote:
I'll see what I can find -- this also explains some strange regression
results I was mailed awhile back. In fact, let's try regression on the
RH 6.1 fresh install.... AND I AM GETTING FAILURES THAT I HAVE NEVER
GOTTEN AT HOME ON MY UPGRADE REDHAT 6.1!
I know that AOLserver works on 6.0 and has problems on 6.1 (a 2.2.12
kernel) and works again if you upgrade your 6.1 to a 2.2.13 kernel.
(have to use "-i" on 6.1 or it won't work, though I forget offhand
what "-i" does for AOLserver)
This ain't specific help but at least PostgreSQL's not alone in
having weird problems with RH 6.* releases.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Dec 16 20:37:00 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA87099
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 20:36:43 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id UAA26610;
Thu, 16 Dec 1999 20:35:35 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Jeroen van Vianen <jeroen@design.nl>, pgsql-hackers@postgreSQL.org
Subject: Notation for nextval() (was Re: Several small patches)
In-reply-to: Your message of Fri, 17 Dec 1999 01:31:59 +0100 (CET)
<Pine.LNX.4.21.9912162018250.5199-100000@localhost.localdomain>
Date: Thu, 16 Dec 1999 20:35:34 -0500
Message-ID: <26608.945394534@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
[ Note redirection to hackers list ]
Peter Eisentraut <peter_e@gmx.net> writes:
It should actually almost work to write sq.nextval as things stand,
because Postgres has for a long time considered table.function and
function(table) to be interchangeable notations for certain kinds of
May I wonder what the point and value of that practice is and why one
would want to extend it further?
I think the reason the Berkeley guys did it originally was to support
functions that return tuples, and in particular extracting individual
columns of such a function's result. They didn't want to allow
function(sourcetable).column
(for reasons not real clear to me, but maybe they had good ones),
so they wrote it as
sourcetable.function.column
This actually still works; you can find examples in the regress tests.
My first reaction to Jeroen's patch was that it was a good idea poorly
implemented. I've never liked nextval('sequenceobject') from a
syntactic point of view, because a quoted string isn't an identifier
but you really want to have a normal SQL identifier to name the sequence.
(For example, right now we have some truly ugly hacks to try to make
that constant behave like a regular identifier as far as
case-folding-or-not-case-folding goes.)
It'd be a lot nicer if the syntax could be just nextval(sequencename)
or sequencename.nextval. And since you can select parameters of the
sequence with sequencename.field, why shouldn't sequencename.nextval
work?
However, on second thought I wonder if we'd be opening a can of worms
to do it that way. If I write
SELECT a, foo.b FROM bar;
what I actually get is a join across tables foo and bar --- foo is
implicitly added to the FROM list. Now, if I were to write
SELECT a, foo.nextval FROM bar;
presumably I don't want a join against the sequence foo, but I am not
sure that this will be clear either to a human reader or to the machine.
And if you think that's clear enough, what about
SELECT a, foo.nextval, foo.min_value FROM bar;
which surely *must* cause a true join to be generated, since min_value
is a perfectly ordinary field of foo?
So now I'm worried that making the sequence object visible as a table
identifier will cause strange misbehaviors, or at least great confusion.
This needs careful thought before we can accept it.
regards, tom lane
From bouncefilter Thu Dec 16 20:58:01 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA89183
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 20:58:00 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from lorc.wgcr.org (dial-12.r9.ncbrvr.Infoave.Net [206.74.37.140])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with SMTP id UAA00772;
Thu, 16 Dec 1999 20:57:56 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: Frans Van Elsacker <fve@atbib.be>
Subject: Re: [HACKERS] ordering RH6.1
Date: Thu, 16 Dec 1999 20:53:49 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
Cc: pgsql-hackers@postgresql.org, jbj@redhat.com, gafton@redhat.com,
tgl@sss.pgh.pa.us
References: <16598.945214137@sss.pgh.pa.us>
<3.0.6.32.19991216235345.00886530@193.75.233.1>
<385981DF.9762BFC8@wgcr.org>
In-Reply-To: <385981DF.9762BFC8@wgcr.org>
MIME-Version: 1.0
Message-Id: <99121621013601.00845@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
On Thu, 16 Dec 1999, Lamar Owen wrote:
[Cristian, Jeff: we have a problem here. RedHat 6.1 Install versus
RedHat 6.0 upgraded to 6.1 behaves differently. Ideas of where to start
looking?]
I'm going to retry this exact set of queries again at home -- I wasn't
able to reproduce the last set of results -- but we'll see what happens
here.
Ok, confirmation. On my home machine, which was upgraded to RedHat 6.1 from
RedHat 6.0, I get the correct results:
column1
------
1
11
100
2
(4 rows)
Recap while I'm waiting for regression to finish:
The fresh install of RedHat 6.1 is from the exact same CD that I
upgraded my home box from RH 6.0. The ONLY difference is the fresh
install versus the upgrade -- same versions of PostgreSQL. I am going to
double check regression at home, but I have not seen these results
before, and I distinctly remember running regression at home. I'll keep
you all updated.
Update: regression tests that fail on my 6.0-6.1 home machine: float8 and
geometry -- which are normal to fail on RedHat any version. IOW, no collation
problems at home! Oh, I'm running the exact same postgresql binary RPM's at
home as I am running on the fresh RH 6.1 install at work.
Time to dig into date and time stamps on installed RPMs versus updated RPMs.
Frans, try installing RedHat 6.0 on a box, then upgrading to RH 6.1, then rerun
your tests and see what happens.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Thu Dec 16 21:06:01 1999
Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA92962
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 21:05:58 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1])
by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA26748;
Thu, 16 Dec 1999 21:04:25 -0500 (EST)
To: Lamar Owen <lamar.owen@wgcr.org>
cc: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgresql.org,
jbj@redhat.com, gafton@redhat.com
Subject: Re: [HACKERS] ordering RH6.1
In-reply-to: Your message of Thu, 16 Dec 1999 19:20:47 -0500
<385981DF.9762BFC8@wgcr.org>
Date: Thu, 16 Dec 1999 21:04:25 -0500
Message-ID: <26746.945396265@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Lamar Owen <lamar.owen@wgcr.org> writes:
For RH 6.0: [ correct results ]
for RH 6.1 (fresh install):
column1
-------
1
100
11
2
So, I moved the physical database structure over from the 6.1 machine to
the 6.0 machine and redid the select: the right results.
The RedHat 6.0 machine is running the same exact postgres binaries that
the RedHat 6.1 machine is running -- the 6.5.3-2nl rpms were built on my
home RedHat 6.1 machine.
Wow. Same data files, same binaries, different results. Sure looks
like the finger is pointing at 6.1's libc. (I'm assuming that the
binaries make use of a shared-library libc, not statically-linked-in
routines, right?)
Ok, hackers:
What library routine is used to do the order by in this case?
If you compiled with USE_LOCALE, it's strcoll(); if not, strncmp().
See varstr_cmp() in src/backend/utils/adt/varlena.c.
Looking at the regression diffs, it is obvious that there is a collation
problem here. But where is this collation sequence problem coming from?
(Note that the 6.5.3-2nl RPMs are built without locale support.)
OK...
Your regression failures show collation problems in all three of bpchar,
varchar, and name. (But curiously, not for text ... hmm ...). bpchar
and varchar both use varstr_cmp(), but namelt just calls strncmp
unconditionally --- see adt/name.c. So the evidence is looking very
strong that strncmp has got some kind of problem on RH 6.1.
regards, tom lane
From bouncefilter Thu Dec 16 21:47:02 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA12280
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 21:46:55 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id SAA15743;
Thu, 16 Dec 1999 18:45:39 -0800 (PST)
Message-Id: <3.0.1.32.19991216183846.010b4940@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 16 Dec 1999 18:38:46 -0800
To: Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter_e@gmx.net>
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Notation for nextval() (was Re: Several small patches)
Cc: Jeroen van Vianen <jeroen@design.nl>, pgsql-hackers@postgreSQL.org
In-Reply-To: <26608.945394534@sss.pgh.pa.us>
References: <Your message of Fri, 17 Dec 1999 01:31:59 +0100 (CET)
<Pine.LNX.4.21.9912162018250.5199-100000@localhost.localdomain>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 08:35 PM 12/16/99 -0500, Tom Lane wrote:
presumably I don't want a join against the sequence foo, but I am not
sure that this will be clear either to a human reader or to the machine.
I haven't personally heard of any human readers of Oracle SQL getting
confused by this notation... :)
On the other hand, I think nextval(foo) makes more sense, it's a
function operating on the sequence foo, not part of foo. nextval('foo')
is just bizarre, though it's clear and I can't say I worry much about
it now that I'm used to it!
In the porting-from-Oracle project I'm working on, we're just
regsub'ing all foo.nextval's into nextval('foo').
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Thu Dec 16 22:26:02 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA19376
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 22:25:29 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from lorc.wgcr.org (dial-59.r9.ncbrvr.Infoave.Net [206.74.37.187])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with SMTP id WAA00913;
Thu, 16 Dec 1999 22:19:08 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [HACKERS] ordering RH6.1
Date: Thu, 16 Dec 1999 21:56:22 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
Cc: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgresql.org,
jbj@redhat.com, gafton@redhat.com
References: <26746.945396265@sss.pgh.pa.us>
In-Reply-To: <26746.945396265@sss.pgh.pa.us>
MIME-Version: 1.0
Message-Id: <99121622224803.00845@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
On Thu, 16 Dec 1999, Tom Lane wrote:
Lamar Owen <lamar.owen@wgcr.org> writes:
Wow. Same data files, same binaries, different results. Sure looks
like the finger is pointing at 6.1's libc. (I'm assuming that the
binaries make use of a shared-library libc, not statically-linked-in
routines, right?)
Right.
Your regression failures show collation problems in all three of bpchar,
varchar, and name. (But curiously, not for text ... hmm ...). bpchar
and varchar both use varstr_cmp(), but namelt just calls strncmp
unconditionally --- see adt/name.c. So the evidence is looking very
strong that strncmp has got some kind of problem on RH 6.1.
More information: the LOCALE enabled-binaries act the same way. So, there's an
issue with both strcoll and strncmp. What gets me is that it works perfectly
fine on my RedHat 6.1 box that was upgraded from RedHat 6.0 -- but it does not
work fine at all on a box that I did a fresh install on today -- from the same
CD I did the upgrade.
Hmmm....
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
regards, tom lane
From bouncefilter Thu Dec 16 22:54:02 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA24625
for <pgsql-hackers@postgreSQL.org>;
Thu, 16 Dec 1999 22:53:42 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from lorc.wgcr.org (dial-59.r9.ncbrvr.Infoave.Net [206.74.37.187])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with SMTP id WAA00948;
Thu, 16 Dec 1999 22:53:38 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: Frans Van Elsacker <fve@atbib.be>
Subject: Re: [HACKERS] ordering RH6.1
Date: Thu, 16 Dec 1999 22:35:48 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
Cc: pgsql-hackers@postgreSQL.org, jbj@redhat.com, gafton@redhat.com,
tgl@sss.pgh.pa.us
References: <16598.945214137@sss.pgh.pa.us> <385981DF.9762BFC8@wgcr.org>
<99121621013601.00845@lorc.wgcr.org>
In-Reply-To: <99121621013601.00845@lorc.wgcr.org>
MIME-Version: 1.0
Message-Id: <99121622571804.00845@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
On Thu, 16 Dec 1999, Lamar Owen wrote:
On Thu, 16 Dec 1999, Lamar Owen wrote:
[Cristian, Jeff: we have a problem here. RedHat 6.1 Install versus
RedHat 6.0 upgraded to 6.1 behaves differently. Ideas of where to start
looking?]
I'm going to retry this exact set of queries again at home -- I wasn't
able to reproduce the last set of results -- but we'll see what happens
here.Ok, confirmation. On my home machine, which was upgraded to RedHat 6.1 from
RedHat 6.0, I get the correct results:
More information: it seems that the i18n support is the cause of this. If you
remove or rename the file /etc/sysconfig/i18n and restart, then even the fresh
RedHat 6.1 install provides the correct results for this query. This file, I
think, is created during a fresh installation of RH 6.1 -- it doesn't seem to
belong to any RPM. An upgrade wouldn't create this file..... (Jeff? Cristian?
am I right on this?)
Running regression, I get the float8 and geometry failures, but I now get an
opr_sanity failure -- but the other collation failures are gone. The opr_sanity
failure diff:
*** expected/opr_sanity.out Wed May 12 11:02:34 1999
--- results/opr_sanity.out Thu Dec 16 22:39:45 1999
***************
*** 48,56 ****
(p1.proargtypes[0] < p2.proargtypes[0]);
proargtypes|proargtypes
-----------+-----------
- 25| 1043
1042| 1043
! (2 rows)
QUERY: SELECT DISTINCT p1.proargtypes[1], p2.proargtypes[1]
FROM pg_proc AS p1, pg_proc AS p2
--- 48,55 ----
(p1.proargtypes[0] < p2.proargtypes[0]);
proargtypes|proargtypes
-----------+-----------
1042| 1043
! (1 row)
QUERY: SELECT DISTINCT p1.proargtypes[1], p2.proargtypes[1]
FROM pg_proc AS p1, pg_proc AS p2
HOWEVER, after doing an initdb and rerunning regression, this test no longer
fails. FWIW.
I seems that charmap (i18n) rears its ugly head even if locale doesn't.
--
Lamar Owen
WGCR Internet Radio
From bouncefilter Thu Dec 16 22:53:02 1999
Received: from fb01.eng00.mindspring.net (fb01.eng00.mindspring.net
[207.69.229.19]) by hub.org (8.9.3/8.9.3) with ESMTP id WAA24545
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 22:52:29 -0500 (EST)
(envelope-from gafton@redhat.com)
Received: from shefu.redhat.com (user-2ivf55p.dialup.mindspring.com
[165.247.148.185])
by fb01.eng00.mindspring.net (8.9.3/8.8.5) with ESMTP id WAA31318;
Thu, 16 Dec 1999 22:52:26 -0500 (EST)
Received: from localhost (gafton@localhost)
by shefu.redhat.com (8.9.3/8.9.3) with ESMTP id WAA21576;
Thu, 16 Dec 1999 22:52:24 -0500
X-Authentication-Warning: localhost.localdomain: gafton owned process doing
-bs
Date: Thu, 16 Dec 1999 22:52:23 -0500 (EST)
From: Cristian Gafton <gafton@redhat.com>
X-Sender: gafton@localhost.localdomain
To: Lamar Owen <lamar.owen@wgcr.org>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Frans Van Elsacker <fve@atbib.be>,
pgsql-hackers@postgresql.org, jbj@redhat.com
Subject: Re: [HACKERS] ordering RH6.1
In-Reply-To: <99121622224803.00845@lorc.wgcr.org>
Message-ID: <Pine.LNX.4.10.9912162251590.21569-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 16 Dec 1999, Lamar Owen wrote:
More information: the LOCALE enabled-binaries act the same way. So, there's an
issue with both strcoll and strncmp. What gets me is that it works perfectly
fine on my RedHat 6.1 box that was upgraded from RedHat 6.0 -- but it does not
work fine at all on a box that I did a fresh install on today -- from the same
CD I did the upgrade.
Any differences in the environment variables maybe?
Cristian
--
----------------------------------------------------------------------
Cristian Gafton -- gafton@redhat.com -- Red Hat, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UNIX is user friendly. It's just selective about who its friends are.
From bouncefilter Thu Dec 16 23:05:02 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA29050
for <pgsql-hackers@postgresql.org>;
Thu, 16 Dec 1999 23:04:16 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from lorc.wgcr.org (dial-59.r9.ncbrvr.Infoave.Net [206.74.37.187])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with SMTP id WAA00957;
Thu, 16 Dec 1999 22:57:48 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: Cristian Gafton <gafton@redhat.com>
Subject: Re: [HACKERS] ordering RH6.1
Date: Thu, 16 Dec 1999 22:58:21 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Frans Van Elsacker <fve@atbib.be>,
pgsql-hackers@postgresql.org, jbj@redhat.com
References: <Pine.LNX.4.10.9912162251590.21569-100000@localhost.localdomain>
In-Reply-To: <Pine.LNX.4.10.9912162251590.21569-100000@localhost.localdomain>
MIME-Version: 1.0
Message-Id: <99121623012705.00845@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
On Thu, 16 Dec 1999, Cristian Gafton wrote:
On Thu, 16 Dec 1999, Lamar Owen wrote:
More information: the LOCALE enabled-binaries act the same way. So, there's an
issue with both strcoll and strncmp. What gets me is that it works perfectly
fine on my RedHat 6.1 box that was upgraded from RedHat 6.0 -- but it does not
work fine at all on a box that I did a fresh install on today -- from the same
CD I did the upgrade.Any differences in the environment variables maybe?
In a nutshell, yes. /etc/sysconfig/i18n on the fresh install sets LANG,
LC_ALL, and LINGUAS all to be "en_US". The upgraded machine at home doesn't
have an /etc/sysconfig/i18n -- nor does the RH 6.0 box.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Fri Dec 17 00:20:04 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA43559
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 00:19:14 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.3.138]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Thu, 16 Dec 1999 23:10:49 -0600
Sender: ed
Message-ID: <3859C805.9708EAE7@austin.rr.com>
Date: Thu, 16 Dec 1999 23:20:05 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Lamar Owen <lamar.owen@wgcr.org>
CC: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgresql.org,
jbj@redhat.com, gafton@redhat.com, tgl@sss.pgh.pa.us
Subject: Re: [HACKERS] ordering RH6.1
References: <16598.945214137@sss.pgh.pa.us>
<3.0.6.32.19991216235345.00886530@193.75.233.1>
<385981DF.9762BFC8@wgcr.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Failures: float8, geometry, select implicit, select having, and select
views. The regress.out and regression.diffs are attached. Float8 and
geometry are normal.
More problem data...
We installed RH 6.1 fresh, then installed pgsql 6.5.2 from tar.gz. Failures on the following regression tests: float8, geometry, opr_sanity, sanity_check, random, and misc.
On a hunch from this thread, I then removed all postgresql-related RPM packages (with 'rpm -e'), rebuilt pgsql 6.5.2, and all regression tests passed (except float8 and geometry, which is normal).
I've also noticed some new (and possibly related?) RH 6.1 wierdness with a fairly mature perl module, Date::Manip-5.35, that wasn't showing up on RH 6.0. It is now failing the first time it attempts to ascertain the timezone, and then appears to succeed everytime thereafter for a given process (and TZ is clearly set in the configuration for the module as well as showing up with the
'date' command). The RPM removal above had no effect on that problem.
Cheers,
Ed Loehr
From bouncefilter Fri Dec 17 00:24:03 1999
Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net
[194.159.73.21]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA43896
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 00:23:15 -0500 (EST)
(envelope-from jeroen@design.nl)
Received: from [212.238.131.55] (helo=manderijn)
by post.mail.nl.demon.net with esmtp (Exim 2.12 #1)
id 11ypqr-000PKx-00; Fri, 17 Dec 1999 05:22:49 +0000
Message-Id: <4.2.0.58.19991217060920.0096d500@mail.design.nl>
X-Sender: morinel@pop3.demon.nl
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58
Date: Fri, 17 Dec 1999 06:23:08 +0100
To: Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter_e@gmx.net>
From: Jeroen van Vianen <jeroen@design.nl>
Subject: Re: Notation for nextval() (was Re: Several small patches)
Cc: pgsql-hackers@postgresql.org
In-Reply-To: <26608.945394534@sss.pgh.pa.us>
References: <Your message of Fri, 17 Dec 1999 01:31:59 +0100 (CET)
<Pine.LNX.4.21.9912162018250.5199-100000@localhost.localdomain>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 20:19 16-12-99 -0500, Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Applied nextval patch.
I'm still not happy with it --- it may be in a different place, but it
still breaks regular tables that have "nextval" or "currval" columns,
because foo.nextval is still transformed to nextval('foo') regardless
of whether foo is a sequence or not.What I was hoping for was something that would *first* determine whether
foo is a sequence and *then* do the transformation only if so.
This is obviously not possible at the grammar level (the grammar doesn't
know what kind of table foo is, if indeed foo is a table at all), but
ParseFuncOrColumn does have enough info to inspect foo's type.
I thought about this, but couldn't figure out how to test for foo being a
sequence.
Now that I think about it, though, there are some potential semantic
problems with the whole idea. See my about-to-be-written response to
Peter's comment.I don't agree with the parts of the patch, and
did not apply them.I believe his patch to bin/psql/describe.c is reasonable. Evidently
he's dealing with a C compiler that tries to fold multi-part strings
into one part during preprocessing, and it's getting confused by
the conditional compilation of one line of the string. His proposed
fix is more readable than the original code anyway, IMHO.
Yes, I needed this to get psql to compile at all.
I'm dubious about the other two patches also. Evidently there is some
variation across platforms in the desirable switches for ctags --- but
diking out the ones not wanted on a particular platform is no answer.
Perhaps the proper fix is to make the ctags flags a configurable
macro...
The difference in the copyright notice patch is just extending the 1994 -
1999 to 2000 and aligning the quotes.
About ctags: is no one using Linux and ctags on the Postgres sources? Am I
the first one to find this bug?
At 20:35 16-12-99 -0500, Tom Lane wrote:
Peter Eisentraut <peter_e@gmx.net> writes:
It should actually almost work to write sq.nextval as things stand,
because Postgres has for a long time considered table.function and
function(table) to be interchangeable notations for certain kinds ofMay I wonder what the point and value of that practice is and why one
would want to extend it further?I think the reason the Berkeley guys did it originally was to support
functions that return tuples, and in particular extracting individual
columns of such a function's result. They didn't want to allowfunction(sourcetable).column
(for reasons not real clear to me, but maybe they had good ones),
so they wrote it assourcetable.function.column
This actually still works; you can find examples in the regress tests.
My first reaction to Jeroen's patch was that it was a good idea poorly
implemented. I've never liked nextval('sequenceobject') from a
syntactic point of view, because a quoted string isn't an identifier
but you really want to have a normal SQL identifier to name the sequence.
(For example, right now we have some truly ugly hacks to try to make
that constant behave like a regular identifier as far as
case-folding-or-not-case-folding goes.)It'd be a lot nicer if the syntax could be just nextval(sequencename)
or sequencename.nextval. And since you can select parameters of the
sequence with sequencename.field, why shouldn't sequencename.nextval
work?However, on second thought I wonder if we'd be opening a can of worms
to do it that way. If I writeSELECT a, foo.b FROM bar;
what I actually get is a join across tables foo and bar --- foo is
implicitly added to the FROM list. Now, if I were to writeSELECT a, foo.nextval FROM bar;
presumably I don't want a join against the sequence foo, but I am not
sure that this will be clear either to a human reader or to the machine.
And if you think that's clear enough, what aboutSELECT a, foo.nextval, foo.min_value FROM bar;
which surely *must* cause a true join to be generated, since min_value
is a perfectly ordinary field of foo?So now I'm worried that making the sequence object visible as a table
identifier will cause strange misbehaviors, or at least great confusion.
This needs careful thought before we can accept it.
I didn't think about these complications at all (thought that my small
patch would just add a little more compatibility with a minimum of fuss,
but I was wrong). Let me investigate whether I can come up with a better
solution.
Cheers,
Jeroen
From bouncefilter Fri Dec 17 00:35:03 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA48029
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 00:34:34 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA24739;
Fri, 17 Dec 1999 00:33:50 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912170533.AAA24739@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small
patches)
In-Reply-To: <4.2.0.58.19991217060920.0096d500@mail.design.nl> from Jeroen van
Vianen at "Dec 17, 1999 06:23:08 am"
To: Jeroen van Vianen <jeroen@design.nl>
Date: Fri, 17 Dec 1999 00:33:50 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter_e@gmx.net>,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
OK, I have read this. Please give me reasons for any patches you
supply. I would be glad to apply the patch you needed to get psql to
compile if you sent it to me again. I had no idea why the change was
being made. Same for the copyright change.
At 20:19 16-12-99 -0500, Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Applied nextval patch.
I'm still not happy with it --- it may be in a different place, but it
still breaks regular tables that have "nextval" or "currval" columns,
because foo.nextval is still transformed to nextval('foo') regardless
of whether foo is a sequence or not.What I was hoping for was something that would *first* determine whether
foo is a sequence and *then* do the transformation only if so.
This is obviously not possible at the grammar level (the grammar doesn't
know what kind of table foo is, if indeed foo is a table at all), but
ParseFuncOrColumn does have enough info to inspect foo's type.I thought about this, but couldn't figure out how to test for foo being a
sequence.Now that I think about it, though, there are some potential semantic
problems with the whole idea. See my about-to-be-written response to
Peter's comment.I don't agree with the parts of the patch, and
did not apply them.I believe his patch to bin/psql/describe.c is reasonable. Evidently
he's dealing with a C compiler that tries to fold multi-part strings
into one part during preprocessing, and it's getting confused by
the conditional compilation of one line of the string. His proposed
fix is more readable than the original code anyway, IMHO.Yes, I needed this to get psql to compile at all.
I'm dubious about the other two patches also. Evidently there is some
variation across platforms in the desirable switches for ctags --- but
diking out the ones not wanted on a particular platform is no answer.
Perhaps the proper fix is to make the ctags flags a configurable
macro...The difference in the copyright notice patch is just extending the 1994 -
1999 to 2000 and aligning the quotes.About ctags: is no one using Linux and ctags on the Postgres sources? Am I
the first one to find this bug?At 20:35 16-12-99 -0500, Tom Lane wrote:
Peter Eisentraut <peter_e@gmx.net> writes:
It should actually almost work to write sq.nextval as things stand,
because Postgres has for a long time considered table.function and
function(table) to be interchangeable notations for certain kinds ofMay I wonder what the point and value of that practice is and why one
would want to extend it further?I think the reason the Berkeley guys did it originally was to support
functions that return tuples, and in particular extracting individual
columns of such a function's result. They didn't want to allowfunction(sourcetable).column
(for reasons not real clear to me, but maybe they had good ones),
so they wrote it assourcetable.function.column
This actually still works; you can find examples in the regress tests.
My first reaction to Jeroen's patch was that it was a good idea poorly
implemented. I've never liked nextval('sequenceobject') from a
syntactic point of view, because a quoted string isn't an identifier
but you really want to have a normal SQL identifier to name the sequence.
(For example, right now we have some truly ugly hacks to try to make
that constant behave like a regular identifier as far as
case-folding-or-not-case-folding goes.)It'd be a lot nicer if the syntax could be just nextval(sequencename)
or sequencename.nextval. And since you can select parameters of the
sequence with sequencename.field, why shouldn't sequencename.nextval
work?However, on second thought I wonder if we'd be opening a can of worms
to do it that way. If I writeSELECT a, foo.b FROM bar;
what I actually get is a join across tables foo and bar --- foo is
implicitly added to the FROM list. Now, if I were to writeSELECT a, foo.nextval FROM bar;
presumably I don't want a join against the sequence foo, but I am not
sure that this will be clear either to a human reader or to the machine.
And if you think that's clear enough, what aboutSELECT a, foo.nextval, foo.min_value FROM bar;
which surely *must* cause a true join to be generated, since min_value
is a perfectly ordinary field of foo?So now I'm worried that making the sequence object visible as a table
identifier will cause strange misbehaviors, or at least great confusion.
This needs careful thought before we can accept it.I didn't think about these complications at all (thought that my small
patch would just add a little more compatibility with a minimum of fuss,
but I was wrong). Let me investigate whether I can come up with a better
solution.Cheers,
Jeroen
************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 00:54:03 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA49869
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 00:53:37 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.3.138]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Thu, 16 Dec 1999 23:45:14 -0600
Sender: ed
Message-ID: <3859D01C.87148C0A@austin.rr.com>
Date: Thu, 16 Dec 1999 23:54:36 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Lamar Owen <lamar.owen@wgcr.org>
CC: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgresql.org,
jbj@redhat.com, gafton@redhat.com, tgl@sss.pgh.pa.us
Subject: Re: [HACKERS] ordering RH6.1
References: <16598.945214137@sss.pgh.pa.us> <385981DF.9762BFC8@wgcr.org>
<99121621013601.00845@lorc.wgcr.org>
<99121622571804.00845@lorc.wgcr.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lamar Owen wrote:
More information: it seems that the i18n support is the cause of this. If you
remove or rename the file /etc/sysconfig/i18n and restart, then even the fresh
RedHat 6.1 install provides the correct results for this query. This file, I
think, is created during a fresh installation of RH 6.1 -- it doesn't seem to
belong to any RPM. An upgrade wouldn't create this file..... (Jeff? Cristian?
am I right on this?)
Still more data...
After renaming the file /etc/sysconfig/i18n and rebooting, the perl module
Date::Manip timezone lookup failure described previously has ceased.
It seems there may be at least two issues, possibly related. My pgsql regression
tests were fixed by nuking the pgsql-related RPMs, but that didn't fix the
Date::Manip perl module problem. Renaming i18n did. I didn't test the
SELECT query in question prior to making these changes, but that SELECT query does
indeed now return expected results.
Cheers,
Ed Loehr
From bouncefilter Fri Dec 17 01:09:03 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA54112
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 01:08:46 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.3.138]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Fri, 17 Dec 1999 00:00:23 -0600
Sender: ed
Message-ID: <3859D3A9.1BDE936E@austin.rr.com>
Date: Fri, 17 Dec 1999 00:09:45 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Lamar Owen <lamar.owen@wgcr.org>, Frans Van Elsacker <fve@atbib.be>,
pgsql-hackers@postgresql.org, jbj@redhat.com, gafton@redhat.com,
tgl@sss.pgh.pa.us
Subject: Re: [HACKERS] ordering RH6.1
References: <16598.945214137@sss.pgh.pa.us> <385981DF.9762BFC8@wgcr.org>
<99121621013601.00845@lorc.wgcr.org>
<99121622571804.00845@lorc.wgcr.org>
<3859D01C.87148C0A@austin.rr.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
After renaming the file /etc/sysconfig/i18n and rebooting, the perl module
Date::Manip timezone lookup failure described previously has ceased.
I spoke too soon. Timezone problem is not fixed by this as it first appeared.
Cheers,
Ed Loehr
From bouncefilter Fri Dec 17 01:26:04 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA55898
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 01:25:52 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id BAA07413;
Fri, 17 Dec 1999 01:24:43 -0500 (EST)
To: Jeroen van Vianen <jeroen@design.nl>
cc: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small
patches)
In-reply-to: Your message of Fri, 17 Dec 1999 06:23:08 +0100
<4.2.0.58.19991217060920.0096d500@mail.design.nl>
Date: Fri, 17 Dec 1999 01:24:43 -0500
Message-ID: <7410.945411883@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Jeroen van Vianen <jeroen@design.nl> writes:
I'm dubious about the other two patches also. Evidently there is some
variation across platforms in the desirable switches for ctags --- but
diking out the ones not wanted on a particular platform is no answer.
Perhaps the proper fix is to make the ctags flags a configurable
macro...
About ctags: is no one using Linux and ctags on the Postgres sources? Am I
the first one to find this bug?
Apparently you're a little new to the world of portable software.
I don't use ctags myself, being an Emacs man rather than a vi'er,
but a few minutes' research yielded the following results:
GNU ctags (from Emacs 19.34 distribution): -a, -d, -t, -f accepted.
HPUX ctags (which claims to be based on the original UCB code and
compliant to XPG4 standard): -a, -t, but no -d nor -f.
SunOS 4.1: same as HPUX.
RedHat 4.2 Linux: comes with something called "Exuberant Ctags, Version
1.5" which accepts all four (apparently this is NOT the same code as the
GNU distribution).
Whatever Linux you're running: evidently only -a and -f.
I don't know which variant of ctags you're running, but it's definitely
odd man out as far as not accepting -t goes. I'd certainly want to use
-d (index #defines) anywhere it was accepted, too. Other side of the
coin is that -a is the only one of these switches that works on all the
ctags versions I was able to lay my hands on in five minutes plus yours.
That should give you some pause about asserting that if -a -f is the
right incantation for the version you have, then it must be the right
thing for everybody.
Bottom line here is that what we probably really need is a configurable
makefile macro for the ctags switches. (In fact, what I'd personally
like is another macro to determine whether we're using ctags or etags in
the first place ;-).) But short of that, I'd definitely lean towards
the GNU definition as being the most widespread code. I'm pretty
surprised that your Linux distribution (which one is it?) seems to
contain a non-GNU-compatible ctags.
regards, tom lane
From bouncefilter Fri Dec 17 01:39:04 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA59946
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 01:38:23 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id BAA07440;
Fri, 17 Dec 1999 01:37:14 -0500 (EST)
To: Jeroen van Vianen <jeroen@design.nl>
cc: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small
patches)
In-reply-to: Your message of Fri, 17 Dec 1999 06:23:08 +0100
<4.2.0.58.19991217060920.0096d500@mail.design.nl>
Date: Fri, 17 Dec 1999 01:37:13 -0500
Message-ID: <7437.945412633@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Jeroen van Vianen <jeroen@design.nl> writes:
What I was hoping for was something that would *first* determine whether
foo is a sequence and *then* do the transformation only if so.
I thought about this, but couldn't figure out how to test for foo being a
sequence.
IIRC, foo is a sequence if it has relkind 'S'. You can check the
relkind by looking into the struct returned by heap_open. The main
thing that needs to be thought about is how to ensure that the sequence
object won't be added to the query's rangetable list if it is used in
a way that looks like a table reference. It may be that hacking up
ParseFuncOrColumn will be enough to prevent that, or it may not...
regards, tom lane
From bouncefilter Fri Dec 17 03:02:05 1999
Received: from mailhost.iitb.ac.in (mailhost.iitb.ac.in [202.54.44.115])
by hub.org (8.9.3/8.9.3) with SMTP id DAA78345
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 03:01:07 -0500 (EST)
(envelope-from rrahul@cse.iitb.ernet.in)
Received: (qmail 22286 invoked from network); 17 Dec 1999 08:21:44 -0000
Received: from surya.cse.iitb.ernet.in (144.16.111.14)
by mailhost.iitb.ac.in with SMTP; 17 Dec 1999 08:21:44 -0000
Received: from everest.cse.iitb.ernet.in (rrahul@everest [144.16.111.4])
by surya.cse.iitb.ernet.in (8.8.8/8.8.8) with ESMTP id NAA27635
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 13:30:37 +0530 (IST)
Received: (from rrahul@localhost)
by everest.cse.iitb.ernet.in (8.9.2/8.9.2) id NAA08829
for pgsql-hackers@postgresql.org; Fri, 17 Dec 1999 13:30:33 +0530 (IST)
Date: Fri, 17 Dec 1999 13:30:33 +0530
From: Rahul Ravindrudu <rrahul@cse.iitb.ernet.in>
To: pgsql-hackers@postgresql.org
Subject: pointer to a table
Message-ID: <19991217133033.A7672@cse.iitb.ernet.in>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.1i
Hi,
Is there any feature in postgres which gives a pointer to a row
in a table ? I was previously using Illustra as my database as I
needed the object oriented features. Since there is not much support
for Illustra I thought of shifting to Postgresql. But in Illustra
there was the feature of getting a pointer to an object of type
some_type by using the following function
ref (some_type)
Is there any such feature in postgres? Or is there some way i can
get the value of attributes in a row by using just the OID of that
row?
R.Rahul
4th Yr BTech
Computer Science and Engineering
IIT-Bombay
INDIA - 400076
email : rrahul@cse.iitb.ernet.in
From bouncefilter Fri Dec 17 03:06:05 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA79231
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 03:05:07 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.3.138]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Fri, 17 Dec 1999 01:56:46 -0600
Sender: ed
Message-ID: <3859EEF0.BE6E35AF@austin.rr.com>
Date: Fri, 17 Dec 1999 02:06:08 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Matthew Hagerty <matthew@venux.net>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
References: <19762.945301612@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
The postmaster log file, why are the entries not datestamped?
Uncomment #define ELOG_TIMESTAMPS in include/config.h after configure
and before make...
I'm still missing something...
After running ./configure, I modifed ...src/include/config.h to uncomment
this...
#define ELOG_TIMESTAMPS
[I also came back later and tried uncommenting #define USE_SYSLOG and repeating
the process, but to no avail...]
Then I ran make, etc, created the file $PGDATA/pg_options...
% cat $PGDATA/pg_options
verbose=2
query
syslog=2
And restarted the server...and still no timestamps.
I verified most everything syslog-wise (configured in /etc/syslog.conf) is
being sent to /var/log/messages...
Anyone notice what am I missing?
Cheers,
Ed Loehr
[ps - Forgive my spewage...I mistakenly sent this out of context to
pgsql-general as well...]
From bouncefilter Fri Dec 17 04:31:06 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA93069
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 04:29:54 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id KAA189184;
Fri, 17 Dec 1999 10:29:41 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <Y93Q8C69>; Fri, 17 Dec 1999 10:29:41 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1D3@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'Ansley, Michael'" <Michael.Ansley@intec.co.za>,
"''pgsql-hackers@postgreSQL.org ' '" <pgsql-hackers@postgreSQL.org>
Subject: AW: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVING
Date: Fri, 17 Dec 1999 10:29:40 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
Yes, you are right, of course, it doesn't mean that it's incorrect.
However, assuming that Oracle adheres strictly to the
standard (which is a
good, but not infallible, assumption),
Which imho is a bad assumption (take Oracle's outer join syntax e.g.).
it means that we don't. Of course,
we may just extend the standard, but in this particular area,
I'm not sure that it's a good idea,
imho the advantage to have it is big.
because it can be very confusing, and lead to
inadvertent mistakes, which can be very difficult to find.
In what particular way ? Please give an example.
Imho it is bad practice if you call your labels like possible
column names anyway.
Andreas
From bouncefilter Fri Dec 17 04:46:06 1999
Received: from bologna.nettuno.it (bologna.nettuno.it [193.43.2.1])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA97172;
Fri, 17 Dec 1999 04:45:37 -0500 (EST)
(envelope-from jose@sferacarta.com)
Received: from proxy.sferacarta.com (sfcabop1.nettuno.it [193.207.10.213])
by bologna.nettuno.it (8.9.3/8.9.3/NETTuno 4.1) with ESMTP id KAA09117;
Fri, 17 Dec 1999 10:45:33 +0100 (MET)
Received: from rosso.sferacarta.com (sferacarta.com) [10.20.30.5]
by proxy.sferacarta.com with esmtp (Exim 2.05 #1 (Debian))
id 11yulW-00064C-00; Fri, 17 Dec 1999 10:37:38 +0000
Message-ID: <385A04E5.C6169AC5@sferacarta.com>
Date: Fri, 17 Dec 1999 10:39:49 +0100
From: Jose Soares <jose@sferacarta.com>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Eisentraut <peter_e@gmx.net>
CC: general <pgsql-general@postgresql.org>,
hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] \copy problem
References: <Pine.LNX.4.21.9912162038270.5199-100000@localhost.localdomain>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sorry Peter, I don't say you any thing, I'm using psql on win95.
1. I see psql for Linux requires \N only for data fields with null
values other fields (char,int,etc)
doesn't need \N. Why ?
2. psql for M$Windows95 has a different behavior. For example I can't
insert date fields even using \N
I tried to load a file by changing every NULL value of date fields with
\N and it works
on Linux psql, but Win95 psql shows me the following message:
pqReadData() -- read() failed: errno=0
No error
PQendcopy: resetting connection
Copy failed.
Any ideas ?
Peter Eisentraut wrote:
On 1999-12-16, Jose Soares mentioned:
I have a problem using \copy to load data into tables.
I have to load data into a table that contains data type fields with
NULL values.
I tried using \N but it doesn't work.
What can I do to insert a null into a data field?Works for me. I also just messed with that part in the devel sources the
other day and I don't see a reason why it wouldn't. Perhaps you could run
the COPY command instead (and make sure the file is accessible to the
server process) or simply run a COPY FROM STDIN; and enter a few things by
hand and see what you get.the \copy error messages..
What about to have the row number and the error type instead of that...
hygea=> \copy movimentazioni from 4;
pqReadData() -- read() failed: errno=32
Broken pipe
PQendcopy: resetting connection
Copy failed.When the backend sends garbage it cannot possibly send the error
message. The error was that the read from the connection failed. Of course
one could argue why that is ... Hmm.--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden************
From bouncefilter Fri Dec 17 05:50:08 1999
Received: from ra.sai.msu.su ([158.250.29.2])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA11086
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 05:48:42 -0500 (EST) (envelope-from oleg@sai.msu.su)
Received: from ra (ra [158.250.29.2])
by ra.sai.msu.su (8.9.1/8.9.1) with SMTP id NAA29430;
Fri, 17 Dec 1999 13:39:38 +0300 (MSK)
Date: Fri, 17 Dec 1999 13:39:38 +0300 (MSK)
From: Oleg Bartunov <oleg@sai.msu.su>
X-Sender: megera@ra
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Matthew Hagerty <matthew@venux.net>,
pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
In-Reply-To: <3859EEF0.BE6E35AF@austin.rr.com>
Message-ID: <Pine.GSO.3.96.SK.991217133740.9217E-100000@ra>
Organization: Sternberg Astronomical Institute (Moscow University)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
You need only ELOG_TIMESTAMPS defined. syslogd is another story -
I had no luck with it under Linux. Don't forget to make clean and
recompile sources. It should works.
Oleg
On Fri, 17 Dec 1999, Ed Loehr wrote:
Date: Fri, 17 Dec 1999 02:06:08 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Matthew Hagerty <matthew@venux.net>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.Tom Lane wrote:
The postmaster log file, why are the entries not datestamped?
Uncomment #define ELOG_TIMESTAMPS in include/config.h after configure
and before make...I'm still missing something...
After running ./configure, I modifed ...src/include/config.h to uncomment
this...#define ELOG_TIMESTAMPS
[I also came back later and tried uncommenting #define USE_SYSLOG and repeating
the process, but to no avail...]Then I ran make, etc, created the file $PGDATA/pg_options...
% cat $PGDATA/pg_options
verbose=2
query
syslog=2And restarted the server...and still no timestamps.
I verified most everything syslog-wise (configured in /etc/syslog.conf) is
being sent to /var/log/messages...Anyone notice what am I missing?
Cheers,
Ed Loehr[ps - Forgive my spewage...I mistakenly sent this out of context to
pgsql-general as well...]************
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
From bouncefilter Fri Dec 17 06:07:07 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id GAA15432
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 06:06:33 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11yv70-0003kGC; Fri, 17 Dec 99 11:59 MET
Message-Id: <m11yv70-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: LONG varsize - how to go on
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Fri, 17 Dec 1999 11:59:50 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
How I would like to go on:
What I've done so far is to prepare the HeapTuple handling so
it should be possible to reallocate the t_data part from
inside the heap_insert() and heap_update().
Next would be to define how the runtime configuration is to
be stored and configured. So I can get at least the minimum
required system catalog changes made soon. If we leave out
auto-compression for now, a rellongrelid (type Oid default
Invalid) in pg_class, and a attcanlong (type bool default
true) in pg_attribute would do it. This would give space to
enable a single relation for this feature, and then disable
single columns again. New utility commands will finally gain
access to the features. Some scripts will do it during
development, so the feature will not show up - thus beeing
silently unavailable to the user - until we want to ship it.
I think these are the best places to put the configuration
into, because the information would be already available at
no cost inside heap access (rel->rd_rel->rellongrelid and
rel->rd_att...).
What I want to implement for now, is to store extended
VARLENA attributes into a regular (but other relkind)
relation with the Oid key as discussed. That will cause
minimum changes to VACUUM. If storage/retrieval of attributes
is encapsulated right, it could get replaced by something
different at any time in the future when we have enough
experience with this new technique.
Christof Petig and me then could start implementing it, using
lztext with locally disabled compression feature for the
basics. I'll not commit any changes until after feature
freeze of the upcoming release. During the last changes (for
HeapTuple handling) I've seen many places in the code, that
deal themself on VARSIZE/VARDATA with text type attributes,
which then must use textout() instead (what IMHO is better
anyway). So implementing an ALL-varsize move off, instead of
a special LONG datatype, will take longer than February 1st.
This plan means in summary:
1. Full possible configurability with minimum catalog
changes.
2. Hidden without any side effects until we agree to enable
it.
3. Later optimizable storage of extended attributes.
I can't see any reason to way much longer. Can we please have
a consensus to get started?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 09:26:15 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA50090
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 09:25:31 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id PAA22434
for <pgsql-hackers@postgreSQL.org>; Fri, 17 Dec 1999 15:11:22 +0100
Date: Fri, 17 Dec 1999 15:11:22 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: psql vs. gcc
Message-ID: <Pine.LNX.3.96.991217144118.20881B-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
If I compile current source, gcc (2.95.2) return interesting error for
pgsql/describe.c.
gcc command line:
make[1]: Leaving directory /home/PG_DEVEL/pgsql.change/src/interfaces/libpq'
gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall
-Wmissing-prototypes -DMULTIBYTE=LATIN2 -c -o describe.o describe.c
The gcc return error for next lines:
------
strcpy(buf,
"SELECT pg_database.datname as \"Database\",\n"
" pg_user.usename as \"Owner\""
#ifdef MULTIBYTE
",\n pg_database.encoding as \"Encoding\""
#endif
);
-------
If I instead strcpy() write sprintf(buf, ..) all is right.
What is bad, my gcc or previous source code? (IMHO is Peter's code right and
gcc is a little mazy).
Full error dump:
make -C ../../interfaces/libpq libpq.a
make[1]: Entering directory `/home/PG_DEVEL/pgsql.change/src/interfaces/libpq'
make[1]: `libpq.a' is up to date.
make[1]: Leaving directory `/home/PG_DEVEL/pgsql.change/src/interfaces/libpq'
gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -DMULTIBYTE=LATIN2 -c -o describe.o describe.c
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c: In function `listAllDbs':
describe.c:321: undefined or invalid # directive
describe.c:323: undefined or invalid # directive
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `:'
make: *** [describe.o] Error 1
----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------
From bouncefilter Fri Dec 17 09:43:09 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA54963
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 09:42:54 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id PAA22855
for <pgsql-hackers@postgreSQL.org>; Fri, 17 Dec 1999 15:28:42 +0100
Date: Fri, 17 Dec 1999 15:28:42 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: bug in Debian's pgaccess package
Message-ID: <Pine.LNX.3.96.991217151933.22651A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
current Debian potato pgaccess package is bad. The pre-remove script
(in DEBIAN directory) pgaccess.prerm is *empty*, and apt tool return
error for this. In this script must be (leastways) '#!/bin/sh -e'.
Karel
PS. sorry, it is really my last bugreport today :-)
----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------
From bouncefilter Fri Dec 17 09:41:10 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA54658
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 09:40:23 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id OAA10841;
Fri, 17 Dec 1999 14:45:00 GMT
Sender: lockhart@hub.org
Message-ID: <385A4C6C.DEB4EA29@alumni.caltech.edu>
Date: Fri, 17 Dec 1999 14:45:00 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
CC: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] psql vs. gcc
References: <Pine.LNX.3.96.991217144118.20881B-100000@ara.zf.jcu.cz>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
If I compile current source, gcc (2.95.2) return interesting error for
pgsql/describe.c.
The gcc return error for next lines:
strcpy(buf,
"SELECT pg_database.datname as \"Database\",\n"
" pg_user.usename as \"Owner\""
#ifdef MULTIBYTE
",\n pg_database.encoding as \"Encoding\""
#endif
);
I'm sure we would accept a patch that changed this into a
strcpy()
#ifdef MULTIBYTE
strcat()
#endif
sequence rather than this monolithic line.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 17 10:45:10 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA74082
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 10:44:33 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11yzS1-0003kGC; Fri, 17 Dec 99 16:37 MET
Message-Id: <m11yzS1-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: INITDB doesn't create views
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Fri, 17 Dec 1999 16:37:49 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
Peter Eisentraut changed initdb.sh with a patch, applied by
Bruce into revision 1.66. CVS log shows
This is my -- hopefully sufficiently portable -- attempt at cleaning out
initdb. No more obscure dependencies on environment variables or paths.
It
now finds the templates and the right postgres itself (with cmd line
options as fallback). It also no longer depends on $USER (su safe), and
doesn't advertise that --username allows you to install the db as a
different user, since that doesn't work anyway. Also, recovery and
cleanup
on all errors. Consistent options, clearer documentation.
Peter, the backslash escapes to the newlines in CREATE
TABLE/CREATE RULE where there for a good reason. Even if a
shell might accept multiline strings in echo, the interactive
backend interface doesn't.
They are missing in your CREATE VIEW replacements. Now, all
the views (pg_user, ...) aren't created.
Please fix that.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 10:40:11 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA73528
for <hackers@postgresql.org>; Fri, 17 Dec 1999 10:39:34 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:61746 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKZYb202797>; Fri, 17 Dec 1999 16:39:19 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11yzYs-0000Rl-00; Fri, 17 Dec 1999 16:44:54 +0100
Date: Fri, 17 Dec 1999 16:44:54 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Jeroen van Vianen <jeroen@design.nl>
cc: hackers@postgresql.org
Subject: Re: Notation for nextval() (was Re: Several small patches)
In-Reply-To: <4.2.0.58.19991217060920.0096d500@mail.design.nl>
Message-ID: <Pine.LNX.4.21.9912171619390.1139-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-17, Jeroen van Vianen mentioned:
The difference in the copyright notice patch is just extending the 1994 -
1999 to 2000 and aligning the quotes.
I believe that at one point we came to a sort-of conclusion that this
whole deal is (C) UCB until 1995(6?) and (C) PostgreSQL Global Development
Group 1996-present. Don't give intellectual property to people that didn't
do anything.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 17 10:40:11 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA73548
for <hackers@postgresql.org>; Fri, 17 Dec 1999 10:39:54 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:61879 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKZYq210977>; Fri, 17 Dec 1999 16:39:34 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11yzZ8-0000Rv-00; Fri, 17 Dec 1999 16:45:10 +0100
Date: Fri, 17 Dec 1999 16:45:10 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: hackers@postgresql.org
Subject: Shell scripts (Re: [PATCHES] initdb new&improved)
In-Reply-To: <Pine.LNX.3.96.991217113820.7363B-101000@ara.zf.jcu.cz>
Message-ID: <Pine.LNX.4.21.9912171625500.1139-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-17, Karel Zak - Zakkr mentioned:
Note: current postgresql "scripts-system" is small hell, in all scripts is
Hey, I just went through great lengths in writing those ... :)
simular options..etc, all depend on psql and if psql is changed we must
Similar options was one of the points. Do you want different options in
each one? Also, since I just rewrote psql as well, the scripts and psql
are very well tuned, and I think no one plans on changing psql that much
in the next few months that the scripts would be broken.
rewrite all scripts ...etc. (And shell is terrible tool.) What write _one_
But it's a portable tool.
tool (in C) instead current scripts, which load SQL query from prepared
Then you must keep the files around, find them, big mess. (See initdb
change.) Also since they are shell scripts it is transparent to people
what's going on, and that was also the point, since some folks thought
they did some magic, but they really only execute SQL statements.
files? If nobody work on this I can make it.
I don't see the necessity. The scripts have worked for many people many
years.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 17 11:32:11 1999
Received: from mail.enterprise.net (mail.enterprise.net [194.72.192.18])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA85137
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 11:31:43 -0500 (EST) (envelope-from olly@lfix.co.uk)
Received: from linda.lfix.co.uk (root@max02-061.enterprise.net
[194.72.195.181])
by mail.enterprise.net (8.8.5/8.8.5) with ESMTP id QAA29831;
Fri, 17 Dec 1999 16:31:39 GMT
Received: from lfix.co.uk (olly@localhost [127.0.0.1])
by linda.lfix.co.uk (8.9.3/8.9.3/Debian 8.9.3-6) with ESMTP id QAA15150;
Fri, 17 Dec 1999 16:31:30 GMT
Message-Id: <199912171631.QAA15150@linda.lfix.co.uk>
X-Authentication-Warning: linda.lfix.co.uk: Host olly@localhost [127.0.0.1]
claimed to be lfix.co.uk
X-Mailer: exmh version 2.1.1 10/15/1999 (debian)
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>, submit@bugs.debian.org
Subject: Re: [HACKERS] bug in Debian's pgaccess package
In-Reply-To: Message from Karel Zak - Zakkr <zakkr@zf.jcu.cz> of "Fri,
17 Dec 1999 15:28:42 +0100."
<Pine.LNX.3.96.991217151933.22651A-100000@ara.zf.jcu.cz>
References: <Pine.LNX.3.96.991217151933.22651A-100000@ara.zf.jcu.cz>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Fri, 17 Dec 1999 16:31:29 +0000
From: "Oliver Elphick" <olly@lfix.co.uk>
Karel Zak - Zakkr wrote:
current Debian potato pgaccess package is bad. The pre-remove script
(in DEBIAN directory) pgaccess.prerm is *empty*, and apt tool return
error for this. In this script must be (leastways) '#!/bin/sh -e'.
Packaging issues shouldn't go to the hackers list; this should have been
(and now is) a Debian bug-report.
--
Vote against SPAM: http://www.politik-digital.de/spam/
========================================
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"For I say, through the grace given unto me, to every
man that is among you: Do not think of yourself more
highly than you ought, but rather think of yourself
with sober judgement, in accordance with the measure
of faith God has given you." Romans 12:3
From bouncefilter Fri Dec 17 11:49:11 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id LAA87115
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 11:49:09 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11z0PV-0003kGC; Fri, 17 Dec 99 17:39 MET
Message-Id: <m11z0PV-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: psql compile errors
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Fri, 17 Dec 1999 17:39:17 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Peter,
current sources tell
gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -g -c tab-complete.c -o tab-complete.o
tab-complete.c: In function `initialize_readline':
tab-complete.c:100: `rl_filename_quoting_function' undeclared (first use in this function)
tab-complete.c:100: (Each undeclared identifier is reported only once
tab-complete.c:100: for each function it appears in.)
tab-complete.c:102: `rl_filename_quote_characters' undeclared (first use in this function)
tab-complete.c:107: `rl_completion_query_items' undeclared (first use in this function)
tab-complete.c: In function `psql_completion':
tab-complete.c:206: `rl_completion_append_character' undeclared (first use in this function)
tab-complete.c:262: warning: implicit declaration of function `snprintf'
tab-complete.c: In function `quote_file_name':
tab-complete.c:790: `SINGLE_MATCH' undeclared (first use in this function)
tab-complete.c:786: warning: `length' might be used uninitialized in this function
make[2]: *** [tab-complete.o] Error 1
Is it somthing missing here or a source error?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 12:05:11 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id MAA92149
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 12:04:40 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11z0e0-0003kGC; Fri, 17 Dec 99 17:54 MET
Message-Id: <m11z0e0-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Fri, 17 Dec 1999 17:54:16 +0100 (MET)
Cc: emkxp01@mtcc.demon.co.uk, wieck@debis.com, tgl@sss.pgh.pa.us,
hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912161958.OAA22633@candle.pha.pa.us> from "Bruce Momjian" at
Dec 16, 99 02:58:40 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
wieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Has anyone used CVS -D date to backtrack to the date it first started?
It also spit out a "Buffer leak" message once for me today.
Did not appear again. But be warned.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 12:11:12 1999
Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA92907
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 12:10:15 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id RAA11836;
Fri, 17 Dec 1999 17:13:05 GMT
Sender: lockhart@hub.org
Message-ID: <385A6F21.DE60F55B@alumni.caltech.edu>
Date: Fri, 17 Dec 1999 17:13:05 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Peter Eisentraut <peter_e@gmx.net>, Jeroen van Vianen <jeroen@design.nl>
CC: hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small
patches)
References: <Pine.LNX.4.21.9912171619390.1139-100000@localhost.localdomain>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The difference in the copyright notice patch is just extending the 1994 -
1999 to 2000 and aligning the quotes.I believe that at one point we came to a sort-of conclusion that this
whole deal is (C) UCB until 1995(6?) and (C) PostgreSQL Global Development
Group 1996-present. Don't give intellectual property to people that didn't
do anything.
Yes, this is the way we should be annotating Postgres afaik. UCB would
be aghast to find that they need to defend themselves against all of
the changes in the last three years :)
Do we now have things in the code tree which do not carry two
copyrights, or just the Postgres Dev Group copyright plus a reference
to the full text in the docs?
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 17 23:53:19 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA46412
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 23:53:00 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id RAA11857;
Fri, 17 Dec 1999 17:21:57 GMT
Sender: lockhart@hub.org
Message-ID: <385A7135.51ECBBA2@alumni.caltech.edu>
Date: Fri, 17 Dec 1999 17:21:57 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Edwin Ramirez <ramirez@doc.mssm.edu>
CC: Bruce Momjian <pgman@candle.pha.pa.us>,
Postgres Hackers List <hackers@postgreSQL.org>
Subject: Re: [HACKERS] Oracle Compatibility (Translate function)
References: <199912160129.UAA11666@candle.pha.pa.us>
<3858F60E.312E3BA3@doc.mssm.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I have modified the translate function in order to improve its
compatibility with Oracle. It now supports the replacement of
multiple characters and it will also shorten the length of the string
when characters are replaced with nothing.
[Note: The arguments are different from the original translate]
Can this function replace the existing function in the distribution?
afaik yes. Does anyone have a problem with this (it allows
substitution of multiple characters)? I think the system tables will
need to be updated; I'll do this within the next week or so if noone
else has already taken this on.
btw, there is some chance that when we go to native support for
NATIONAL CHARACTER etc then TRANSLATE() will need to become SQL92
compliant (and basically a different function). But that is an issue
for later, and we may be able to solve it without having to give up on
the Oracle version.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 17 12:25:12 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA95157
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 12:25:06 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA08315;
Fri, 17 Dec 1999 12:24:02 -0500 (EST)
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] psql vs. gcc
In-reply-to: Your message of Fri, 17 Dec 1999 15:11:22 +0100 (CET)
<Pine.LNX.3.96.991217144118.20881B-100000@ara.zf.jcu.cz>
Date: Fri, 17 Dec 1999 12:24:01 -0500
Message-ID: <8312.945451441@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Karel Zak - Zakkr <zakkr@zf.jcu.cz> writes:
strcpy(buf,
"SELECT pg_database.datname as \"Database\",\n"
" pg_user.usename as \"Owner\""
#ifdef MULTIBYTE
",\n pg_database.encoding as \"Encoding\""
#endif
);
What is bad, my gcc or previous source code? (IMHO is Peter's code right and
gcc is a little mazy).
After looking at my C reference, I believe gcc is following the ANSI C
spec and Peter's code is broken. According to the book I'm looking at,
concatenation of adjacent string literals is specified to happen while
forming preprocessing tokens, which obviously must occur *before*
preprocessor directives are evaluated. (#if throws away preprocessing
tokens, not raw characters...) So when MULTIBYTE is defined, an
ANSI-compliant compiler will see a syntax error in the above.
describe.c:324: warning: preprocessing directive not recognized within macro arg
Looks like there are a few other problems here too...
regards, tom lane
From bouncefilter Fri Dec 17 12:42:11 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA00109
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 12:41:49 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA16481;
Fri, 17 Dec 1999 12:36:55 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912171736.MAA16481@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <m11yv70-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 17, 1999 11:59:50 am"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 17 Dec 1999 12:36:55 -0500 (EST)
CC: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
How I would like to go on:
What I've done so far is to prepare the HeapTuple handling so
it should be possible to reallocate the t_data part from
inside the heap_insert() and heap_update().
OK, I assume this is so you can change the tuple size on the fly when
inserting the tuple.
Next would be to define how the runtime configuration is to
be stored and configured. So I can get at least the minimum
required system catalog changes made soon. If we leave out
auto-compression for now, a rellongrelid (type Oid default
Invalid) in pg_class, and a attcanlong (type bool default
true) in pg_attribute would do it. This would give space to
enable a single relation for this feature, and then disable
single columns again. New utility commands will finally gain
access to the features. Some scripts will do it during
development, so the feature will not show up - thus beeing
silently unavailable to the user - until we want to ship it.
Got it. You want to store the oid of the long table for the base table
inside the pg_class/Relation structure. Good idea.
I think these are the best places to put the configuration
into, because the information would be already available at
no cost inside heap access (rel->rd_rel->rellongrelid and
rel->rd_att...).
Yes, I recommand a macro so access is clear. See
RelationGetRelationName for an example.
What I want to implement for now, is to store extended
VARLENA attributes into a regular (but other relkind)
relation with the Oid key as discussed. That will cause
minimum changes to VACUUM. If storage/retrieval of attributes
is encapsulated right, it could get replaced by something
different at any time in the future when we have enough
experience with this new technique.
Good. I recommend calling it pg_* so it is automatically excluded from
client table lists.
Christof Petig and me then could start implementing it, using
lztext with locally disabled compression feature for the
I would recommand having compression disabled by default, and enabled by
the user.
basics. I'll not commit any changes until after feature
freeze of the upcoming release. During the last changes (for
HeapTuple handling) I've seen many places in the code, that
deal themself on VARSIZE/VARDATA with text type attributes,
which then must use textout() instead (what IMHO is better
anyway). So implementing an ALL-varsize move off, instead of
a special LONG datatype, will take longer than February 1st.
OK, so we are going to see this after 7.0 is released, which is fine. I
understand the concern about all the accesses to VARDATA() inside the
code. That will clearly be difficult.
This plan means in summary:
1. Full possible configurability with minimum catalog
changes.2. Hidden without any side effects until we agree to enable
it.3. Later optimizable storage of extended attributes.
I can't see any reason to way much longer. Can we please have
a consensus to get started?
Sounds good.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 12:53:12 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id MAA01775
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 12:53:10 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11z1Om-0003kGC; Fri, 17 Dec 99 18:42 MET
Message-Id: <m11z1Om-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small
patches)
To: lockhart@alumni.caltech.edu (Thomas Lockhart)
Date: Fri, 17 Dec 1999 18:42:36 +0100 (MET)
Cc: peter_e@gmx.net, jeroen@design.nl, hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <385A6F21.DE60F55B@alumni.caltech.edu> from "Thomas Lockhart" at
Dec 17, 99 05:13:05 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Thomas Lockhart wrote:
Do we now have things in the code tree which do not carry two
copyrights, or just the Postgres Dev Group copyright plus a reference
to the full text in the docs?
Seen some recently - wait...
backend/optimizer/geqo/... (c) 1990 Darrell L. Whitley
backend/port/inet_aton.* Outch - see below
* This inet_aton() function was taken from the GNU C library and
* incorporated into Postgres for those systems which do not have this
* routine in their standard C libraries.
*
* The function was been extracted whole from the file inet_aton.c in
* Release 5.3.12 of the Linux C library, which is derived from the
* GNU C library, by Bryan Henderson in October 1996. The copyright
* notice from that file is below.
backend/port/snprintf.c (c) 1993 Eric P. Allman
backend/port/dynloader/aix.* (c) 1992 HELIOS Software GmbH
backend/port/dynloader/qnx4.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/isnan.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/rint.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/sem.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/shm.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstrint.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstsem.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstshm.c (c) 1999, repas AEG Automation GmbH
backend/regex/... (c) 1992, 1993, 1994 Henry Spencer.
backend/utils/adt/float.c (c) 1994 by Sun Microsystems, Inc. (line 1510)
backend/utils/adt/geo_ops.c (c) 1995 <by John Franks>
backend/utils/adt/inet_net_ntop.c (c) 1996 by Internet Software Consortium.
backend/utils/adt/inet_net_pton.c (c) 1996 by Internet Software Consortium.
backend/utils/adt/ruleutils.c (c) Jan Wieck :-) - I'll remove that.
backend/utils/mb/big5.c
* conversion between BIG5 and Mule Internal Code(CNS 116643-1992
* plane 1 and plane 2).
* This program is partially copied from lv(Multilingual file viewer)
* and slightly modified. lv is written and copyrighted by NARITA Tomio
* (nrt@web.ad.jp).
That's all I can find that quick.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 12:46:11 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA00608
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 12:45:51 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA17046;
Fri, 17 Dec 1999 12:43:33 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912171743.MAA17046@candle.pha.pa.us>
Subject: Re: [HACKERS] psql vs. gcc
In-Reply-To: <385A4C6C.DEB4EA29@alumni.caltech.edu> from Thomas Lockhart at
"Dec 17, 1999 02:45:00 pm"
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Date: Fri, 17 Dec 1999 12:43:33 -0500 (EST)
CC: Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I accidentally rejected the proper fix for this yesterday because there
was no description about what it was supposed to fix. Let me see if I
can get it now.
If I compile current source, gcc (2.95.2) return interesting error for
pgsql/describe.c.
The gcc return error for next lines:
strcpy(buf,
"SELECT pg_database.datname as \"Database\",\n"
" pg_user.usename as \"Owner\""
#ifdef MULTIBYTE
",\n pg_database.encoding as \"Encoding\""
#endif
);I'm sure we would accept a patch that changed this into a
strcpy()
#ifdef MULTIBYTE
strcat()
#endifsequence rather than this monolithic line.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 12:56:11 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA02158
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 12:55:13 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA17604;
Fri, 17 Dec 1999 12:53:45 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912171753.MAA17604@candle.pha.pa.us>
Subject: Re: [HACKERS] bug in Debian's pgaccess package
In-Reply-To: <199912171631.QAA15150@linda.lfix.co.uk> from Oliver Elphick at
"Dec 17, 1999 04:31:29 pm"
To: Oliver Elphick <olly@lfix.co.uk>
Date: Fri, 17 Dec 1999 12:53:45 -0500 (EST)
CC: Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>, submit@bugs.debian.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Karel Zak - Zakkr wrote:
current Debian potato pgaccess package is bad. The pre-remove script
(in DEBIAN directory) pgaccess.prerm is *empty*, and apt tool return
error for this. In this script must be (leastways) '#!/bin/sh -e'.Packaging issues shouldn't go to the hackers list; this should have been
(and now is) a Debian bug-report.
Debian potato pgaccess -- I don't even want to ask what this is.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 13:08:12 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id NAA07182
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 13:07:43 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11z1dM-0003kGC; Fri, 17 Dec 99 18:57 MET
Message-Id: <m11z1dM-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG varsize - how to go on
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Fri, 17 Dec 1999 18:57:40 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912171736.MAA16481@candle.pha.pa.us> from "Bruce Momjian" at
Dec 17, 99 12:36:55 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
What I want to implement for now, is to store extended
VARLENA attributes into a regular (but other relkind)
relation with the Oid key as discussed. That will cause
minimum changes to VACUUM. If storage/retrieval of attributes
is encapsulated right, it could get replaced by something
different at any time in the future when we have enough
experience with this new technique.Good. I recommend calling it pg_* so it is automatically excluded from
client table lists.
Additionally, exclude them from psql's \dS by looking at the
relkind. And for security reasons, disable regular SELECT for
non-superusers. Also, psql's \d should list the "secondary"
relation name after indices. But that's all stuff far away.
Christof Petig and me then could start implementing it, using
lztext with locally disabled compression feature for theI would recommand having compression disabled by default, and enabled by
the user.
Missed me here. I wanted to abuse lztext during development,
having that only beeing considered for move off at all to get
the in place tuple modification going. Then add all the other
varsize types (there are 12 plus arrays currently) to have
only one source of errors.
OK, so we are going to see this after 7.0 is released, which is fine. I
understand the concern about all the accesses to VARDATA() inside the
code. That will clearly be difficult.
Seems so.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 13:01:11 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA03386
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 13:00:11 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA19524;
Fri, 17 Dec 1999 12:59:14 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912171759.MAA19524@candle.pha.pa.us>
Subject: Re: [HACKERS] psql vs. gcc
In-Reply-To: <Pine.LNX.3.96.991217144118.20881B-100000@ara.zf.jcu.cz> from
Karel Zak - Zakkr at "Dec 17, 1999 03:11:22 pm"
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
Date: Fri, 17 Dec 1999 12:59:14 -0500 (EST)
CC: pgsql-hackers <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
OK, I have applied a patch to use strcat in the case of MULTIBYTE to add
the needed extra line.
Hi,
If I compile current source, gcc (2.95.2) return interesting error for
pgsql/describe.c.gcc command line:
make[1]: Leaving directory /home/PG_DEVEL/pgsql.change/src/interfaces/libpq'
gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall
-Wmissing-prototypes -DMULTIBYTE=LATIN2 -c -o describe.o describe.cThe gcc return error for next lines:
------
strcpy(buf,
"SELECT pg_database.datname as \"Database\",\n"
" pg_user.usename as \"Owner\""
#ifdef MULTIBYTE
",\n pg_database.encoding as \"Encoding\""
#endif
);
-------If I instead strcpy() write sprintf(buf, ..) all is right.
What is bad, my gcc or previous source code? (IMHO is Peter's code right and
gcc is a little mazy).Full error dump:
make -C ../../interfaces/libpq libpq.a
make[1]: Entering directory `/home/PG_DEVEL/pgsql.change/src/interfaces/libpq'
make[1]: `libpq.a' is up to date.
make[1]: Leaving directory `/home/PG_DEVEL/pgsql.change/src/interfaces/libpq'
gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -DMULTIBYTE=LATIN2 -c -o describe.o describe.c
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c:324: warning: preprocessing directive not recognized within macro arg
describe.c: In function `listAllDbs':
describe.c:321: undefined or invalid # directive
describe.c:323: undefined or invalid # directive
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `#'
describe.c:324: parse error before `:'
make: *** [describe.o] Error 1----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 13:12:12 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA08244
for <hackers@postgresql.org>; Fri, 17 Dec 1999 13:11:48 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
NAA20265;
Fri, 17 Dec 1999 13:10:41 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912171810.NAA20265@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small
patches)
In-Reply-To: <m11z1Om-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 17, 1999 06:42:36 pm"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 17 Dec 1999 13:10:41 -0500 (EST)
CC: Thomas Lockhart <lockhart@alumni.caltech.edu>, peter_e@gmx.net,
jeroen@design.nl, hackers@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Well, that's a royal mess. Guess we can remove the code if someone asks
us to? Not much more we can do.
Thomas Lockhart wrote:
Do we now have things in the code tree which do not carry two
copyrights, or just the Postgres Dev Group copyright plus a reference
to the full text in the docs?Seen some recently - wait...
backend/optimizer/geqo/... (c) 1990 Darrell L. Whitley
backend/port/inet_aton.* Outch - see below
* This inet_aton() function was taken from the GNU C library and
* incorporated into Postgres for those systems which do not have this
* routine in their standard C libraries.
*
* The function was been extracted whole from the file inet_aton.c in
* Release 5.3.12 of the Linux C library, which is derived from the
* GNU C library, by Bryan Henderson in October 1996. The copyright
* notice from that file is below.backend/port/snprintf.c (c) 1993 Eric P. Allman
backend/port/dynloader/aix.* (c) 1992 HELIOS Software GmbH
backend/port/dynloader/qnx4.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/isnan.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/rint.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/sem.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/shm.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstrint.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstsem.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstshm.c (c) 1999, repas AEG Automation GmbH
backend/regex/... (c) 1992, 1993, 1994 Henry Spencer.
backend/utils/adt/float.c (c) 1994 by Sun Microsystems, Inc. (line 1510)
backend/utils/adt/geo_ops.c (c) 1995 <by John Franks>
backend/utils/adt/inet_net_ntop.c (c) 1996 by Internet Software Consortium.
backend/utils/adt/inet_net_pton.c (c) 1996 by Internet Software Consortium.
backend/utils/adt/ruleutils.c (c) Jan Wieck :-) - I'll remove that.backend/utils/mb/big5.c
* conversion between BIG5 and Mule Internal Code(CNS 116643-1992
* plane 1 and plane 2).
* This program is partially copied from lv(Multilingual file viewer)
* and slightly modified. lv is written and copyrighted by NARITA Tomio
* (nrt@web.ad.jp).That's all I can find that quick.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 13:13:12 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA08495
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 13:12:57 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
NAA20324;
Fri, 17 Dec 1999 13:12:34 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912171812.NAA20324@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <m11z1dM-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 17, 1999 06:57:40 pm"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 17 Dec 1999 13:12:34 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Christof Petig and me then could start implementing it, using
lztext with locally disabled compression feature for theI would recommand having compression disabled by default, and enabled by
the user.Missed me here. I wanted to abuse lztext during development,
having that only beeing considered for move off at all to get
the in place tuple modification going. Then add all the other
varsize types (there are 12 plus arrays currently) to have
only one source of errors.
Oh, got it. You are going to implement long tuples for only the lztext
type at first. Excellent idea. Did you see someone on the general list
already is asking about long tuples for 7.0? I replied on our current
status.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 14:37:13 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id OAA25959
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 14:36:52 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11z31Q-0003kGC; Fri, 17 Dec 99 20:26 MET
Message-Id: <m11z31Q-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG varsize - how to go on
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Fri, 17 Dec 1999 20:26:36 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912171812.NAA20324@candle.pha.pa.us> from "Bruce Momjian" at
Dec 17, 99 01:12:34 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
Oh, got it. You are going to implement long tuples for only the lztext
type at first. Excellent idea. Did you see someone on the general list
already is asking about long tuples for 7.0? I replied on our current
status.
I've seen several such questions these days. And I fear, if
I'm not able to get at least the required catalog changes
into 7.0, I'd have to wait until after 7.0 freeze + CVS
branch before I can start at all. That'd cost us too much
time.
I know that I can deal with a bunch of deferred patches,
staying in sync with CURRENT and having new features only as
patches. But that worx only as long as I have most catalog
changes in CURRENT. One single concurrent catalog change can
cost me days of work in the worst case otherwise.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 15:39:13 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA37599
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 15:38:59 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
PAA01074;
Fri, 17 Dec 1999 15:37:55 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912172037.PAA01074@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <m11z31Q-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 17, 1999 08:26:36 pm"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 17 Dec 1999 15:37:55 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
Oh, got it. You are going to implement long tuples for only the lztext
type at first. Excellent idea. Did you see someone on the general list
already is asking about long tuples for 7.0? I replied on our current
status.I've seen several such questions these days. And I fear, if
I'm not able to get at least the required catalog changes
into 7.0, I'd have to wait until after 7.0 freeze + CVS
branch before I can start at all. That'd cost us too much
time.I know that I can deal with a bunch of deferred patches,
staying in sync with CURRENT and having new features only as
patches. But that worx only as long as I have most catalog
changes in CURRENT. One single concurrent catalog change can
cost me days of work in the worst case otherwise.
The Feb 1 date is not set in stone. If you would prefer March 1, we can
look at that option.
I pushed for an earlier release because I didn't want to wait for _all_
open items to be completed before a release.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 16:36:14 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id QAA47811
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 16:35:28 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11z4hR-0003kGC; Fri, 17 Dec 99 22:14 MET
Message-Id: <m11z4hR-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG varsize - how to go on
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Fri, 17 Dec 1999 22:14:05 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912172037.PAA01074@candle.pha.pa.us> from "Bruce Momjian" at
Dec 17, 99 03:37:55 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
I know that I can deal with a bunch of deferred patches,
staying in sync with CURRENT and having new features only as
patches. But that worx only as long as I have most catalog
changes in CURRENT. One single concurrent catalog change can
cost me days of work in the worst case otherwise.The Feb 1 date is not set in stone. If you would prefer March 1, we can
look at that option.
Let's see how far I can get it in the next 3-4 weeks. Then it
should have turned out if it's worth to delay the release for
another couple of weeks or not.
Had an Idea just as I wrote the (now deleted) text that
appeared here :-)
The problem I wanted to write about are sections (possible,
even if I don't know about one I haven't written myself :-)
in the code, where a Datum is explicitly or implicitly
casted, to get access to vl_len and vl_dat.
Well, I intend to redefine the varlena struct and rename any
macro that deals with it. This way I'll catch any location in
the code, that does anything with variable size attributes in
a usual way.
We wanted to use the top 2 bits of vl_len for flags, leaving
us a theoretical maximum size of 1GB for one single extended
attribute value. Since I want to leave out the compression
part for now, I could set the compression info bit ALLWAYS.
That would force any part of the code, where the above
casting (abuse) occurs, to immediately CRASH at first hit
(would allocate or access >=1G of memory and I think this is
enough to trigger a crash somewhere). If such a setup passes
BETA, I'll feel comfortable with it.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 17:03:14 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA54115
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 17:02:55 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
RAA04747;
Fri, 17 Dec 1999 17:02:32 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912172202.RAA04747@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <m11z4hR-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 17, 1999 10:14:05 pm"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 17 Dec 1999 17:02:32 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
I know that I can deal with a bunch of deferred patches,
staying in sync with CURRENT and having new features only as
patches. But that worx only as long as I have most catalog
changes in CURRENT. One single concurrent catalog change can
cost me days of work in the worst case otherwise.The Feb 1 date is not set in stone. If you would prefer March 1, we can
look at that option.Let's see how far I can get it in the next 3-4 weeks. Then it
should have turned out if it's worth to delay the release for
another couple of weeks or not.
Yes, let's see how it goes.
Had an Idea just as I wrote the (now deleted) text that
appeared here :-)The problem I wanted to write about are sections (possible,
even if I don't know about one I haven't written myself :-)
in the code, where a Datum is explicitly or implicitly
casted, to get access to vl_len and vl_dat.
You will find only a few files that access vl_len/vl_dat, and the rest
all use macros. mkid or whatever indexing you use on the source tree
will do nicely. The bigger question is going to be handling the VARDATA
entries properly when the relate to system tables. The scope of how
long that data has to exist may be an issue, and textout() may be the
trick in all those cases. The only issue there is pfree'ing the string
once your are done with it.
Well, I intend to redefine the varlena struct and rename any
macro that deals with it. This way I'll catch any location in
the code, that does anything with variable size attributes in
a usual way.
Yes, but again, just using mkid or something else will find all of them
quickly.
Setting the compress bit to catch any unusual cases may be interesting,
though I can't see how any routine could get to the varlena data without
accessing the field name or macros.
We wanted to use the top 2 bits of vl_len for flags, leaving
us a theoretical maximum size of 1GB for one single extended
attribute value. Since I want to leave out the compression
part for now, I could set the compression info bit ALLWAYS.
That would force any part of the code, where the above
casting (abuse) occurs, to immediately CRASH at first hit
(would allocate or access >=1G of memory and I think this is
enough to trigger a crash somewhere). If such a setup passes
BETA, I'll feel comfortable with it.
Yes, makes sense. Good thing user applications will never see our long
pointers. That would be very confusing for them.
I am concerned about your trying to continue development on a snapshot
while we release the 7.0 release. A single pgindent run will mess you
up terribly. I can prevent that, but other work will affect you.
I don't want a release to cause you any additional work. Marc is very
clear on that.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 17:45:15 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA61226
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 17:43:33 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.40.132]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Fri, 17 Dec 1999 16:35:06 -0600
Sender: ed
Message-ID: <385ABCCC.1305ADD0@austin.rr.com>
Date: Fri, 17 Dec 1999 16:44:28 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
References: <23308.945316988@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Does the EXPLAIN output showing the query plan change from when it's
working to when it's not? What would really be helpful is to see the
EXPLAIN VERBOSE output in both states (preferably, the pretty-printed
version that gets put in the postmaster log file, not the compressed
version that gets sent to the client).
Yes, the query plan changes between working state and non-working state.
Vaccum triggers the change. Other things may also, I'm not sure yet. Here
are the failing and successful query plans, respectively...
QUERY PLAN: (failed due to ExecInitIndexScan left/right rel op error)
Aggregate (cost=10.05 rows=1 width=48)
-> Nested Loop (cost=10.05 rows=1 width=48)
-> Nested Loop (cost=8.05 rows=1 width=36)
-> Nested Loop (cost=6.05 rows=1 width=24)
-> Nested Loop (cost=4.05 rows=1 width=16)
-> Index Scan using activity_cid on activity pa (cost=2.05 rows=1 width=8)
-> Index Scan using contract_activity_type_pkey on contract_activity_type cat (cost=2.00 rows=2 width=8)
-> Index Scan using contract_activity_type_exp_pkey on contract_activity_type_expense_ catet (cost=2.00 rows=2 width=8)
-> Index Scan using contract_expense_type_pkey on contract_expense_type cet (cost=2.00 rows=1 width=12)
-> Index Scan using contract_activity_hr_need_pkey on contract_activity_hr_need cahrn (cost=2.00 rows=2 width=12)
VACUUM
QUERY PLAN: (successful query after vacuuming)
Aggregate (cost=9.58 rows=1 width=48)
-> Nested Loop (cost=9.58 rows=1 width=48)
-> Nested Loop (cost=7.58 rows=1 width=36)
-> Nested Loop (cost=5.53 rows=1 width=28)
-> Nested Loop (cost=3.53 rows=1 width=16)
-> Seq Scan on contract_activity_type cat (cost=1.53 rows=1 width=8)
-> Index Scan using contract_activity_type_exp_pkey on contract_activity_type_expense_ catet (cost=2.00 rows=2 width=8)
-> Index Scan using contract_expense_type_pkey on contract_expense_type cet (cost=2.00 rows=1 width=12)
-> Index Scan using activity_cid on activity pa (cost=2.05 rows=1 width=8)
-> Index Scan using contract_activity_hr_need_pkey on contract_activity_hr_need cahrn (cost=2.00 rows=2 width=12)
Other ideas?
Cheers,
Ed Loehr
From bouncefilter Fri Dec 17 17:52:15 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA62034
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 17:51:27 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id RAA16994
for pgsql-hackers@postgreSQL.org; Fri, 17 Dec 1999 17:51:08 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912172251.RAA16994@candle.pha.pa.us>
Subject: psql/sql_help.h
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Fri, 17 Dec 1999 17:51:08 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Where are we on psql/sql_help.h? Is it supposed to be in the
cvs tree, or is it generated as part of the tarball generation?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 18:09:15 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA66570
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 18:09:09 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id SAA11686;
Fri, 17 Dec 1999 18:08:03 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] psql/sql_help.h
In-reply-to: Your message of Fri, 17 Dec 1999 17:51:08 -0500 (EST)
<199912172251.RAA16994@candle.pha.pa.us>
Date: Fri, 17 Dec 1999 18:08:03 -0500
Message-ID: <11683.945472083@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
It's not supposed to be in cvs; it's supposed to be handled just like
gram.c.
If you are wondering why cvs update complains about an unexpected file,
it's cause we need to add a .cvsignore control file to the psql
directory...
regards, tom lane
From bouncefilter Fri Dec 17 18:12:15 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA66926
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 18:12:00 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id SAA11702;
Fri, 17 Dec 1999 18:11:18 -0500 (EST)
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
In-reply-to: Your message of Fri, 17 Dec 1999 16:44:28 -0600
<385ABCCC.1305ADD0@austin.rr.com>
Date: Fri, 17 Dec 1999 18:11:18 -0500
Message-ID: <11699.945472278@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Ed Loehr <ELOEHR@austin.rr.com> writes:
Yes, the query plan changes between working state and non-working state.
Vaccum triggers the change. Other things may also, I'm not sure yet. Here
are the failing and successful query plans, respectively...
Mmmm ... I suspected it had something to do with indexscan on the inner
side of a nestloop (the optimizer has some strange hacks for that).
Looks like I was right. Could I trouble you for the EXPLAIN VERBOSE
output, rather than just EXPLAIN? (Preferably, the pretty-printed form
that gets dumped into the postmaster log, not the unreadable form that
psql shows.)
regards, tom lane
From bouncefilter Fri Dec 17 18:14:15 1999
Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net
[194.217.242.88]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA67288
for <hackers@postgresql.org>; Fri, 17 Dec 1999 18:14:08 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by anchor-post-30.mail.demon.net with esmtp (Exim 2.12 #1)
id 11z6ZW-000KaR-0U; Fri, 17 Dec 1999 23:14:02 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id XAA29053; Fri, 17 Dec 1999 23:13:55 GMT
Message-Id: <199912172313.XAA29053@mtcc.demon.co.uk>
Date: Fri, 17 Dec 1999 23:13:55 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: pgman@candle.pha.pa.us, wieck@debis.com
Cc: tgl@sss.pgh.pa.us, hackers@postgresql.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: eDgB1qtQQYiv1ytD0iGabA==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
wieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
wieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Has anyone used CVS -D date to backtrack to the date it first started?
It also spit out a "Buffer leak" message once for me today.
Did not appear again. But be warned.
Hi,
I reduced the tests to just 2 parallel, varchar and text.
(These 2 did seem to fail regularly)
Here's the results.
=============== Removing old ./tmp_check directory ... ================
=============== Create ./tmp_check directory ================
=============== Installing new build into ./tmp_check ================
=============== Initializing check database instance ================
=============== Starting regression postmaster ================
Regression postmaster is running - PID=28405 PGPORT=65432
=============== Creating regression database... ================
CREATE DATABASE
=============== Installing PL/pgSQL... ================
=============== Running regression queries... ================
parallel group1 (2 tests) ...
text varchar
test varchar ... ok
test text ... FAILED
=============== Terminating regression postmaster ================
ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out
AND regress.out
To run the optional big test(s) too, type 'make bigcheck'
These big tests can take over an hour to complete
These actually are: numeric_big
** So only "text" failed, here's the differences.
bash-2.03$ ./checkresults
====== text ======
0a1,2
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
** Two notices.
bash-2.03$ cat tmp_check/log/postmaster.log
DEBUG: Data Base System is starting up at Fri Dec 17 22:40:10 1999
DEBUG: Data Base System was shutdowned at Fri Dec 17 22:40:09 1999
DEBUG: CheckPoint record at (0, 776)
DEBUG: Redo record at (0, 776); Undo record at (0, 0)
DEBUG: NextTransactionId: 15907; NextOid: 0
DEBUG: Invalid NextTransactionId/NextOid
DEBUG: Data Base System is in production state at Fri Dec 17 22:40:10 1999
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
Smart Shutdown request at Fri Dec 17 22:40:24 1999
DEBUG: Data Base System is shutting down at Fri Dec 17 22:40:24 1999
DEBUG: Data Base System is shutdowned at Fri Dec 17 22:40:24 1999
bash-2.03$
Nothing unusual in the postmaster log. (except the notices)
** Look at the "text.sql" tests though, there's hardly enough
** scope for a couple of lock problems!!
-- *************testing built-in type text ****************
SELECT 'this is a text string'::text = 'this is a text string'::text AS true;
SELECT 'this is a text string'::text = 'this is a text strin'::text AS false;
CREATE TABLE TEXT_TBL (f1 text);
INSERT INTO TEXT_TBL VALUES ('doh!');
INSERT INTO TEXT_TBL VALUES ('hi de ho neighbor');
SELECT '' AS two, * FROM TEXT_TBL;
** Now here's the odd thing, the notices are lines 1 and 2 in the
** results output file, apparently before the backend has done
** any real work.
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
QUERY: SELECT 'this is a text string'::text = 'this is a text string'::text AS t
rue;
true
----
t
(1 row)
** Maybe this is buffering? I don't know.
** I don't think I have the skills to find the problem but hope
** this may give someone a useful lead.
Keith.
From bouncefilter Fri Dec 17 18:19:15 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA68006
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 18:18:40 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id SAA11743
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 18:18:08 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: Mail list archive search busted?
Date: Fri, 17 Dec 1999 18:18:08 -0500
Message-ID: <11740.945472688@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Go to http://www.PostgreSQL.ORG/mhonarc/pgsql-sql/ and try searching.
I got zero hits on "numeric", or "decimal", or "postgres". Something
is definitely wrong with it.
regards, tom lane
From bouncefilter Fri Dec 17 18:35:15 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA73561
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 18:34:30 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11z6jN-0003kKC; Sat, 18 Dec 99 00:24 MET
Message-Id: <m11z6jN-0003kKC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG varsize - how to go on
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sat, 18 Dec 1999 00:24:13 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912172202.RAA04747@candle.pha.pa.us> from "Bruce Momjian" at
Dec 17, 99 05:02:32 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Setting the compress bit to catch any unusual cases may be interesting,
though I can't see how any routine could get to the varlena data without
accessing the field name or macros.
Take a look at NUMERIC or LZTEXT types (both by me and thus I
knew) and you'll know. That's what I meant with implicit
casting.
I am concerned about your trying to continue development on a snapshot
while we release the 7.0 release. A single pgindent run will mess you
up terribly. I can prevent that, but other work will affect you.
Oh - yes! Please don't do a pgindent.
Otherwise it's relatively simple if you know how (screwed up)
I usually work.
First of all, I only use a very limited set of actions while
I'm in my checked out CVS working directory:
cvs update
patch <... (and remove .orig files)
cvs commit
To do a hack, I copy the entire CVS working dir to another
location, configure it and save another copy of the
configured sources into a .orig tree. Then I start hacking,
and if something useful falls out finally, there are two
possible ways depending on the time, the 'hacking' step took:
1. Short (less than 4 hours)
I apply the patch to my CVS working directory and commit
it.
2. Long
I do a 'cvs update', take a copy of it and try to apply
my own patch to that. If it works well down to the
regression test, I can use this patch to apply it to CVS,
otherwise, I need to fix, rediff and start over at 2.
To stay in sync with CURRENT during a long time hack, I just
have to do this:
- Every some days, take a diff of my so far done changes,
- do a 'cvs update',
- take a fresh copy of the CURRENT tree
- and apply my patch onto it.
The last step might show up some rejected hunks, resulting
from conflicting changes by others. Or it might cause other
errors due to conflicts, patch cannot detect. But if doing
these steps frequently enough, the efford to stay in sync
with CURRENT is relatively low.
Someone might think that's a very expensive way of
developing. But over the years, I had good success on long
term hacks with it. And since some folks seem not to agree
with my point of view about using CVS branching for long term
development, it's the only way for me to do it in a similar
way (saving intermediate states of my patches also gives me
the power to start over on an earlier stage).
I assume, some people lost me during the description. But
anyway, I use this for a couple of years now, and it works
fine.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 18:32:15 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA73075
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 18:31:27 -0500 (EST)
(envelope-from Inoue@tpf.co.jp)
Received: from mcadnote1 (ppm146.noc.fukui.nsk.ne.jp [210.161.188.65])
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id IAA00532; Sat, 18 Dec 1999 08:30:19 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Keith Parks" <emkxp01@mtcc.demon.co.uk>, <pgman@candle.pha.pa.us>,
<wieck@debis.com>
Cc: <tgl@sss.pgh.pa.us>, <hackers@postgreSQL.org>
Subject: RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
Date: Sat, 18 Dec 1999 08:30:54 +0900
Message-ID: <NDBBIJLOILGIKBGDINDFEEKFCBAA.Inoue@tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <199912161924.TAA17303@mtcc.demon.co.uk>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Importance: Normal
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Keith Parkswieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Since the new parallel regression tests I've always had a few
lock NOTICE messages like the following.Interesting --- I had not run the parallel test for a while,
but I tried it just now and got half a dozen of these:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Something's been broken fairly recently. Does anyone have an
idea what changed?Good question. I can't imagine what it would be. We didn't do much,
and parallel regression is not that old.Also, I used it after another dozen times without. Now I see
them too. So I assume it was a recent change that introduced
the problem.I'm not sure it's that recent, I think I've had 1 or 2 such errors
ever since I've been running the "runcheck".
It seems that conflicts of the initialization of some backends cause
above NOTICE messages.
Those backends would use the same XIDTAGs for the same relations
in case of LockAcquire()/LockRelease() because xids of those backends
are'nt set before starting the first command. When one of the backend
call LockReleaseAll(),it would release all together.
If we set pid member of XIDTAG to the pid of each backend
,we are able to distinguish XIDTAGs.
But there may be some reasons that the member is used only for
userlock.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Fri Dec 17 18:35:16 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA73607
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 18:34:58 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id SAA11824
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 18:34:25 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: Anyone for prettyprinted EXPLAIN VERBOSE?
Date: Fri, 17 Dec 1999 18:34:25 -0500
Message-ID: <11821.945473665@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
When you do an EXPLAIN VERBOSE, two different representations of the
query plan are produced. The client sees something like this:
regression=> explain verbose select sum(f1) from int4_tbl;
NOTICE: QUERY DUMP:
{ AGG :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname "sum" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { AGGREG :aggname sum :basetype 23 :aggtype 23 :target { VAR :varno 0 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1} :usenulls false }}) :qpqual <> :lefttree { SEQSCAN :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname "<>" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1}}) :qpqual <> :lefttree <> :righttree <> :extprm () :locprm () :initplan <> :nprm 0 :scanrelid 1 } :righttree <> :extprm () :locprm () :initplan <> :nprm 0 }
but in the postmaster log we format it like this:
NOTICE: QUERY PLAN:
Aggregate (cost=1.16 rows=5 width=4)
-> Seq Scan on int4_tbl (cost=1.16 rows=5 width=4)
{ AGG
:cost 1.165
:size 5
:width 4
:state <>
:qptargetlist (
{ TARGETENTRY
:resdom
{ RESDOM
:resno 1
:restype 23
:restypmod -1
:resname "sum"
:reskey 0
:reskeyop 0
:ressortgroupref 0
:resjunk false
}
:expr
{ AGGREG
:aggname sum
:basetype 23
:aggtype 23
:target
{ VAR
:varno 0
:varattno 1
:vartype 23
:vartypmod -1
:varlevelsup 0
:varnoold 1
:varoattno 1
}
:usenulls false
}
}
)
:qpqual <>
:lefttree
{ SEQSCAN
:cost 1.165
:size 5
:width 4
:state <>
:qptargetlist (
{ TARGETENTRY
:resdom
{ RESDOM
:resno 1
:restype 23
:restypmod -1
:resname "<>"
:reskey 0
:reskeyop 0
:ressortgroupref 0
:resjunk false
}
:expr
{ VAR
:varno 1
:varattno 1
:vartype 23
:vartypmod -1
:varlevelsup 0
:varnoold 1
:varoattno 1
}
}
)
:qpqual <>
:lefttree <>
:righttree <>
:extprm ()
:locprm ()
:initplan <>
:nprm 0
:scanrelid 1
}
:righttree <>
:extprm ()
:locprm ()
:initplan <>
:nprm 0
}
Does anyone think that the first form has any conceivable use? I would
like to get rid of it and deliver the prettyprinted format to both log
and client. I think it may have been done this way because old versions
of the backend didn't cope very gracefully with sending long NOTICE
messages to the client, but that constraint is history...
regards, tom lane
From bouncefilter Fri Dec 17 18:48:15 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA75686
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 18:47:36 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11z6w3-0003kKC; Sat, 18 Dec 99 00:37 MET
Message-Id: <m11z6w3-0003kKC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: emkxp01@mtcc.demon.co.uk
Date: Sat, 18 Dec 1999 00:37:19 +0100 (MET)
Cc: pgman@candle.pha.pa.us, wieck@debis.com, tgl@sss.pgh.pa.us,
hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912172313.XAA29053@mtcc.demon.co.uk> from "Keith Parks" at
Dec 17, 99 11:13:55 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
wieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
wieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Has anyone used CVS -D date to backtrack to the date it first started?
It also spit out a "Buffer leak" message once for me today.
Did not appear again. But be warned.Hi,
I reduced the tests to just 2 parallel, varchar and text.
(These 2 did seem to fail regularly)Here's the results.
=============== Removing old ./tmp_check directory ... ================
=============== Create ./tmp_check directory ================
=============== Installing new build into ./tmp_check ================
=============== Initializing check database instance ================
=============== Starting regression postmaster ================
Regression postmaster is running - PID=28405 PGPORT=65432
=============== Creating regression database... ================
CREATE DATABASE
=============== Installing PL/pgSQL... ================
=============== Running regression queries... ================
parallel group1 (2 tests) ...
text varchar
test varchar ... ok
test text ... FAILED
=============== Terminating regression postmaster ================
ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILES run_check.out
AND regress.outTo run the optional big test(s) too, type 'make bigcheck'
These big tests can take over an hour to complete
These actually are: numeric_big** So only "text" failed, here's the differences.
bash-2.03$ ./checkresults
====== text ======
0a1,2NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock** Two notices.
bash-2.03$ cat tmp_check/log/postmaster.log
DEBUG: Data Base System is starting up at Fri Dec 17 22:40:10 1999
DEBUG: Data Base System was shutdowned at Fri Dec 17 22:40:09 1999
DEBUG: CheckPoint record at (0, 776)
DEBUG: Redo record at (0, 776); Undo record at (0, 0)
DEBUG: NextTransactionId: 15907; NextOid: 0
DEBUG: Invalid NextTransactionId/NextOid
DEBUG: Data Base System is in production state at Fri Dec 17 22:40:10 1999
NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
Smart Shutdown request at Fri Dec 17 22:40:24 1999
DEBUG: Data Base System is shutting down at Fri Dec 17 22:40:24 1999
DEBUG: Data Base System is shutdowned at Fri Dec 17 22:40:24 1999
bash-2.03$Nothing unusual in the postmaster log. (except the notices)
** Look at the "text.sql" tests though, there's hardly enough
** scope for a couple of lock problems!!-- *************testing built-in type text ****************
SELECT 'this is a text string'::text = 'this is a text string'::text AS true;
SELECT 'this is a text string'::text = 'this is a text strin'::text AS false;
CREATE TABLE TEXT_TBL (f1 text);
INSERT INTO TEXT_TBL VALUES ('doh!');
INSERT INTO TEXT_TBL VALUES ('hi de ho neighbor');SELECT '' AS two, * FROM TEXT_TBL;
** Now here's the odd thing, the notices are lines 1 and 2 in the
** results output file, apparently before the backend has done
** any real work.NOTICE: LockRelease: locktable lookup failed, no lock
NOTICE: LockRelease: locktable lookup failed, no lock
QUERY: SELECT 'this is a text string'::text = 'this is a text string'::text AS t
rue;
true
----
t
(1 row)** Maybe this is buffering? I don't know.
** I don't think I have the skills to find the problem but hope
** this may give someone a useful lead.Keith.
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 18:42:15 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA74706
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 18:41:14 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id SAA11855;
Fri, 17 Dec 1999 18:39:21 -0500 (EST)
To: "Hiroshi Inoue" <Inoue@tpf.co.jp>
cc: "Keith Parks" <emkxp01@mtcc.demon.co.uk>, pgman@candle.pha.pa.us,
wieck@debis.com, hackers@postgreSQL.org
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
In-reply-to: Your message of Sat, 18 Dec 1999 08:30:54 +0900
<NDBBIJLOILGIKBGDINDFEEKFCBAA.Inoue@tpf.co.jp>
Date: Fri, 17 Dec 1999 18:39:21 -0500
Message-ID: <11852.945473961@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
It seems that conflicts of the initialization of some backends cause
above NOTICE messages.
Those backends would use the same XIDTAGs for the same relations
in case of LockAcquire()/LockRelease() because xids of those backends
are'nt set before starting the first command. When one of the backend
call LockReleaseAll(),it would release all together.
Oooh, that would nicely explain Keith's observation that it seems to
happen at backend startup. I guess we need to select an initial XID
earlier during startup than we now do?
regards, tom lane
From bouncefilter Fri Dec 17 18:52:15 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA76176
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 18:51:46 -0500 (EST)
(envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for hackers@postgreSQL.org
id m11z707-0003kKC; Sat, 18 Dec 99 00:41 MET
Message-Id: <m11z707-0003kKC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: emkxp01@mtcc.demon.co.uk
Date: Sat, 18 Dec 1999 00:41:31 +0100 (MET)
Cc: pgman@candle.pha.pa.us, wieck@debis.com, tgl@sss.pgh.pa.us,
hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912172313.XAA29053@mtcc.demon.co.uk> from "Keith Parks" at
Dec 17, 99 11:13:55 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Keith Parks wrote:
Hi,
I reduced the tests to just 2 parallel, varchar and text.
(These 2 did seem to fail regularly)
That's interesting! So it's something likely to be
reproduceable. Very good.
But anyway - is it an older or a new bug? I'll try to use the
parallel test on a 6.5.* release the next days - maybe it
tells us something more.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 19:33:16 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA85548
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 19:32:22 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA19248;
Fri, 17 Dec 1999 19:28:57 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912180028.TAA19248@candle.pha.pa.us>
Subject: Re: [HACKERS] psql/sql_help.h
In-Reply-To: <11683.945472083@sss.pgh.pa.us> from Tom Lane at "Dec 17,
1999 06:08:03 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 17 Dec 1999 19:28:57 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
It's not supposed to be in cvs; it's supposed to be handled just like
gram.c.If you are wondering why cvs update complains about an unexpected file,
it's cause we need to add a .cvsignore control file to the psql
directory...
That's what I was wondering. Doing it now.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 19:36:16 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA86066
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 19:36:06 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
TAA19425;
Fri, 17 Dec 1999 19:33:20 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912180033.TAA19425@candle.pha.pa.us>
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
In-Reply-To: <11821.945473665@sss.pgh.pa.us> from Tom Lane at "Dec 17,
1999 06:34:25 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 17 Dec 1999 19:33:20 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I remember Jan saying he liked the compressed one.
When you do an EXPLAIN VERBOSE, two different representations of the
query plan are produced. The client sees something like this:regression=> explain verbose select sum(f1) from int4_tbl;
NOTICE: QUERY DUMP:{ AGG :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname "sum" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { AGGREG :aggname sum :basetype 23 :aggtype 23 :target { VAR :varno 0 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1} :usenulls false }}) :qpqual <> :lefttree { SEQSCAN :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname "<>" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1}}) :qpqual <> :lefttree <> :righttree <> :extprm () :locprm () :initplan <> :nprm 0 :scanrelid 1 } :righttree <> :extprm () :locprm () :initplan <> :nprm 0 }
but in the postmaster log we format it like this:
NOTICE: QUERY PLAN:
Aggregate (cost=1.16 rows=5 width=4)
-> Seq Scan on int4_tbl (cost=1.16 rows=5 width=4){ AGG
:cost 1.165
:size 5
:width 4
:state <>
:qptargetlist (
{ TARGETENTRY
:resdom
{ RESDOM
:resno 1
:restype 23
:restypmod -1
:resname "sum"
:reskey 0
:reskeyop 0
:ressortgroupref 0
:resjunk false
}:expr
{ AGGREG
:aggname sum
:basetype 23
:aggtype 23
:target
{ VAR
:varno 0
:varattno 1
:vartype 23
:vartypmod -1
:varlevelsup 0
:varnoold 1
:varoattno 1
}:usenulls false
}
}
):qpqual <>
:lefttree
{ SEQSCAN
:cost 1.165
:size 5
:width 4
:state <>
:qptargetlist (
{ TARGETENTRY
:resdom
{ RESDOM
:resno 1
:restype 23
:restypmod -1
:resname "<>"
:reskey 0
:reskeyop 0
:ressortgroupref 0
:resjunk false
}:expr
{ VAR
:varno 1
:varattno 1
:vartype 23
:vartypmod -1
:varlevelsup 0
:varnoold 1
:varoattno 1
}
}
):qpqual <>
:lefttree <>
:righttree <>
:extprm ():locprm ()
:initplan <>
:nprm 0
:scanrelid 1
}:righttree <>
:extprm ():locprm ()
:initplan <>
:nprm 0
}Does anyone think that the first form has any conceivable use? I would
like to get rid of it and deliver the prettyprinted format to both log
and client. I think it may have been done this way because old versions
of the backend didn't cope very gracefully with sending long NOTICE
messages to the client, but that constraint is history...regards, tom lane
************
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 20:19:16 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id UAA96553
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 20:19:09 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 909 invoked by uid 1001); 18 Dec 1999 01:19:08 -0000
Message-ID: <XFMail.991217201908.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <11740.945472688@sss.pgh.pa.us>
Date: Fri, 17 Dec 1999 20:19:08 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: RE: [HACKERS] Mail list archive search busted?
Cc: pgsql-hackers@postgreSQL.org
On 17-Dec-99 Tom Lane wrote:
Go to http://www.PostgreSQL.ORG/mhonarc/pgsql-sql/ and try searching.
I got zero hits on "numeric", or "decimal", or "postgres". Something
is definitely wrong with it.
You're right. I thought Marc mentioned it here - it was a bit hectic
earlier in the week. We're replacing the search with UdmSearch 'cuze
the one we have is broke. The odd part is sometimes you can wait for
a bit and try again and it'll happily give you results. Imagine my
surprise when I got 0 hits on "scrappy" one time and was bombarded by
results ten minutes later!
Anyway it looks like I have most of the query problems straightened out
and am now working on the last of the config stuff. In the mean time,
I know it's not exactly convenient, you can always go to the directory
on hub and grep. An no, I'm not being a smartass - I had to do it last
week.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Sat Dec 18 01:34:20 1999
Received: from corvette.mascari.com (dhcp26131045.columbus.rr.com
[24.26.131.45]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA67025
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 01:33:32 -0500 (EST)
(envelope-from mascarm@mascari.com)
Received: from mascari.com (ferrari.mascari.com [192.168.2.1])
by corvette.mascari.com (8.8.7/8.8.7) with ESMTP id BAA09143
for <pgsql-hackers@postgresql.org>; Sat, 18 Dec 1999 01:31:46 -0500
Sender: mascarm@mascari.com
Message-ID: <385AE411.CCBBB794@mascari.com>
Date: Fri, 17 Dec 1999 20:32:02 -0500
From: Mike Mascari <mascarm@mascari.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: SPI header dependencies
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
May I humbly suggest a TODO item (or two)?
On the general list a while back someone wanted to implement
a view where the records visible to the client were
dependent upon an application defined user id. I, too, am in
a similar circumstance. However, one solution would be to do
something like this:
SELECT authenticate(<userid>, <password>);
where <userid> and <password> are submitted by the client
application as input from the user. The authenticate()
routine would be a 'C' language routine which would validate
the userid and password by checking some sort of password
table (the database equivalent of shadowed passwords) and
then either set or clear an environmental variable, say,
CLIENTID and returning either 0 or 1. Then, one could have a
view such as:
CREATE VIEW 'mypayroll' AS SELECT * FROM payroll WHERE
employeeid = clientid();
and the clientid() function simply returns the value of the
environmental variable CLIENTID. Of course this would only
be useful for single-connection client applications. The
client application would initially connect to PostgreSQL
using a PostgreSQL userid/password which would only have
SELECT privileges on the 'mypayroll' table.
At any rate. the whole point of this deal is that anyone
wanting to write a 'C' function which needs to access tuples
has to use the SPI interface. And at the moment, that means
they need the source tree to the backend. I wrote Lamar a
note a while back regarding this and he said to check the
dependencies on spi.h. Well, a 'make depend' for spi.c
yielded 86 headers, so if that's any indication, it would
mean a substantial number of additional headers would be
required for properly allowing users with binary
distributions to write SPI code. Quite frankly, I don't
know why spi.h is even being shipped with various packages
at the moment. As a result, no one can use the contrib code
without the backend source, nor can one write 'C' functions
that access tables. So I was wondering if this is something
that might ever be addressed? Of course, the whole issue
disappears if there is ever a PostgreSQL equivalent of a
'setuid' attribute and grant/revoke privileges for
functions....
Just some thoughts...
Mike Mascari
From bouncefilter Fri Dec 17 20:57:18 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id UAA03227
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 20:57:15 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11z8xs-0003kKC; Sat, 18 Dec 99 02:47 MET
Message-Id: <m11z8xs-0003kKC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Sat, 18 Dec 1999 02:47:20 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912180033.TAA19425@candle.pha.pa.us> from "Bruce Momjian" at
Dec 17, 99 07:33:20 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
I remember Jan saying he liked the compressed one.
Change it if you want to.
The reason why I prefer the nodeToString() format is bacause
(even if it might look like garbage to someone) for me it's
the only way to LOOK if the right node went from the parsed
state into the rewritten state. Or if an OLD/NEW got
rewritten correctly into the scan relation's/TLE's one.
That's impossible if having the prettyprint only, because for
non-trivial trees the output occurs hundreds (if not
thousands) of lines later, especially if multi-action rules
or subselects get involved. Not to tell about recursive and
conditional rules getting applied (note that conditional
instead rules put out two trees, one with the negated rule
qual and the original action, one with the original rules
qual and action). To compare in such a case, if anything was
done well, really requires to look at rewriter input AND
output.
I have a scrollback buffer of 2000 lines on my XTerm icon,
and it already happened that I wasn't able to scroll back to
the wanted location WHILE USING COMPRESSED FORMAT ONLY!
But if we get our hands on the parsetree overhaul, I can
insert my own "printf(...nodeToString())" statements into the
places, where I really need to look at. That's usually
another place, than these messages are coming from.
I'm only in doubt about if anyone at all DOES use the pretty
printed version for anything. I assume I'm not too bad in
reading printed parsetrees, but whenever the pretty printed
tree exceeds some hundreds of lines, I'm totally lost and am
unable to find the location I'm looking for (what I easily do
when looking at the compressed format). I allways wondered
why the pretty print was implemented at all.
Who really USES the explanative format to debug things on
non-trivial queries?
Since Tom is asking, I assume at least he's the one who does.
But then again, he must be able to see his target station
expressed in some Expr-, Oper- and Func- nodes while pushing
the buttons to get an underground-ticket. So who else does
like the pretty printed version better for non-esthetical
reasons?
Jan
When you do an EXPLAIN VERBOSE, two different representations of the
query plan are produced. The client sees something like this:regression=> explain verbose select sum(f1) from int4_tbl;
NOTICE: QUERY DUMP:{ AGG :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname "sum" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { AGGREG :aggname sum :basetype 23 :aggtype 23 :target { VAR :varno 0 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1} :usenulls false }}) :qpqual <> :lefttree { SEQSCAN :cost 1.165 :size 5 :width 4 :state <> :qptargetlist ({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 23 :restypmod -1 :resname "<>" :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1}}) :qpqual <> :lefttree <> :righttree <> :extprm () :locprm () :initplan <> :nprm 0 :scanrelid 1 } :righttree <> :extprm () :locprm () :initplan <> :nprm 0 }
but in the postmaster log we format it like this:
NOTICE: QUERY PLAN:
Aggregate (cost=1.16 rows=5 width=4)
-> Seq Scan on int4_tbl (cost=1.16 rows=5 width=4){ AGG
:cost 1.165
:size 5
:width 4
:state <>
:qptargetlist (
{ TARGETENTRY
:resdom
{ RESDOM
:resno 1[...]
:righttree <>
:extprm ():locprm ()
:initplan <>
:nprm 0
}Does anyone think that the first form has any conceivable use? I would
like to get rid of it and deliver the prettyprinted format to both log
and client. I think it may have been done this way because old versions
of the backend didn't cope very gracefully with sending long NOTICE
messages to the client, but that constraint is history...
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Fri Dec 17 20:52:17 1999
Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net
[194.159.73.21]) by hub.org (8.9.3/8.9.3) with ESMTP id UAA02738
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 20:51:33 -0500 (EST)
(envelope-from jeroen@design.nl)
Received: from [212.238.131.55] (helo=manderijn)
by post.mail.nl.demon.net with esmtp (Exim 2.12 #1)
id 11z91W-000Dt0-00
for pgsql-hackers@postgresql.org; Sat, 18 Dec 1999 01:51:06 +0000
Message-Id: <4.2.0.58.19991218024325.00953180@mail.design.nl>
X-Sender: morinel@pop3.demon.nl
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58
Date: Sat, 18 Dec 1999 02:51:25 +0100
To: pgsql-hackers@postgresql.org
From: Jeroen van Vianen <jeroen@design.nl>
Subject: ctags problem
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
At Fri, 17 Dec 1999 01:24 Tom Lane wrote:
About ctags: is no one using Linux and ctags on the Postgres sources? Am I
the first one to find this bug?Apparently you're a little new to the world of portable software.
I don't use ctags myself, being an Emacs man rather than a vi'er,
but a few minutes' research yielded the following results:GNU ctags (from Emacs 19.34 distribution): -a, -d, -t, -f accepted.
HPUX ctags (which claims to be based on the original UCB code and
compliant to XPG4 standard): -a, -t, but no -d nor -f.SunOS 4.1: same as HPUX.
RedHat 4.2 Linux: comes with something called "Exuberant Ctags, Version
1.5" which accepts all four (apparently this is NOT the same code as the
GNU distribution).Whatever Linux you're running: evidently only -a and -f.
I don't know which variant of ctags you're running, but it's definitely
odd man out as far as not accepting -t goes. I'd certainly want to use
- -d (index #defines) anywhere it was accepted, too. Other side of the
coin is that -a is the only one of these switches that works on all the
ctags versions I was able to lay my hands on in five minutes plus yours.
That should give you some pause about asserting that if -a -f is the
right incantation for the version you have, then it must be the right
thing for everybody.
This is the version I'm using
Exuberant Ctags 3.2.2, by Darren Hiebert <darren@hiebert.com>
Usage: ctags [options] [file(s)]
-a Append the tags to an existing tag file.
-B Use backward searching patterns (?...?).
-e Output tag file for use with Emacs.
-f <name>
Output tags to the specified file (default is "tags"; or "TAGS"
if -e is specified). If specified as "-", tags are written to
standard output.
-F Use forward searching patterns (/.../) (default).
-h <list>
Specifies a list of file extensions used for headers.
The default list is ".h.H.hh.hpp.hxx.h++".
-i <types>
Nearly equivalent to --c-types=<types>.
-I <list | file>
A list of tokens to be specially handled is read from either the
command line or the specified file.
-L <file>
A list of source file names are read from the specified file.
If specified as "-", then standard input is read.
-n Equivalent to --excmd=number.
-N Equivalent to --excmd=pattern.
-o Alternative for -f.
-p <path>
Default path to use for all (relative path) filenames.
-R Equivalent to --recurse=yes.
-u Equivalent to --sort=no.
-V Enable verbose messages describing actions on each source file.
-x Print a tabular cross reference file to standard output.
--append=[yes|no]
Indicates whether tags should be appended to existing tag file
(default=no).
--c-types=types
Specifies a list of C/C++ language tag types to include in the
output file. "Types" is a group of one-letter flags designating
types of tags to either include or exclude from the output. Each
letter or group of letters may be preceded by either '+' (default,
if omitted) to add it to those already included, or '-' to exclude
it from the output. In the absence of any preceding '+' or '-'
sign, only those types listed in "types" will be included in the
output. Tags for the following language contructs are supported
(types are enabled by default except as noted):
c classes
d macro definitions
e enumerators (values inside an enumeration)
f function definitions
g enumeration names
m class, struct, and union members
n namespaces
p function prototypes [off]
s structure names
t typedefs
u union names
v variable definitions
x external variable declarations [off]
In addition, the following modifiers are accepted:
A record the access of members into the tag file [off]
C include extra, class-qualified tag entries for members [off]
--etags-include=file
Include reference to 'file' in Emacs-style tag file (requires -e).
--excmd=number|pattern|mix
Uses the specified type of EX command to locate tags (default=mix).
--eiffel-types=types
Specifies a list of Eiffel language tag types to be included in the
output. See --c-types for the definition of the format of "types".
Tags for the following Eiffel language contructs are supported
(types are enabled by default except as noted):
c classes
f features
l local entities [off]
--file-scope=[yes|no]
Indicates whether tags scoped only for a single file (e.g. "static"
tags) should be included in the output (default=yes).
--file-tags=[yes|no]
Indicates whether tags should be generated for source file names
(default=no).
--format=level
Forces output of specified tag file format (default=2).
--fortran-types=types
Specifies a list of Fortran language tag types to be included in the
output. See --c-types for the definition of the format of "types".
Tags for the following Fortran language contructs are supported
(all are enabled by default):
b block data
c common blocks
e entry points
f functions
i interfaces
l labels
m modules
m namelists
p programs
s subroutines
t derived types
--help
Prints this option summary.
--if0=[yes|no]
Indicates whether code within #if 0 conditional branches should
be examined for tags (default=no).
--java-types=types
Specifies a list of Java language tag types to be included in the
output. See --c-types for the definition of the format of "types".
Tags for the following Java language contructs are supported (all
are enabled by default):
c classes
f fields
i interfaces
m methods
p packages
In addition, the following modifiers are accepted:
A record the access of fields into the tag file [off]
C include extra, class-qualified tag entries for fields [off]
--kind-long=[yes|no]
Indicates whether verbose tag descriptions are placed into tag file
(default=no).
--lang=[c|c++|eiffel|fortran|java]
Forces specified language, disabling automatic selection.
--langmap=map(s)
Overrides the default mapping of language to source file extension.
--line-directives=[yes|no]
Indicates whether #line directives should be processed (default=no).
--links=[yes|no]
Indicates whether symbolic links should be followed (default=yes).
--recurse=[yes|no]
Recurse into directories supplied on command line (default=no).
--sort=[yes|no]
Indicates whether tags should be sorted (default=yes).
--totals=[yes|no]
Prints statistics about source and tag files (default=no).
--version
Prints a version identifier to standard output.
So, it's strange that my version doesn't have the -d and -t options any
longer (What's -t for?), unlike the 1.5 version in RH4.2.
Bottom line here is that what we probably really need is a configurable
makefile macro for the ctags switches. (In fact, what I'd personally
like is another macro to determine whether we're using ctags or etags in
the first place ;-).) But short of that, I'd definitely lean towards
the GNU definition as being the most widespread code. I'm pretty
surprised that your Linux distribution (which one is it?) seems to
contain a non-GNU-compatible ctags.
I run SuSE 6.2.
Cheers,
Jeroen
From bouncefilter Fri Dec 17 21:00:17 1999
Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net
[194.159.73.21]) by hub.org (8.9.3/8.9.3) with ESMTP id UAA03569
for <pgsql-hackers@postgresql.org>;
Fri, 17 Dec 1999 20:59:23 -0500 (EST)
(envelope-from jeroen@design.nl)
Received: from [212.238.131.55] (helo=manderijn)
by post.mail.nl.demon.net with esmtp (Exim 2.12 #1)
id 11z997-000DvR-00
for pgsql-hackers@postgresql.org; Sat, 18 Dec 1999 01:58:57 +0000
Message-Id: <4.2.0.58.19991218025138.0096c370@mail.design.nl>
X-Sender: morinel@pop3.demon.nl
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58
Date: Sat, 18 Dec 1999 02:59:17 +0100
To: pgsql-hackers@postgresql.org
From: Jeroen van Vianen <jeroen@design.nl>
Subject: SIGSEGV in initdb
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
While updating my local copy to current sources and running initdb I got a
SIGSEGV at bootstrap.c:465 while adding template1 to pg_database.
This is because RelationBuildDesc in relcache.c returns a NULL at line 766.
The comments above this line say:
find the tuple in pg_class corresponding to the given relation id
if no such tuple exists, return NULL
(the relation is pg_database)
There seems to be some kind of error in the order in which the database is
bootstrapped and the system tables are created and filled.
Any ideas?
Cheers,
Jeroen
From bouncefilter Fri Dec 17 21:00:18 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA03621
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 20:59:51 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA22368;
Fri, 17 Dec 1999 20:59:28 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912180159.UAA22368@candle.pha.pa.us>
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
In-Reply-To: <m11z8xs-0003kKC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 18, 1999 02:47:20 am"
To: Jan Wieck <wieck@debis.com>
Date: Fri, 17 Dec 1999 20:59:28 -0500 (EST)
CC: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Who really USES the explanative format to debug things on
non-trivial queries?Since Tom is asking, I assume at least he's the one who does.
But then again, he must be able to see his target station
expressed in some Expr-, Oper- and Func- nodes while pushing
the buttons to get an underground-ticket. So who else does
like the pretty printed version better for non-esthetical
reasons?
I prefer pretty-print. I view it in the server log files, and go node
by node until I find the problem.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 21:07:17 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA07384
for <hackers@postgreSQL.org>; Fri, 17 Dec 1999 21:06:39 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id LAA12059;
Sat, 18 Dec 1999 11:06:35 +0900 (JST)
Received: from localhost (IDENT:t-ishii@portsv3-15 [133.137.84.15])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id LAA22318;
Sat, 18 Dec 1999 11:06:30 +0900
To: pgman@candle.pha.pa.us
Cc: wieck@debis.com, lockhart@alumni.caltech.edu, peter_e@gmx.net,
jeroen@design.nl, hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small
patches)
In-Reply-To: <199912171810.NAA20265@candle.pha.pa.us>
References: <m11z1Om-0003kGC@orion.SAPserv.Hamburg.dsh.de>
<199912171810.NAA20265@candle.pha.pa.us>
X-Mailer: Mew version 1.94 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991218110632P.t-ishii@sra.co.jp>
Date: Sat, 18 Dec 1999 11:06:32 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 990905(IM130)
Lines: 107
Well, that's a royal mess. Guess we can remove the code if someone asks
us to? Not much more we can do.
I think the issue is the license term, not the copyright. In my
opinion, we could live with copyrights other than ours as long as
their licenses are as free as the PostgreSQL license.
Thomas Lockhart wrote:
Do we now have things in the code tree which do not carry two
copyrights, or just the Postgres Dev Group copyright plus a reference
to the full text in the docs?Seen some recently - wait...
backend/optimizer/geqo/... (c) 1990 Darrell L. Whitley
From the source code:
Permission is hereby granted to copy all or any part of
this program for free distribution. The author's name
and this copyright notice must be included in any copy.
This looks safe for me.
backend/port/inet_aton.* Outch - see below
* This inet_aton() function was taken from the GNU C library and
* incorporated into Postgres for those systems which do not have this
* routine in their standard C libraries.
Seems bad for us, since they are GPL'd...
backend/port/snprintf.c (c) 1993 Eric P. Allman
Looks good. Its licence is BSD.
backend/port/dynloader/aix.* (c) 1992 HELIOS Software GmbH
/*
* @(#)dlfcn.c 1.7 revision of 95/08/14 19:08:38
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
* 30159 Hannover, Germany
*/
Not sure about above.
backend/port/dynloader/qnx4.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/isnan.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/rint.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/sem.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/shm.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstrint.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstsem.c (c) 1999, repas AEG Automation GmbH
backend/port/qnx4/tstshm.c (c) 1999, repas AEG Automation GmbH
Nothing is mentioned about the license. We could ask the author about
it.
backend/regex/... (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Henry Spencer.
Seems ok for me.
backend/utils/adt/float.c (c) 1994 by Sun Microsystems, Inc. (line 1510)
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
Also good.
backend/utils/adt/geo_ops.c (c) 1995 <by John Franks>
* (code offered for use by J. Franks in Linux Journal letter.)
This indicates it's safe?
backend/utils/adt/inet_net_ntop.c (c) 1996 by Internet Software Consortium.
backend/utils/adt/inet_net_pton.c (c) 1996 by Internet Software Consortium.
License term seems ok for us.
backend/utils/adt/ruleutils.c (c) Jan Wieck :-) - I'll remove that.
I think he could leave his copyright, but it is up to him...
backend/utils/mb/big5.c
* conversion between BIG5 and Mule Internal Code(CNS 116643-1992
* plane 1 and plane 2).
* This program is partially copied from lv(Multilingual file viewer)
* and slightly modified. lv is written and copyrighted by NARITA Tomio
* (nrt@web.ad.jp).
I contacted the author when I borrowed his code. At that time its
license seemed to be sort of "public domain." But today I found on his
web page (http://www.ff.iij4u.or.jp/~nrt/lv/) that he seems changed
the license to GPL2. This is bad news for me, so I have written to him
about it and am waiting for his reply...
--
Tatsuo Ishii
From bouncefilter Fri Dec 17 21:42:17 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA19098
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 21:42:12 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA29530;
Fri, 17 Dec 1999 21:41:22 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912180241.VAA29530@candle.pha.pa.us>
Subject: Re: [HACKERS] SIGSEGV in initdb
In-Reply-To: <4.2.0.58.19991218025138.0096c370@mail.design.nl> from Jeroen van
Vianen at "Dec 18, 1999 02:59:17 am"
To: Jeroen van Vianen <jeroen@design.nl>
Date: Fri, 17 Dec 1999 21:41:22 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
While updating my local copy to current sources and running initdb I got a
SIGSEGV at bootstrap.c:465 while adding template1 to pg_database.This is because RelationBuildDesc in relcache.c returns a NULL at line 766.
The comments above this line say:find the tuple in pg_class corresponding to the given relation id
if no such tuple exists, return NULL(the relation is pg_database)
There seems to be some kind of error in the order in which the database is
bootstrapped and the system tables are created and filled.
Yes, initdb is totally messed up right now. Peter, please...
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 21:43:18 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA19165
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 21:42:45 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA29550;
Fri, 17 Dec 1999 21:42:24 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912180242.VAA29550@candle.pha.pa.us>
Subject: initdb messed up
In-Reply-To: <Pine.GSO.4.02A.9911251323160.16412-100000@Panter.DoCS.UU.SE>
from
Peter Eisentraut at "Nov 25, 1999 02:08:41 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 17 Dec 1999 21:42:24 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
We have some major initdb breakage from recent initdb patches. I am
going to try and clean it up as best I can, but we will need Peter
involved in fixing this in a portable way.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 21:57:18 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA21123
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 21:57:02 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA01189;
Fri, 17 Dec 1999 21:56:42 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912180256.VAA01189@candle.pha.pa.us>
Subject: Re: [HACKERS] initdb messed up
In-Reply-To: <199912180242.VAA29550@candle.pha.pa.us> from Bruce Momjian at
"Dec 17, 1999 09:42:24 pm"
To: Bruce Momjian <pgman@candle.pha.pa.us>
Date: Fri, 17 Dec 1999 21:56:42 -0500 (EST)
CC: Peter Eisentraut <peter_e@gmx.net>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
We have some major initdb breakage from recent initdb patches. I am
going to try and clean it up as best I can, but we will need Peter
involved in fixing this in a portable way.
With my cleanups, I now get. At least it runs now:
---------------------------------------------------------------------------
This database system will be initialized with username "postgres".
This user will own all the data files and must also own the server process.
trap: Illegal number: SIGINT
Creating database system directory /u/pg/data
Creating database system directory /u/pg/data/base
Creating database XLOG directory /u/pg/data/pg_xlog
Creating template database in /u/pg/data/base/template1
ERROR: pg_atoi: error in "f": can't parse "f"
ERROR: pg_atoi: error in "f": can't parse "f"
Creating global relations in /u/pg/data/base
ERROR: pg_atoi: error in "t": can't parse "t"
ERROR: pg_atoi: error in "t": can't parse "t"
Adding template1 database to pg_database
TRAP: Failed Assertion("!(reldesc):", File: "bootstrap.c", Line: 464)
!(reldesc) (0) [No such file or directory]
Abort trap
initdb failed.
Removing /u/pg/data.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 17 22:45:18 1999
Received: from eclipse.pacifier.com (eclipse.pacifier.com [199.2.117.78])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA32133
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 22:44:31 -0500 (EST)
(envelope-from dhogaza@pacifier.com)
Received: from desktop (dsl-dhogaza.pacifier.net [216.65.147.68])
by eclipse.pacifier.com (8.9.3/8.9.3pop) with SMTP id TAA17179;
Fri, 17 Dec 1999 19:43:03 -0800 (PST)
Message-Id: <3.0.1.32.19991217193940.00ee7200@mail.pacifier.com>
X-Sender: dhogaza@mail.pacifier.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Fri, 17 Dec 1999 19:39:40 -0800
To: wieck@debis.com (Jan Wieck), pgman@candle.pha.pa.us (Bruce Momjian)
From: Don Baccus <dhogaza@pacifier.com>
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
Cc: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
In-Reply-To: <m11z8xs-0003kKC@orion.SAPserv.Hamburg.dsh.de>
References: <199912180033.TAA19425@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 02:47 AM 12/18/99 +0100, Jan Wieck wrote:
Since Tom is asking, I assume at least he's the one who does.
But then again, he must be able to see his target station
expressed in some Expr-, Oper- and Func- nodes while pushing
the buttons to get an underground-ticket. So who else does
like the pretty printed version better for non-esthetical
reasons?
Well, it's a lot more readable for newcomers who are interested in
learning how their queries are being turned into plans. Such newcomers
might become helpful people as time goes on and as they have time in
their life to become contributors...
It probably wouldn't be that hard to add a "jan" command that would
do a non-pretty-printed explain verbose for those who want it, would
it?
As far as X limitations on storing lines, for debugging clearly you
want to be able to dump stuff into files regardless of pretty or
"ugly" formatting...it wouldn't be difficult to modify psql to dump
explanations into a file directly, would it?
Dumping thousands of lines of either ugly or pretty plan dumps onto
a terminal is ... well ... terminal. You shouldn't have to do that.
- Don Baccus, Portland OR <dhogaza@pacifier.com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.
From bouncefilter Fri Dec 17 23:07:18 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA38464
for <pgsql-hackers@postgreSQL.org>;
Fri, 17 Dec 1999 23:07:01 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA07685;
Fri, 17 Dec 1999 23:06:39 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912180406.XAA07685@candle.pha.pa.us>
Subject: initdb.sh fixed
In-Reply-To: <Pine.GSO.4.02A.9911301910030.13278-100000@Vessla.DoCS.UU.SE>
from
Peter Eisentraut at "Nov 30, 1999 09:19:54 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 17 Dec 1999 23:06:39 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
OK, initdb should now work. There were a variety of non-portable things
in initdb.sh, like assuming $EUID is defined, and other shell script and
command args that do not exist on BSDI.
I think I got them all. If anyone sees problems, let me know. This is
not really Peter's fault. It takes a long time to know what is
portable and what is not portable.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 18 00:32:19 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA55700
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 00:31:31 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA00514;
Sat, 18 Dec 1999 00:30:04 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgman@candle.pha.pa.us (Bruce Momjian), pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
In-reply-to: Your message of Sat, 18 Dec 1999 02:47:20 +0100 (MET)
<m11z8xs-0003kKC@orion.SAPserv.Hamburg.dsh.de>
Date: Sat, 18 Dec 1999 00:30:04 -0500
Message-ID: <511.945495004@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
I'm only in doubt about if anyone at all DOES use the pretty
printed version for anything. I assume I'm not too bad in
reading printed parsetrees, but whenever the pretty printed
tree exceeds some hundreds of lines, I'm totally lost and am
unable to find the location I'm looking for (what I easily do
when looking at the compressed format). I allways wondered
why the pretty print was implemented at all.
To each his own poison, I guess. Reverse the above one hundred eighty
degrees, and it's my opinions ;-). But if you like the compressed
layout better, sure, we can keep supporting it. How about we implement
a SET VARIABLE control to select compact or pretty-printed mode, but
still send the same format to both postmaster log and client? My main
gripe is there's no way at present to see the pretty-printed mode
without going to the postmaster log, which might not be readily
available to ordinary users.
(Actually, it's not clear to me why the postmaster log should get
these entries at all; for the most part it's just waste of log
space to send EXPLAIN outputs to the log...)
So who else does like the pretty printed version better for
non-esthetical reasons?
Uh, esthetics is everything in this case, isn't it? Either you
find the format pleasing/readable, or not.
regards, tom lane
From bouncefilter Sat Dec 18 01:00:20 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA57926
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 00:59:26 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA00595;
Sat, 18 Dec 1999 00:58:53 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Subject: Re: [HACKERS] LONG varsize - how to go on
In-reply-to: Your message of Fri, 17 Dec 1999 11:59:50 +0100 (MET)
<m11yv70-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Date: Sat, 18 Dec 1999 00:58:53 -0500
Message-ID: <590.945496733@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Christof Petig and me then could start implementing it, using
lztext with locally disabled compression feature for the
basics. I'll not commit any changes until after feature
freeze of the upcoming release. During the last changes (for
HeapTuple handling) I've seen many places in the code, that
deal themself on VARSIZE/VARDATA with text type attributes,
which then must use textout() instead (what IMHO is better
anyway). So implementing an ALL-varsize move off, instead of
a special LONG datatype, will take longer than February 1st.
OK, I feel a lot better about planning this for next release instead
of the Feb-1 release.
It seems like what we ought to be doing in the near term is finishing
up the loose ends that remain with table locking, cache invalidation,
etc. The recently reported "LockRelease" errors seem to fall into
that category as well. Anyway, my point is we ought to go full steam
ahead into cleanup-and-make-ready-for-release mode. Dare I suggest
that we should declare feature freeze *now*, and concentrate on bug
fixes only for the next six weeks? If not, what features are on the
near horizon?
If Bruce wants to run pgindent before the Feb release, maybe the easiest
answer is to do it now (in the next few days) and then Jan can start
working on his new stuff without worrying about it.
regards, tom lane
From bouncefilter Sat Dec 18 01:08:20 1999
Received: from anchor-post-33.mail.demon.net (anchor-post-33.mail.demon.net
[194.217.242.91]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA61601
for <hackers@postgresql.org>; Sat, 18 Dec 1999 01:07:38 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by anchor-post-33.mail.demon.net with esmtp (Exim 2.12 #1)
id 11zD1l-000NQ9-0X; Sat, 18 Dec 1999 06:07:37 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id GAA07332; Sat, 18 Dec 1999 06:07:31 GMT
Message-Id: <199912180607.GAA07332@mtcc.demon.co.uk>
Date: Sat, 18 Dec 1999 06:07:31 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: pgman@candle.pha.pa.us, wieck@debis.com, Inoue@tpf.co.jp
Cc: tgl@sss.pgh.pa.us, hackers@postgresql.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: zq363rz/4SNwW2vSTvnfrQ==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
"Hiroshi Inoue" <Inoue@tpf.co.jp>
wieck@debis.com (Jan Wieck)
Bruce Momjian wrote:
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
Since the new parallel regression tests I've always had a few
lock NOTICE messages like the following.Interesting --- I had not run the parallel test for a while,
but I tried it just now and got half a dozen of these:
NOTICE: LockRelease: locktable lookup failed, no lock
(Otherwise the tests all passed.)Something's been broken fairly recently. Does anyone have an
idea what changed?Good question. I can't imagine what it would be. We didn't do much,
and parallel regression is not that old.Also, I used it after another dozen times without. Now I see
them too. So I assume it was a recent change that introduced
the problem.I'm not sure it's that recent, I think I've had 1 or 2 such errors
ever since I've been running the "runcheck".It seems that conflicts of the initialization of some backends cause
above NOTICE messages.
Those backends would use the same XIDTAGs for the same relations
in case of LockAcquire()/LockRelease() because xids of those backends
are'nt set before starting the first command. When one of the backend
call LockReleaseAll(),it would release all together.If we set pid member of XIDTAG to the pid of each backend
,we are able to distinguish XIDTAGs.
But there may be some reasons that the member is used only for
userlock.
I've just run a full set of tests and you're right, all the
NOTICE:'s are in the init phase, before any queries are run.
I hope this makes it easier for someone to fix ;-)
Keith.
From bouncefilter Sat Dec 18 01:15:20 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA62437
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 01:14:22 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
BAA11773;
Sat, 18 Dec 1999 01:13:31 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912180613.BAA11773@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <590.945496733@sss.pgh.pa.us> from Tom Lane at "Dec 18,
1999 00:58:53 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sat, 18 Dec 1999 01:13:31 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
It seems like what we ought to be doing in the near term is finishing
up the loose ends that remain with table locking, cache invalidation,
etc. The recently reported "LockRelease" errors seem to fall into
that category as well. Anyway, my point is we ought to go full steam
ahead into cleanup-and-make-ready-for-release mode. Dare I suggest
that we should declare feature freeze *now*, and concentrate on bug
fixes only for the next six weeks? If not, what features are on the
near horizon?If Bruce wants to run pgindent before the Feb release, maybe the easiest
answer is to do it now (in the next few days) and then Jan can start
working on his new stuff without worrying about it.
I don't need to run pgindent before _every_ release. No problem.
I don't see Jan's work chaning what the rest of us focus on. Let's see
how it goes. I certainly don't have anything planned.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 18 08:01:24 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA44411
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 08:01:11 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64278 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKsK359467>; Sat, 18 Dec 1999 14:00:53 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zJZ6-0000Co-00; Sat, 18 Dec 1999 14:06:28 +0100
Date: Sat, 18 Dec 1999 14:06:28 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Karel Zak - Zakkr <zakkr@zf.jcu.cz>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql vs. gcc
In-Reply-To: <8312.945451441@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.21.9912180303440.1139-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-17, Tom Lane mentioned:
After looking at my C reference, I believe gcc is following the ANSI C
spec and Peter's code is broken. According to the book I'm looking at,
concatenation of adjacent string literals is specified to happen while
forming preprocessing tokens, which obviously must occur *before*
preprocessor directives are evaluated. (#if throws away preprocessing
tokens, not raw characters...) So when MULTIBYTE is defined, an
ANSI-compliant compiler will see a syntax error in the above.
I usually compile all code with both gcc 2.8.1 and egcs 2.91.66 and make
it -Wall -W proof. So I must consider that an omission in those compilers.
Thanks for pointing it out.
describe.c:324: warning: preprocessing directive not recognized within macro arg
Looks like there are a few other problems here too...
The problem sounds more like strcpy is a macro now. Great. More macros.
Just what I need. :)
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 18 08:02:26 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA44477
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 08:01:41 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64351 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKsKK59467>; Sat, 18 Dec 1999 14:01:10 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zJZP-0000Cs-00; Sat, 18 Dec 1999 14:06:47 +0100
Date: Sat, 18 Dec 1999 14:06:47 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Jan Wieck <wieck@debis.com>
cc: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql compile errors
In-Reply-To: <m11z0PV-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.LNX.4.21.9912181327480.356-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-17, Jan Wieck mentioned:
gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -g -c tab-complete.c -o tab-complete.o
tab-complete.c: In function `initialize_readline':
tab-complete.c:100: `rl_filename_quoting_function' undeclared (first use in this function)
tab-complete.c:100: (Each undeclared identifier is reported only once
tab-complete.c:100: for each function it appears in.)
tab-complete.c:102: `rl_filename_quote_characters' undeclared (first use in this function)
tab-complete.c:107: `rl_completion_query_items' undeclared (first use in this function)
tab-complete.c: In function `psql_completion':
tab-complete.c:206: `rl_completion_append_character' undeclared (first use in this function)
If these are indeed all the errors, then I would like to know what version
of readline it is you're using. There is no constant or macro defined for
that AFAICS, so you might have to infer that from a package name or other
sources. Mine goes by the name of 2.2.1. Note that this is not the same as
the version number on the libreadline shared library, where mine says 3.0.
tab-complete.c:262: warning: implicit declaration of function `snprintf'
That looks a little odd, since that prototype is declared in c.h, which is
included in tab-complete.c, conditional on config.h macros, which is also
included in tab-complete.c (before c.h), so maybe a configure problem?
tab-complete.c: In function `quote_file_name':
tab-complete.c:790: `SINGLE_MATCH' undeclared (first use in this function)
tab-complete.c:786: warning: `length' might be used uninitialized in this function
HUH???
[...]
char * quote_file_name(char *text, int match_type, char * quote_pointer)
{
char *s;
size_t length;
(void)quote_pointer; /* not used */
length = strlen(text) + ( match_type==SINGLE_MATCH ? 3 : 2 );
s = xmalloc(length);
[...]
Looks like a brain-dead compiler to me.
make[2]: *** [tab-complete.o] Error 1
All psql code should compile with -Wall -W with precisely this message:
common.c: In function `handle_sigint':
common.c:316: warning: unused parameter `postgres_signal_arg'
Everything else is a problem which will get fixed.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 18 08:02:24 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA44478
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 08:01:42 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:64405 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKsKT98375>; Sat, 18 Dec 1999 14:01:19 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zJZY-0000Cu-00; Sat, 18 Dec 1999 14:06:56 +0100
Date: Sat, 18 Dec 1999 14:06:56 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
In-Reply-To: <199912180033.TAA19425@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.21.9912180241570.1139-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
EXPLAIN VERBOSE COMPRESSED
On 1999-12-17, Bruce Momjian mentioned:
I remember Jan saying he liked the compressed one.
When you do an EXPLAIN VERBOSE, two different representations of the
query plan are produced. The client sees something like this:
Does anyone think that the first form has any conceivable use? I would
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 18 14:02:32 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA14565
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 14:01:35 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:63243 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKv88194645>; Sat, 18 Dec 1999 17:12:58 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zMTn-0000ER-00; Sat, 18 Dec 1999 17:13:11 +0100
Date: Sat, 18 Dec 1999 17:13:11 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Jan Wieck <wieck@debis.com>, Bruce Momjian <pgman@candle.pha.pa.us>,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
In-Reply-To: <511.945495004@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.21.9912181448280.356-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-18, Tom Lane mentioned:
(Actually, it's not clear to me why the postmaster log should get
these entries at all; for the most part it's just waste of log
space to send EXPLAIN outputs to the log...)
Maybe it shouldn't be a notice in the first place?
Actually, something unrelated (must have been the notices popping up in
the regression tests) led me to the idea of redirecting notice output into
the regular query output channel in psql, which would make it subject to
the pager if you have one set up. That would help those complaining about
100s of lines coming down their terminal. On my todo list.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 18 14:02:30 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA14562
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 14:01:33 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62875 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKv6y186448>; Sat, 18 Dec 1999 17:11:42 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zMTt-0000ET-00; Sat, 18 Dec 1999 17:13:17 +0100
Date: Sat, 18 Dec 1999 17:13:17 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <590.945496733@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.21.9912181453250.356-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-18, Tom Lane mentioned:
ahead into cleanup-and-make-ready-for-release mode. Dare I suggest
that we should declare feature freeze *now*, and concentrate on bug
fixes only for the next six weeks? If not, what features are on the
near horizon?
What would be the difference between a feature-freeze and a beta then? I'm
sure every sane developer wouldn't start anything completely new right now
but I for my part still see up to a handful of TODO items that could be
fixed with two nights' work each.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 18 14:02:36 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA14561
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 14:01:33 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62912 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKv5v188500>; Sat, 18 Dec 1999 17:10:35 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zMU4-0000EV-00; Sat, 18 Dec 1999 17:13:28 +0100
Date: Sat, 18 Dec 1999 17:13:28 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: pgindent (Re: [HACKERS] LONG varsize - how to go on)
In-Reply-To: <199912180613.BAA11773@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.21.9912181631110.356-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-18, Bruce Momjian mentioned:
I don't need to run pgindent before _every_ release. No problem.
Is this pgindent thing negotiable at all? IMHO the output of plain indent
-orig looks much nicer (and readable). It also tends to look like the bsd
c-style in emacs. If we could just tell people 'set up {emacs|vi|ed} like
this' (such as c-set-style bsd) there wouldn't be half a dozen different
formats propagating through the source until someone comes around with
pgindent.
Btw., I use GNU indent 2.2.1 which is a long way from the versions
pgindent tries to warn about.
More important than arguing about code formatting, however: Could we lose
this a-tab-looks-like-4-spaces thing, now that Bruce has a new editor(?) ?
In any unprepar{ed|able} viewer (cat/more/less/pico) the code looks like
hell. Maybe we could lose the tab altogether because it's a pain. Just
insert 4 (8, 12, ...) spaces.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 18 14:02:36 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA14560
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 14:01:32 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62541 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sKv4k180309>; Sat, 18 Dec 1999 17:09:20 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zMU9-0000EX-00; Sat, 18 Dec 1999 17:13:33 +0100
Date: Sat, 18 Dec 1999 17:13:33 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: initdb.sh fixed
In-Reply-To: <199912180406.XAA07685@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.21.9912181430440.356-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
People, I thought you would at least test this once before applying it. I
explicitly (maybe not explicitly enough) mentioned it, because writing
complex shell scripts is a nut job. Maybe this thing should really be
written in C. Then there will be no EUID, no echo, no function, no grep,
no whoami, or other problems. Perhaps the whole genbki.sh thing could be
scrapped then, with initdb interpreting the DATA() macros itself. It
would even reduce the overhead of calling postgres about 12 times and
could get it down to 2 or 3. A project for 7.1?
On 1999-12-17, Bruce Momjian mentioned:
OK, initdb should now work. There were a variety of non-portable things
in initdb.sh, like assuming $EUID is defined, and other shell script and
command args that do not exist on BSDI.
Hmm, that $EUID seems to have be the root of all trouble because then the
'insert ( data data data )' bootstrap commands are containing gaps. On the
other hand, this was one of the key things that were supposed to be
improved because relying on $USER was not su-safe. Maybe $UID would work,
since initdb isn't supposed to be setuid anyway.
I think I got them all. If anyone sees problems, let me know. This is
not really Peter's fault. It takes a long time to know what is
portable and what is not portable.
The more time I spend with this the more I think that the only thing
that's portable is echo. Oh wait, that's not portable either. :)
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sat Dec 18 12:22:27 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA94470
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 12:21:53 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA01264;
Sat, 18 Dec 1999 12:20:50 -0500 (EST)
To: Mike Mascari <mascarm@mascari.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] SPI header dependencies
In-reply-to: Your message of Fri, 17 Dec 1999 20:32:02 -0500
<385AE411.CCBBB794@mascari.com>
Date: Sat, 18 Dec 1999 12:20:50 -0500
Message-ID: <1260.945537650@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Mike Mascari <mascarm@mascari.com> writes:
On the general list a while back someone wanted to implement
a view where the records visible to the client were
dependent upon an application defined user id. I, too, am in
a similar circumstance. However, one solution would be to do
something like this:
SELECT authenticate(<userid>, <password>);
where <userid> and <password> are submitted by the client
application as input from the user.
This seems like a completely redundant mechanism to me.
What is wrong with using the *existing* user authentication
mechanisms, and then using getpgusername() or CURRENT_USER
in your queries?
At any rate. the whole point of this deal is that anyone
wanting to write a 'C' function which needs to access tuples
has to use the SPI interface. And at the moment, that means
they need the source tree to the backend.
I can't really see anyone writing SPI functions without access to
a source tree; there's too much stuff that's most readily learned
by looking at the code. But I think you are right that the installed
include tree is probably insufficient to *compile* the average SPI
function, and that's not good. We haven't been paying much attention
to the question of which headers need to be installed. There are
probably some installed that needn't be anymore, as well as vice versa.
Proposed TODO:
* Re-examine list of header files that get installed, add/delete as needed
regards, tom lane
From bouncefilter Sat Dec 18 12:34:27 1999
Received: from atbib.be (IDENT:root@a04-097.antw.online.be [62.112.5.97])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA98647
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 12:33:30 -0500 (EST) (envelope-from fve@atbib.be)
Received: from frans.atbib.be (fransnieuw [193.75.233.10])
by atbib.be (8.9.3/8.9.3) with SMTP id TAA28344;
Sat, 18 Dec 1999 19:33:20 +0100
Message-Id: <3.0.6.32.19991218183441.00889a30@193.75.233.1>
X-Sender: fve@193.75.233.1
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Sat, 18 Dec 1999 18:34:41 +0100
To: pgsql-hackers@postgreSQL.org
From: Frans Van Elsacker <fve@atbib.be>
Subject:
Cc: lamar.owen@wgcr.org
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Hello everyone,
Perhaps I'm a little late in answering your helpfull mail but I've been
very busy, therefore, I'll tell the story from today, saturday 17th of
december.
I first removed RedHat 6.1 and installed 6.0 again. Then I performed an
update to RedHat 6.1 and happily for me everything worked fine!!
Than I removed everything, installed RedHat 6.1 from scratch, and I did
have the same wrong sort order, we knew.
But as you suggested renaming the file /etc/sysconfig/i18n and restarting the
system gave the exact sort order and everything looks fine now.
Still one question: can I be sure this program we rename is of no use
somewhere else
in the system ? If so, just what does it ?!
Second thing, many many thanks to everybody who helped me solving the problem!
Thanks!!
Frans
From bouncefilter Sat Dec 18 12:47:27 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA99906
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 12:47:20 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA01394;
Sat, 18 Dec 1999 12:46:42 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql compile errors
In-reply-to: Your message of Sat, 18 Dec 1999 14:06:47 +0100 (CET)
<Pine.LNX.4.21.9912181327480.356-100000@localhost.localdomain>
Date: Sat, 18 Dec 1999 12:46:42 -0500
Message-ID: <1391.945539202@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
If these are indeed all the errors, then I would like to know what version
of readline it is you're using. There is no constant or macro defined for
that AFAICS, so you might have to infer that from a package name or other
sources. Mine goes by the name of 2.2.1. Note that this is not the same as
the version number on the libreadline shared library, where mine says 3.0.
Hmm. I recall that I used to have an ancient copy of libreadline
(2.something) but awhile ago (between 6.4 and 6.5, I think) someone
changed psql in a way that rendered it incompatible with that version.
Rather than arguing, I just upgraded to the current libreadline 4.0.
Have you restored compatibility with the old readline version? That'd
be nice, I guess, but it's probably more important to be sure psql still
works with the current readline...
tab-complete.c:262: warning: implicit declaration of function `snprintf'
That looks a little odd, since that prototype is declared in c.h, which is
included in tab-complete.c, conditional on config.h macros, which is also
included in tab-complete.c (before c.h), so maybe a configure problem?
I've run into this myself (for vsnprintf not snprintf but I bet the
problem is the same). c.h provides a declaration of these routines if
HAVE_SNPRINTF etc are not set. But the configure script sets
HAVE_SNPRINTF on the basis of a link check that tests whether such
functions actually exist in libc. There are some braindead platforms
that provide library functions but don't offer a declaration for them
anywhere. I see this with vsnprintf on HPUX 10.20, and I'll bet
snprintf is that way on other platforms. What's needed is for configure
to test separately for the existence of the function and whether the
system header files provide a prototype :-(.
tab-complete.c: In function `quote_file_name':
tab-complete.c:790: `SINGLE_MATCH' undeclared (first use in this function)
tab-complete.c:786: warning: `length' might be used uninitialized in this function
HUH???
Yup, Jan's running a different libreadline than you are.
AFAICS there's no compile-time symbol identifying the libreadline
version, which is a dumb choice for a library that keeps adding new API.
Perhaps more configure checks are needed to distinguish which
libreadline we have, or at least to act like readline is not present
at all if it's not at least version X.
regards, tom lane
From bouncefilter Sat Dec 18 13:32:29 1999
Received: from mail.enterprise.net (mail.enterprise.net [194.72.192.18])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA09230
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 13:31:45 -0500 (EST) (envelope-from olly@lfix.co.uk)
Received: from linda.lfix.co.uk (root@max05-049.enterprise.net
[194.72.197.49])
by mail.enterprise.net (8.8.5/8.8.5) with ESMTP id SAA12882;
Sat, 18 Dec 1999 18:31:39 GMT
Received: from lfix.co.uk (olly@localhost [127.0.0.1])
by linda.lfix.co.uk (8.9.3/8.9.3/Debian 8.9.3-6) with ESMTP id SAA26744;
Sat, 18 Dec 1999 18:31:05 GMT
Message-Id: <199912181831.SAA26744@linda.lfix.co.uk>
X-Authentication-Warning: linda.lfix.co.uk: Host olly@localhost [127.0.0.1]
claimed to be lfix.co.uk
X-Mailer: exmh version 2.1.1 10/15/1999 (debian)
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Mike Mascari <mascarm@mascari.com>, pgsql-hackers@postgreSQL.org,
olly@linda.lfix.co.uk
Subject: Re: [HACKERS] SPI header dependencies
In-Reply-To: Message from Tom Lane <tgl@sss.pgh.pa.us>
of "Sat, 18 Dec 1999 12:20:50 EST." <1260.945537650@sss.pgh.pa.us>
References: <1260.945537650@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Sat, 18 Dec 1999 18:31:05 +0000
From: "Oliver Elphick" <olly@lfix.co.uk>
Tom Lane wrote:
Proposed TODO:
* Re-examine list of header files that get installed, add/delete as needed
I attach the list of extra include files that I needed to include in Debian's
postgresql-dev package
access/funcindex.h
access/heapam.h
access/htup.h
access/ibit.h
access/itup.h
access/relscan.h
access/sdir.h
access/skey.h
access/strat.h
access/transam.h
access/tupdesc.h
access/tupmacs.h
access/xact.h
catalog/catname.h
catalog/pg_am.h
catalog/pg_attribute.h
catalog/pg_class.h
catalog/pg_index.h
catalog/pg_language.h
catalog/pg_proc.h
catalog/pg_type.h
executor/execdefs.h
executor/execdesc.h
executor/executor.h
executor/hashjoin.h
executor/tuptable.h
lib/fstack.h
nodes/execnodes.h
nodes/memnodes.h
nodes/nodes.h
nodes/params.h
nodes/parsenodes.h
nodes/pg_list.h
nodes/plannodes.h
nodes/primnodes.h
nodes/relation.h
parser/parse_node.h
parser/parse_type.h
rewrite/prs2lock.h
storage/block.h
storage/buf.h
storage/buf_internals.h
storage/bufmgr.h
storage/bufpage.h
storage/fd.h
storage/ipc.h
storage/item.h
storage/itemid.h
storage/itemptr.h
storage/lmgr.h
storage/lock.h
storage/off.h
storage/page.h
storage/shmem.h
storage/sinvaladt.h
storage/spin.h
tcop/dest.h
tcop/pquery.h
tcop/tcopprot.h
tcop/utility.h
utils/array.h
utils/builtins.h
utils/datetime.h
utils/datum.h
utils/dt.h
utils/fcache.h
utils/hsearch.h
utils/inet.h
utils/int8.h
utils/mcxt.h
utils/memutils.h
utils/nabstime.h
utils/numeric.h
utils/portal.h
utils/rel.h
utils/syscache.h
utils/tqual.h
--
Vote against SPAM: http://www.politik-digital.de/spam/
========================================
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"In the beginning was the Word, and the Word was with
God, and the Word was God. The same was in the
beginning with God. All things were made by him; and
without him was not any thing made that was made."
John 1:1-3
From bouncefilter Sat Dec 18 15:22:29 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA29042
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 15:22:14 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
PAA05716;
Sat, 18 Dec 1999 15:21:07 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912182021.PAA05716@candle.pha.pa.us>
Subject: Re: initdb.sh fixed
In-Reply-To: <Pine.LNX.4.21.9912181430440.356-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 18, 1999 05:13:33 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sat, 18 Dec 1999 15:21:06 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
People, I thought you would at least test this once before applying it. I
explicitly (maybe not explicitly enough) mentioned it, because writing
complex shell scripts is a nut job. Maybe this thing should really be
written in C. Then there will be no EUID, no echo, no function, no grep,
no whoami, or other problems. Perhaps the whole genbki.sh thing could be
scrapped then, with initdb interpreting the DATA() macros itself. It
would even reduce the overhead of calling postgres about 12 times and
could get it down to 2 or 3. A project for 7.1?
I had enough trouble applying the patch, let alone testing it...
Making it in C presents all sorts of portability problems that are even
harder to figure. There is no portability free lunch. I think a script
is the way to go with this.
The big problem seems to be reliance on bash-isms like $UID and
functions with spaces like:
function func () {
}
Only bash knows about that. I have written enough shells scripts to
know that, but it is hard to get that knowledge.
Also, env args without quotes around them is a problem.
All fixed now.
On 1999-12-17, Bruce Momjian mentioned:
OK, initdb should now work. There were a variety of non-portable things
in initdb.sh, like assuming $EUID is defined, and other shell script and
command args that do not exist on BSDI.Hmm, that $EUID seems to have be the root of all trouble because then the
'insert ( data data data )' bootstrap commands are containing gaps. On the
other hand, this was one of the key things that were supposed to be
improved because relying on $USER was not su-safe. Maybe $UID would work,
since initdb isn't supposed to be setuid anyway.
Again, a bash-ism. Let's face, it, the postgres binary is going to
croak on root anyway, so we are just doing an extra check in initdb.
I think I got them all. If anyone sees problems, let me know. This is
not really Peter's fault. It takes a long time to know what is
portable and what is not portable.The more time I spend with this the more I think that the only thing
that's portable is echo. Oh wait, that's not portable either. :)
Don't think so.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 18 15:28:29 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA29570
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 15:27:54 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
PAA05926;
Sat, 18 Dec 1999 15:26:15 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912182026.PAA05926@candle.pha.pa.us>
Subject: Re: [PATCHES] Lock
In-Reply-To: From "(env:" "pgman)" at "Dec 18, 1999 01:28:20 pm"
To: peter_e@gmx.net
Date: Sat, 18 Dec 1999 15:26:15 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
I was looking at this
* Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison
but I'm not sure if my solution is really what was wanted, because it
doesn't actually guarantee an all-or-nothing lock, it just locks each
table in order. Thus it's more like a syntax simplification and reduces
overhead.It took a few minutes, but I remember the use for this. If you are
going to hang waiting to lock tab3, you don't want to lock tab1 and tab2
while you are waiting for tab3 lock. The user wanted all tables to lock
in one operation without holding locks while waiting to complete all
locking.Can you do the locks, and if one fails, not hang, but unlock the
previous tables, go lock/hang on the failure, and go back and lock the
others? Seems it would have to be some kind of lock/fail/unlock/wait
loop.
[CC to hackers]
Let me add to this. One problem is that my description would sometimes
lock the tables in different orders, and that is a recipe for deadlock.
If you have to release earlier locks to wait on a later lock, once you
get the later lock, you must release it and then start from the
beginning, locking them in order again. If you don't, the system could
report a deadlock at random times, which would be very bad.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 18 15:35:31 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA33166
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 15:34:35 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
PAA06240;
Sat, 18 Dec 1999 15:32:36 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912182032.PAA06240@candle.pha.pa.us>
Subject: Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t
In-Reply-To: <Pine.LNX.4.21.9912181631110.356-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 18, 1999 05:13:28 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sat, 18 Dec 1999 15:32:35 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
On 1999-12-18, Bruce Momjian mentioned:
I don't need to run pgindent before _every_ release. No problem.
Is this pgindent thing negotiable at all? IMHO the output of plain indent
-orig looks much nicer (and readable). It also tends to look like the bsd
c-style in emacs. If we could just tell people 'set up {emacs|vi|ed} like
this' (such as c-set-style bsd) there wouldn't be half a dozen different
formats propagating through the source until someone comes around with
pgindent.
I did not decide on this format myself, but several developers said they
prefer this format, and I do too. I am willing to open the discussion
to see what people would prefer.
The current format does match my C style for non-PostgreSQL projects
too.
I remember clear mention that we did not like:
if () {
}
I see you are writing your shell scripts with that, and am not a fan of
it, but it is only a shell script.
Btw., I use GNU indent 2.2.1 which is a long way from the versions
pgindent tries to warn about.
Yes, the message was from when GNU indent had stoppped development in
1994 or so, and they bugs never had been fixed. I have no idea how the
new GNU indent is. I am sure it has fixed some of the older bugs, but I
don't know if they added new bugs.
More important than arguing about code formatting, however: Could we lose
this a-tab-looks-like-4-spaces thing, now that Bruce has a new editor(?) ?
In any unprepar{ed|able} viewer (cat/more/less/pico) the code looks like
hell. Maybe we could lose the tab altogether because it's a pain. Just
insert 4 (8, 12, ...) spaces.
Again, I think everyone liked it at the time, but this may have changed.
Speak up, folks.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 18 16:38:30 1999
Received: from ra.sai.msu.su ([158.250.29.2])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA44064
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 16:37:16 -0500 (EST) (envelope-from oleg@sai.msu.su)
Received: from ra (ra [158.250.29.2])
by ra.sai.msu.su (8.9.1/8.9.1) with SMTP id AAA09795;
Sun, 19 Dec 1999 00:36:28 +0300 (MSK)
Date: Sun, 19 Dec 1999 00:36:28 +0300 (MSK)
From: Oleg Bartunov <oleg@sai.msu.su>
X-Sender: megera@ra
To: Frans Van Elsacker <fve@atbib.be>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Cc: lamar.owen@wgcr.org
In-Reply-To: <3.0.6.32.19991218183441.00889a30@193.75.233.1>
Message-ID: <Pine.GSO.3.96.SK.991219003326.9631A-100000@ra>
Organization: Sternberg Astronomical Institute (Moscow University)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Frans,
I supposed you wrote about postgres with locale support ?
If so, I'd recommend you to test LC_ALL env. variable.
Redhat 6.1 by default set is as en_US, at least in my setup
and I spend 30 minutes to figure out why I had the same problem
you described ( in my case I tried koi8-r ).
When I set LC_ALL=koi8-r everything work fine.
Regards,
Oleg
On Sat, 18 Dec 1999, Frans Van Elsacker wrote:
Date: Sat, 18 Dec 1999 18:34:41 +0100
From: Frans Van Elsacker <fve@atbib.be>
To: pgsql-hackers@postgreSQL.org
Subject: [HACKERS] Cc: lamar.owen@wgcr.orgHello everyone,
Perhaps I'm a little late in answering your helpfull mail but I've been
very busy, therefore, I'll tell the story from today, saturday 17th of
december.I first removed RedHat 6.1 and installed 6.0 again. Then I performed an
update to RedHat 6.1 and happily for me everything worked fine!!Than I removed everything, installed RedHat 6.1 from scratch, and I did
have the same wrong sort order, we knew.
But as you suggested renaming the file /etc/sysconfig/i18n and restarting the
system gave the exact sort order and everything looks fine now.
Still one question: can I be sure this program we rename is of no use
somewhere else
in the system ? If so, just what does it ?!Second thing, many many thanks to everybody who helped me solving the problem!
Thanks!!Frans
************
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
From bouncefilter Sat Dec 18 16:45:30 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id QAA44914
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 16:44:39 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 6423 invoked by uid 1001); 18 Dec 1999 21:44:39 -0000
Message-ID: <XFMail.991218164439.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <199912182032.PAA06240@candle.pha.pa.us>
Date: Sat, 18 Dec 1999 16:44:39 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t
On 18-Dec-99 Bruce Momjian wrote:
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
I remember clear mention that we did not like:
if () {
}
Figures. that's the only method I do like!
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Sat Dec 18 16:59:30 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA46770
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 16:58:46 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id QAA01464;
Sat, 18 Dec 1999 16:57:27 -0500 (EST)
To: Peter Eisentraut <peter_e@gmx.net>
cc: Jan Wieck <wieck@debis.com>, Bruce Momjian <pgman@candle.pha.pa.us>,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
In-reply-to: Your message of Sat, 18 Dec 1999 17:13:11 +0100 (CET)
<Pine.LNX.4.21.9912181448280.356-100000@localhost.localdomain>
Date: Sat, 18 Dec 1999 16:57:27 -0500
Message-ID: <1461.945554247@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Eisentraut <peter_e@gmx.net> writes:
Actually, something unrelated (must have been the notices popping up in
the regression tests) led me to the idea of redirecting notice output into
the regular query output channel in psql, which would make it subject to
the pager if you have one set up. That would help those complaining about
100s of lines coming down their terminal. On my todo list.
This may be a bad idea. There are many people who use psql in shell
scripts, and for them it is critical that non-data messages like NOTICEs
get sent to stderr, *not* mixed in with query results on stdout.
If you can arrange to page stderr output, cool...
regards, tom lane
From bouncefilter Sat Dec 18 17:16:31 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA56232
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 17:15:38 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id RAA01523;
Sat, 18 Dec 1999 17:14:08 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Peter Eisentraut <peter_e@gmx.net>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)
In-reply-to: Your message of Sat, 18 Dec 1999 15:32:35 -0500 (EST)
<199912182032.PAA06240@candle.pha.pa.us>
Date: Sat, 18 Dec 1999 17:14:07 -0500
Message-ID: <1520.945555247@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Again, I think everyone liked it at the time, but this may have changed.
Speak up, folks.
I can live with the code layout conventions we have in place; I like K&R
layout better, but not enough to fight about it. It's easy enough to
set up Emacs to handle the style we have.
What I do *not* like is the tab-stops-are-4-spaces convention. As Peter
says, that makes the code look horrible in any tool that can't easily be
adjusted to a nonstandard tab spacing.
My preference would be to use standard 8-space meaning of tabs, but
stick with our current conventions for visible layout of code (4 columns
per logical indent level, etc). That means people contributing code
would need to use editors that understand the difference between a
physical tab character and a logical indent level. I get the impression
that a number of key developers don't use such editors, so maybe
switching over isn't going to be practical.
regards, tom lane
From bouncefilter Sat Dec 18 18:15:33 1999
Received: from biology.nmsu.edu (biology.NMSU.Edu [128.123.5.72])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA74401
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 18:15:20 -0500 (EST)
(envelope-from brook@biology.nmsu.edu)
Received: (from brook@localhost) by biology.nmsu.edu (8.8.8/8.8.8) id
QAA03433;
Sat, 18 Dec 1999 16:14:50 -0700 (MST)
Date: Sat, 18 Dec 1999 16:14:50 -0700 (MST)
Message-Id: <199912182314.QAA03433@biology.nmsu.edu>
X-Authentication-Warning: biology.nmsu.edu: brook set sender to
brook@biology.nmsu.edu using -f
From: Brook Milligan <brook@biology.nmsu.edu>
To: pgman@candle.pha.pa.us
CC: peter_e@gmx.net, pgsql-hackers@postgreSQL.org
In-reply-to: <199912182026.PAA05926@candle.pha.pa.us> (message from Bruce
Momjian on Sat, 18 Dec 1999 15:26:15 -0500 (EST))
Subject: Re: [HACKERS] Re: [PATCHES] Lock
References: <199912182026.PAA05926@candle.pha.pa.us>
* Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison
Let me add to this. One problem is that my description would sometimes
lock the tables in different orders, and that is a recipe for deadlock.
If you have to release earlier locks to wait on a later lock, once you
get the later lock, you must release it and then start from the
beginning, locking them in order again. If you don't, the system could
report a deadlock at random times, which would be very bad.
I'll add something, too. :) I think this derived from a suggestion I
made long ago. My idea was that when multiple tables need locking, a
deadlock can occur in the process of doing them one at a time. My
suggested solution was based on an analogy with the way ethernet
packets work.
- go through the list locking tables along the way.
- if a lock cannot be obtained within some time, release some (all?) locks,
and try again after some random time.
- keep trying (and releasing as needed) until some other timeout
passes, and then punt.
My thought was that if colliding locks are occuring, some sequence of
relinquishing locks (not necessarily all of them with each trial),
waiting, and reasserting them should work around the collisions.
Introducing random components to this might reduce the overall waiting
time, but I suppose a careful analysis of this needs to be done.
Perhaps just releasing all of the locks, waiting a random time, and
trying again is enough.
Somehow there has to be a mechanism for atomically asserting locks on
more than one table.
Cheers,
Brook
From bouncefilter Sat Dec 18 18:58:32 1999
Received: from corvette.mascari.com (dhcp26131045.columbus.rr.com
[24.26.131.45]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA80850
for <pgsql-hackers@postgresql.org>;
Sat, 18 Dec 1999 18:58:28 -0500 (EST)
(envelope-from mascarm@mascari.com)
Received: from mascari.com (ferrari.mascari.com [192.168.2.1])
by corvette.mascari.com (8.8.7/8.8.7) with ESMTP id SAA10842;
Sat, 18 Dec 1999 18:50:33 -0500
Message-ID: <385C1DE1.404AA37A@mascari.com>
Date: Sat, 18 Dec 1999 18:50:57 -0500
From: Mike Mascari <mascarm@mascari.com>
Organization: Mascari Development Inc
X-Mailer: Mozilla 4.7 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] SPI header dependencies
References: <1260.945537650@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Mike Mascari <mascarm@mascari.com> writes:
SELECT authenticate(<userid>, <password>);
where <userid> and <password> are submitted by the client
application as input from the user.This seems like a completely redundant mechanism to me.
What is wrong with using the *existing* user authentication
mechanisms, and then using getpgusername() or CURRENT_USER
in your queries?
I agree. I imagine the poster's development probably took
the same course as mine - first he was using PostgreSQL as a
backend to a web server, like Apache. He then probably using
Basic authentication with something like mod_auth_pgsql. In
order to authenticate web pages using something like
mod_auth_pgsql, the httpd user (www, nobody, etc.) would
connect to the database and check the user name and
encrypted password submitted against a user-specified table.
Since the only application that is going to be connecting to
PostgreSQL is the webserver, one is tempted (including me)
to create and manage fake webuser id's and passwords, and
only have a single real PostgreSQL user id connect to the
database...particularly when the webuser list numbers in the
thousands. That's why I attributed the LRU file descriptor
exhaustion problem I reported about a month ago to kernel
problems instead of the password authentication leak - 90%
of our users use the web-server. The httpd process runs as a
user id which does not have a shell account, and can only
connect to the database on localhost. This whole scheme
looks good at first, until you find yourself developing
Windows-based clients...You either have to shoe-horn in a
hack (like the above) or bite the bullet and migrate your
core authentication mechanism to PostgreSQL's.
Proposed TODO:
* Re-examine list of header files that get installed, add/delete as neededregards, tom lane
Sounds great. Although hopefully not needed in the next
release :-) , the most annoying thing in the past was the
inability to build a refint.so from the various binary
distributions...
Mike Mascari
From bouncefilter Sat Dec 18 19:07:33 1999
Received: from biology.nmsu.edu (biology.NMSU.Edu [128.123.5.72])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA84700
for <pgsql-hackers@postgreSQL.org>;
Sat, 18 Dec 1999 19:07:32 -0500 (EST)
(envelope-from brook@biology.nmsu.edu)
Received: (from brook@localhost) by biology.nmsu.edu (8.8.8/8.8.8) id
RAA03510;
Sat, 18 Dec 1999 17:07:25 -0700 (MST)
Date: Sat, 18 Dec 1999 17:07:25 -0700 (MST)
Message-Id: <199912190007.RAA03510@biology.nmsu.edu>
X-Authentication-Warning: biology.nmsu.edu: brook set sender to
brook@biology.nmsu.edu using -f
From: Brook Milligan <brook@biology.nmsu.edu>
To: mascarm@mascari.com
CC: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
In-reply-to: <385C1DE1.404AA37A@mascari.com> (message from Mike Mascari on
Sat, 18 Dec 1999 18:50:57 -0500)
Subject: Re: [HACKERS] SPI header dependencies
References: <1260.945537650@sss.pgh.pa.us> <385C1DE1.404AA37A@mascari.com>
Proposed TODO:
* Re-examine list of header files that get installed, add/delete as needed
Sounds great. Although hopefully not needed in the next
release :-) , the most annoying thing in the past was the
inability to build a refint.so from the various binary
distributions...
Absolutely needed! There is more to SPI than refint. The foreign
keys cannot remove the need for that interface to be complete as
installed.
Same problem happens when trying to include trigger.h, so those
dependencies need looking at too.
Cheers,
Brook
From bouncefilter Sun Dec 19 02:30:37 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA81397
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 02:29:51 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id CAA02538;
Sun, 19 Dec 1999 02:27:56 -0500 (EST)
To: Brook Milligan <brook@biology.nmsu.edu>
cc: pgman@candle.pha.pa.us, peter_e@gmx.net, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: [PATCHES] Lock
In-reply-to: Your message of Sat, 18 Dec 1999 16:14:50 -0700 (MST)
<199912182314.QAA03433@biology.nmsu.edu>
Date: Sun, 19 Dec 1999 02:27:56 -0500
Message-ID: <2535.945588476@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Brook Milligan <brook@biology.nmsu.edu> writes:
Somehow there has to be a mechanism for atomically asserting locks on
more than one table.
(scratches head reflectively...) y'know, thirty years ago there were
a bunch of smart people writing PhD theses about this type of issue.
I've got to think it's been a solved problem for a long time. Seems
like someone should go spend a long afternoon in a university library
and dig up the answer.
regards, tom lane
From bouncefilter Sun Dec 19 04:28:38 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA05568
for <hackers@postgreSQL.org>; Sun, 19 Dec 1999 04:28:14 -0500 (EST)
(envelope-from Inoue@tpf.co.jp)
Received: from mcadnote1 (ppm231.noc.fukui.nsk.ne.jp [210.161.188.106])
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id SAA00789; Sun, 19 Dec 1999 18:25:03 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Keith Parks" <emkxp01@mtcc.demon.co.uk>, <pgman@candle.pha.pa.us>,
<wieck@debis.com>, <hackers@postgreSQL.org>
Subject: RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
Date: Sun, 19 Dec 1999 18:25:39 +0900
Message-ID: <NDBBIJLOILGIKBGDINDFEELECBAA.Inoue@tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-reply-to: <11852.945473961@sss.pgh.pa.us>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Importance: Normal
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Tom Lane"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
It seems that conflicts of the initialization of some backends cause
above NOTICE messages.
Those backends would use the same XIDTAGs for the same relations
in case of LockAcquire()/LockRelease() because xids of those backends
are'nt set before starting the first command. When one of the backend
call LockReleaseAll(),it would release all together.Oooh, that would nicely explain Keith's observation that it seems to
happen at backend startup. I guess we need to select an initial XID
earlier during startup than we now do?
I'm not sure it's possible or not.
If startup sequence in InitPostgres() is changed,we may hardly
find the place to start transaction during backend startup.
Seems the unique place we could call StartTransacationCommand()
during backend startup is between InitCatalogCahe() and InitUserId()
in InitPostgres() now.
I tried the following patch and it seems work at least now.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
Index: tcop/postgres.c
===================================================================
RCS file: /home/cvs/pgcurrent/backend/tcop/postgres.c,v
retrieving revision 1.8
diff -c -r1.8 postgres.c
*** tcop/postgres.c 1999/11/17 02:12:46 1.8
--- tcop/postgres.c 1999/12/19 02:35:12
***************
*** 1474,1480 ****
on_shmem_exit(remove_all_temp_relations, NULL);
! parser_input = makeStringInfo(); /* initialize input buffer */
/*
* Send this backend's cancellation info to the frontend.
--- 1474,1486 ----
on_shmem_exit(remove_all_temp_relations, NULL);
! {
! MemoryContext oldcontext;
!
! oldcontext = MemoryContextSwitchTo(TopMemoryContext);
! parser_input = makeStringInfo(); /* initialize input buffer */
! MemoryContextSwitchTo(oldcontext);
! }
/*
* Send this backend's cancellation info to the frontend.
Index: utils/init/postinit.c
===================================================================
RCS file: /home/cvs/pgcurrent/backend/utils/init/postinit.c,v
retrieving revision 1.6
diff -c -r1.6 postinit.c
*** utils/init/postinit.c 1999/11/22 01:28:26 1.6
--- utils/init/postinit.c 1999/12/19 02:50:29
***************
*** 546,551 ****
--- 546,554 ----
*/
InitCatalogCache();
+ /* Could we start transaction here ? */
+ if (!bootstrap)
+ StartTransactionCommand();
/*
* Set ourselves to the proper user id and figure out our postgres
* user id. If we ever add security so that we check for valid
From bouncefilter Sun Dec 19 05:45:39 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA21421
for <hackers@postgresql.org>; Sun, 19 Dec 1999 05:45:20 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 11zdq0-0001OF-0K; Sun, 19 Dec 1999 10:45:16 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id KAA06358; Sun, 19 Dec 1999 10:45:11 GMT
Message-Id: <199912191045.KAA06358@mtcc.demon.co.uk>
Date: Sun, 19 Dec 1999 10:45:11 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: tgl@sss.pgh.pa.us, Inoue@tpf.co.jp
Cc: pgman@candle.pha.pa.us, wieck@debis.com, hackers@postgresql.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: k2x+C5es4l9EsVzjiETaQA==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
"Hiroshi Inoue" <Inoue@tpf.co.jp>
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
It seems that conflicts of the initialization of some backends cause
above NOTICE messages.
Those backends would use the same XIDTAGs for the same relations
in case of LockAcquire()/LockRelease() because xids of those backends
are'nt set before starting the first command. When one of the backend
call LockReleaseAll(),it would release all together.Oooh, that would nicely explain Keith's observation that it seems to
happen at backend startup. I guess we need to select an initial XID
earlier during startup than we now do?I'm not sure it's possible or not.
If startup sequence in InitPostgres() is changed,we may hardly
find the place to start transaction during backend startup.Seems the unique place we could call StartTransacationCommand()
during backend startup is between InitCatalogCahe() and InitUserId()
in InitPostgres() now.
I tried the following patch and it seems work at least now.
<snip>
Hiroshi
I concur, after application of this patch I've not had a single
lock NOTICE: error in the regression tests.
Good work.
Thanks,
Keith.
From bouncefilter Sun Dec 19 15:04:47 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA27195
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 15:04:28 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id PAA08767;
Sun, 19 Dec 1999 15:03:44 -0500 (EST)
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
In-reply-to: Your message of Fri, 17 Dec 1999 22:49:34 -0600
<385B125E.D7589FB8@austin.rr.com>
Date: Sun, 19 Dec 1999 15:03:44 -0500
Message-ID: <8764.945633824@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Well, the good news is that I understand this problem, and in fact fixed
it in current sources several months ago. The bad news is that the fix
is part of some rather extensive planner revisions, and I don't think
it's going to be safe/practical to back-patch it into REL6_5.
It's possible to duplicate the bug in 6.5.* with this test case:
create table t1 (f1 int, f2 int);
create index t1i on t1 (f1,f2);
create table t2 (f1 int, f2 int);
create index t2i on t2 (f1,f2);
create table t3 (f1 int, f2 int);
create index t3i on t3 (f1,f2);
select t1.f1 from t1,t2,t3 where
t1.f1=1 and t2.f1=1 and t3.f1=1 and
t1.f2=t2.f2 and t1.f2=t3.f2 and t2.f2=t3.f2;
ERROR: ExecInitIndexScan: both left and right op's are rel-vars
The generated query plan is
Nested Loop (cost=6.05 rows=1 width=16)
-> Nested Loop (cost=4.05 rows=1 width=12)
-> Index Scan using t3i on t3 (cost=2.05 rows=1 width=4)
-> Index Scan using t1i on t1 (cost=2.00 rows=1 width=8)
-> Index Scan using t2i on t2 (cost=2.00 rows=1 width=4)
and the source of the problem is that in the innermost indexscan on t1,
the planner is trying to use the WHERE clause "t1.f2=t2.f2" as an index
qualification. But it can't do that because in this query plan, t2
hasn't been joined to t1 yet. (It should have used "t1.f2=t3.f2"
instead; the value of t3.f2 is available since t3 is the outer side of
the nestloop join, meaning that in any one scan of t1, a fixed tuple
from t3 is being considered.)
The reason it makes this mistake is an ill-chosen data structure for
representing which WHERE clauses require which sets of outer relations
in order to be used as indexquals on the inside of a nestloop. In 6.5,
that info was attached to the first WHERE clause in the list of clauses
that might possibly be used with the index --- which in this example is
the t1.f1=1 clause. Trouble is, that clause can *also* be used in
joining t1 to t3, and there's only one of it, which means its
outer-join-relation field gets overwritten with the info for the join
considered last. So by the time we actually get around to generating
the plan, the clause list is marked as "OK to use in joining t1 to t3".
Oops.
I have fixed this in current sources by removing the field in question
from RestrictInfo nodes and storing the information in separate lists.
But it's a pretty major change and I don't want to try to back-patch it.
I would suggest, instead, that you work around the problem until 7.0
comes out. I think you could do this by removing your two-column
indexes in favor of single-column indexes, or even just switching the
order of the indexes (in the above test case, no bug is seen if the
indexes are declared on (f2,f1)). However switching the order would be
a bit fragile since it'd depend on which fields you compare to constants
and which ones you use as join keys in your queries. If that doesn't
work, a brute-force solution is to run your application with environment
variable PGOPTIONS="-fn" (forbid nestloop joins), which discourages the
planner from considering nestloop joins at all. The bug will not arise
if a merge or hash join plan is used.
regards, tom lane
From bouncefilter Sun Dec 19 16:20:46 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA38183
for <pgsql-hackers@postgresql.org>;
Sun, 19 Dec 1999 16:20:11 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.16.188]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Sun, 19 Dec 1999 15:11:36 -0600
Sender: ed
Message-ID: <385D4C38.A0079809@austin.rr.com>
Date: Sun, 19 Dec 1999 15:20:56 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
References: <8764.945633824@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
I would suggest, instead, that you work around the problem until 7.0
comes out. I think you could do this by removing your two-column
indexes in favor of single-column indexes, or even just switching the
order of the indexes (in the above test case, no bug is seen if the
indexes are declared on (f2,f1)). However switching the order would be
a bit fragile since it'd depend on which fields you compare to constants
and which ones you use as join keys in your queries. If that doesn't
work, a brute-force solution is to run your application with environment
variable PGOPTIONS="-fn" (forbid nestloop joins), which discourages the
planner from considering nestloop joins at all. The bug will not arise
if a merge or hash join plan is used.
First off, let me express appreciation for your investigation and
explanation. My humble thanks.
Re workarounds, I have removed all *unnecessary* multi-column indices.
That still leaves me with 48 multi-column indices for primary keys and
uniqueness. I think I must have those to avoid duplicate key problems,
etc.
Agreed, the index column order switching is fragile and will likely bite me
later. So that leaves the "-fn" option. I will experiment with that.
Are there any known consequences of forbidding nestloop joins? Performance
hits? Functionality hits?
Cheers,
Ed Loehr
From bouncefilter Sun Dec 19 17:02:47 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA47560
for <pgsql-hackers@postgresql.org>;
Sun, 19 Dec 1999 17:02:24 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.16.188]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Sun, 19 Dec 1999 15:53:57 -0600
Sender: ed
Message-ID: <385D5625.1CC1F8C9@austin.rr.com>
Date: Sun, 19 Dec 1999 16:03:17 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
References: <8764.945633824@sss.pgh.pa.us> <385D4C38.A0079809@austin.rr.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Ed Loehr wrote:
Are there any known consequences of forbidding nestloop joins? Performance
hits? Functionality hits?
OK, I pulled out my old RDBMS text. Here are my current assumptions re join
strategies:
1) The only Pgsql alternative join strategies to nested-loop joins are merge
join and hash join.
2) Merge join only makes sense if the data is physically ordered by the join
keys, and there is almost always a natural entropy away from physical sort
order.
Therefore, it generally makes sense to use only hash join.
Are my assumptions correct? Reasonable conclusion?
Can I configure psql to use only hash joins?
Cheers,
Ed Loehr
From bouncefilter Sun Dec 19 17:20:47 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA49176
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 17:20:38 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id RAA09902;
Sun, 19 Dec 1999 17:20:03 -0500 (EST)
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
In-reply-to: Your message of Sun, 19 Dec 1999 15:20:56 -0600
<385D4C38.A0079809@austin.rr.com>
Date: Sun, 19 Dec 1999 17:20:03 -0500
Message-ID: <9899.945642003@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Ed Loehr <ELOEHR@austin.rr.com> writes:
Re workarounds, I have removed all *unnecessary* multi-column indices.
That still leaves me with 48 multi-column indices for primary keys and
uniqueness. I think I must have those to avoid duplicate key problems,
etc.
Yes, if you are using UNIQUE indexes to enforce uniqueness of primary
keys, then you don't have a lot of choice but to leave them in place.
So, if you still see the problem with only those multicolumn indexes
remaining, then PGOPTIONS="-fn" is your best recourse.
Are there any known consequences of forbidding nestloop joins? Performance
hits? Functionality hits?
You probably will see a performance hit, since the optimizer wouldn't be
picking the nestloop in the first place if it didn't think it was the
cheapest alternative. (Of course, whether its estimate is *right* is
another story...) Hopefully it won't be a large hit. The worst aspect
of using PGOPTIONS for this is that it'll affect all your queries not
just the ones where this trouble occurs; so on some simpler queries you
might see a noticeable slowdown. You will definitely want to remember
to take out the workaround once you are off 6.5.
A more significant potential problem is that the optimizer will use
nestloop anyway if it can't find a usable merge or hash join method.
I think that that won't be a problem for the datatypes you are using.
regards, tom lane
From bouncefilter Sun Dec 19 17:33:48 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA53252
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 17:33:08 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id RAA09976;
Sun, 19 Dec 1999 17:32:35 -0500 (EST)
To: Ed Loehr <ELOEHR@austin.rr.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
In-reply-to: Your message of Sun, 19 Dec 1999 16:03:17 -0600
<385D5625.1CC1F8C9@austin.rr.com>
Date: Sun, 19 Dec 1999 17:32:34 -0500
Message-ID: <9973.945642754@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Ed Loehr <ELOEHR@austin.rr.com> writes:
1) The only Pgsql alternative join strategies to nested-loop joins are merge
join and hash join.
Correct...
2) Merge join only makes sense if the data is physically ordered by the join
keys, and there is almost always a natural entropy away from physical sort
order.
Therefore, it generally makes sense to use only hash join.
Not so. A merge join can be built atop either ordered-index-scans of
the inputs, or explicitly sorted input. Postgres' cost estimates are
done for both of these cases; if the optimizer thinks that merge join
is cheapest then it probably is.
Can I configure psql to use only hash joins?
You could try PGOPTIONS="-fn -fm" to forbid both nestloop and merge
joins, but I wouldn't really recommend it. You'll be taking enough
of a performance hit from not using nestloop when it's cheapest;
disabling mergejoin as well doesn't seem like a good idea. Really
these options are intended as optimizer debugging aids, not as settings
that users should keep in place for long periods of time.
For the record, the other switches in this family are
-fh forbid hashjoin
-fs forbid sequential scan
-fi forbid indexed scan
Note that -fs/-fi are for individual scans and thus don't compete
with -fn/-fm/-fh for join methods. Also, -fs and -fn are not 100%
lockouts, since the optimizer will use those methods anyway if it
has no other choice (eg, -fs is ineffective if there's no index to
do an indexscan with).
regards, tom lane
From bouncefilter Sun Dec 19 19:13:53 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA70782
for <hackers@postgresql.org>; Sun, 19 Dec 1999 19:13:15 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62067 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sLLG586101>; Mon, 20 Dec 1999 01:12:55 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zqWz-00007a-00; Mon, 20 Dec 1999 01:18:29 +0100
Date: Mon, 20 Dec 1999 01:18:29 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: hackers@postgresql.org
Subject: Re: [PATCHES] Lock
In-Reply-To: <199912181828.NAA01486@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.21.9912190124040.356-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-18, Bruce Momjian mentioned:
* Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison
It took a few minutes, but I remember the use for this. If you are
going to hang waiting to lock tab3, you don't want to lock tab1 and tab2
while you are waiting for tab3 lock. The user wanted all tables to lock
in one operation without holding locks while waiting to complete all
locking.Can you do the locks, and if one fails, not hang, but unlock the
previous tables, go lock/hang on the failure, and go back and lock the
others? Seems it would have to be some kind of lock/fail/unlock/wait
loop.
That's what I suspected. But of course LockRelation() doesn't return
anything based on whether it succeeded, it just hangs, so it'll take a
little more work. Next year ...
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sun Dec 19 19:13:56 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA70781
for <pgsql-hackers@postgresql.org>;
Sun, 19 Dec 1999 19:13:14 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62094 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sLLG775850>; Mon, 20 Dec 1999 01:12:57 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zqX9-000089-00; Mon, 20 Dec 1999 01:18:39 +0100
Date: Mon, 20 Dec 1999 01:18:39 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: initdb.sh fixed
In-Reply-To: <199912182021.PAA05716@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.21.9912190127480.356-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-18, Bruce Momjian mentioned:
The big problem seems to be reliance on bash-isms like $UID and
functions with spaces like:
Bash tells me that is it's invoked as 'sh' it will behave like 'sh', but
it's lying ...
'insert ( data data data )' bootstrap commands are containing gaps. On the
other hand, this was one of the key things that were supposed to be
improved because relying on $USER was not su-safe. Maybe $UID would work,
since initdb isn't supposed to be setuid anyway.Again, a bash-ism. Let's face, it, the postgres binary is going to
croak on root anyway, so we are just doing an extra check in initdb.
But the point was to initialize to superuser id in Postgres as that
number, but we might as well start them out at 0, like it is now.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sun Dec 19 19:13:52 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA70831
for <pgsql-hackers@postgresql.org>;
Sun, 19 Dec 1999 19:13:34 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62148 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sLLGH86101>; Mon, 20 Dec 1999 01:13:07 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zqXG-00008P-00; Mon, 20 Dec 1999 01:18:46 +0100
Date: Mon, 20 Dec 1999 01:18:46 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t
In-Reply-To: <199912182032.PAA06240@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.21.9912190139481.356-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-18, Bruce Momjian mentioned:
I remember clear mention that we did not like:
if () {
}
I see you are writing your shell scripts with that, and am not a fan of
it, but it is only a shell script.
What do I know about shell scripting? :)
Seriously though, I didn't use to do that, but I get to like it more every
day ... I was going to look for an example of uglily-formatted code now,
but can't find one. My concern was more about the 4-space-tabs, because a
tab is 8 spaces in the rest of the world. I have no problem with 4 space
indentation and the good old bsd format.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sun Dec 19 19:13:50 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA70833
for <pgsql-hackers@postgresql.org>;
Sun, 19 Dec 1999 19:13:35 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62192 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sLLGM108628>; Mon, 20 Dec 1999 01:13:12 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zqXM-00008R-00; Mon, 20 Dec 1999 01:18:52 +0100
Date: Mon, 20 Dec 1999 01:18:52 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Jan Wieck <wieck@debis.com>, Bruce Momjian <pgman@candle.pha.pa.us>,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
In-Reply-To: <1461.945554247@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.21.9912190204120.2244-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-18, Tom Lane mentioned:
If you can arrange to page stderr output, cool...
I had that experience already, but the two pagers (one for stdin, one for
stderr) didn't get along so well ... ;) I guess if you want this
functionality you could start psql with 2>1 or whatever it was.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sun Dec 19 19:13:48 1999
Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA70844
for <pgsql-hackers@postgresql.org>;
Sun, 19 Dec 1999 19:13:44 -0500 (EST)
(envelope-from peter@localhost.its.uu.se)
Received: from regulus.its.uu.se ([130.238.7.19]:62267 "EHLO
regulus.its.uu.se") by merganser.its.uu.se with ESMTP id
<S.sLLGS139347>; Mon, 20 Dec 1999 01:13:18 +0100
Received: from peter (helo=localhost)
by regulus.its.uu.se with local-esmtp (Exim 3.02 #2)
id 11zqXS-00008T-00; Mon, 20 Dec 1999 01:18:58 +0100
Date: Mon, 20 Dec 1999 01:18:58 +0100 (CET)
From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] psql compile errors
In-Reply-To: <1391.945539202@sss.pgh.pa.us>
Message-ID: <Pine.LNX.4.21.9912190205470.2244-100000@localhost.localdomain>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
Sender: Peter Eisentraut <peter@hub.org>
On 1999-12-18, Tom Lane mentioned:
Yup, Jan's running a different libreadline than you are.
It looks like they changed the API quite a bit between 2.* and 4.0 (which
might also explain why there was no 3.*). I'll make sure that this gets
fixed before this thing goes out the door. Right now please work around.
--
Peter Eisentraut Sernanders v���g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Sun Dec 19 21:31:51 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA97426
for <hackers@postgreSQL.org>; Sun, 19 Dec 1999 21:31:19 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA19562;
Sun, 19 Dec 1999 21:15:28 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200215.VAA19562@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: [PATCHES] Lock
In-Reply-To: <Pine.LNX.4.21.9912190124040.356-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 20, 1999 01:18:29 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sun, 19 Dec 1999 21:15:28 -0500 (EST)
CC: hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
On 1999-12-18, Bruce Momjian mentioned:
* Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison
It took a few minutes, but I remember the use for this. If you are
going to hang waiting to lock tab3, you don't want to lock tab1 and tab2
while you are waiting for tab3 lock. The user wanted all tables to lock
in one operation without holding locks while waiting to complete all
locking.Can you do the locks, and if one fails, not hang, but unlock the
previous tables, go lock/hang on the failure, and go back and lock the
others? Seems it would have to be some kind of lock/fail/unlock/wait
loop.That's what I suspected. But of course LockRelation() doesn't return
anything based on whether it succeeded, it just hangs, so it'll take a
little more work. Next year ...
Yep, I figured it would be weird to get working.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 19 21:31:53 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA97433
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 21:31:23 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA19700;
Sun, 19 Dec 1999 21:17:00 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200217.VAA19700@candle.pha.pa.us>
Subject: Re: initdb.sh fixed
In-Reply-To: <Pine.LNX.4.21.9912190127480.356-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 20, 1999 01:18:39 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sun, 19 Dec 1999 21:17:00 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
On 1999-12-18, Bruce Momjian mentioned:
The big problem seems to be reliance on bash-isms like $UID and
functions with spaces like:Bash tells me that is it's invoked as 'sh' it will behave like 'sh', but
it's lying ...
Yes, certain _extensions_ show through.
'insert ( data data data )' bootstrap commands are containing gaps. On the
other hand, this was one of the key things that were supposed to be
improved because relying on $USER was not su-safe. Maybe $UID would work,
since initdb isn't supposed to be setuid anyway.Again, a bash-ism. Let's face, it, the postgres binary is going to
croak on root anyway, so we are just doing an extra check in initdb.But the point was to initialize to superuser id in Postgres as that
number, but we might as well start them out at 0, like it is now.
Seems either $USER or $LOGNAME should be set in all cases.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 19 21:31:50 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA97419
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 21:31:14 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA19819;
Sun, 19 Dec 1999 21:17:53 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200217.VAA19819@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: initdb.sh fixed7
In-Reply-To: <Pine.LNX.4.21.9912190127480.356-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 20, 1999 01:18:39 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sun, 19 Dec 1999 21:17:53 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
'insert ( data data data )' bootstrap commands are containing gaps. On the
other hand, this was one of the key things that were supposed to be
improved because relying on $USER was not su-safe. Maybe $UID would work,
since initdb isn't supposed to be setuid anyway.Again, a bash-ism. Let's face, it, the postgres binary is going to
croak on root anyway, so we are just doing an extra check in initdb.But the point was to initialize to superuser id in Postgres as that
number, but we might as well start them out at 0, like it is now.
I am now using:
POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"
Let's see how portable that is?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 19 21:23:49 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA93724
for <hackers@postgreSQL.org>; Sun, 19 Dec 1999 21:22:51 -0500 (EST)
(envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id LAA01022; Mon, 20 Dec 1999 11:19:47 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Keith Parks" <emkxp01@mtcc.demon.co.uk>, <tgl@sss.pgh.pa.us>
Cc: <pgman@candle.pha.pa.us>, <wieck@debis.com>, <hackers@postgreSQL.org>
Subject: RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
Date: Mon, 20 Dec 1999 11:24:51 +0900
Message-ID: <000201bf4a91$654fb8a0$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <199912191045.KAA06358@mtcc.demon.co.uk>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
-----Original Message-----
From: Keith Parks [mailto:emkxp01@mtcc.demon.co.uk]
Sent: Sunday, December 19, 1999 7:45 PM
To: tgl@sss.pgh.pa.us; Inoue@tpf.co.jp"Hiroshi Inoue" <Inoue@tpf.co.jp>
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
It seems that conflicts of the initialization of some backends cause
above NOTICE messages.
Those backends would use the same XIDTAGs for the same relations
in case of LockAcquire()/LockRelease() because xids of those backends
are'nt set before starting the first command. When one of the backend
call LockReleaseAll(),it would release all together.Oooh, that would nicely explain Keith's observation that it seems to
happen at backend startup. I guess we need to select an initial XID
earlier during startup than we now do?I'm not sure it's possible or not.
If startup sequence in InitPostgres() is changed,we may hardly
find the place to start transaction during backend startup.Seems the unique place we could call StartTransacationCommand()
during backend startup is between InitCatalogCahe() and InitUserId()
in InitPostgres() now.
I tried the following patch and it seems work at least now.<snip>
HiroshiI concur, after application of this patch I've not had a single
lock NOTICE: error in the regression tests.
Thanks.
I'm not sure my patch has no problem.
May I dare to commit it to current tree ?
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Sun Dec 19 21:31:54 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA97461
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 21:31:40 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA20208;
Sun, 19 Dec 1999 21:29:35 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200229.VAA20208@candle.pha.pa.us>
Subject: Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t
In-Reply-To: <Pine.LNX.4.21.9912190139481.356-100000@localhost.localdomain>
from Peter Eisentraut at "Dec 20, 1999 01:18:46 am"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Sun, 19 Dec 1999 21:29:35 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
On 1999-12-18, Bruce Momjian mentioned:
I remember clear mention that we did not like:
if () {
}
I see you are writing your shell scripts with that, and am not a fan of
it, but it is only a shell script.What do I know about shell scripting? :)
Seriously though, I didn't use to do that, but I get to like it more every
day ... I was going to look for an example of uglily-formatted code now,
but can't find one. My concern was more about the 4-space-tabs, because a
tab is 8 spaces in the rest of the world. I have no problem with 4 space
indentation and the good old bsd format.
As a workaround, there is a C program I wrote called entab in
pgsql/src/tools/entab. It has a manual page and everything. It does a
good job of converting tabs to any size, or removing all tabs. It does
certain fancy things like prevent tab changes inside quoted strings, and
clip trailing whitespace. That is what I do in my print filters.
I admit our current system is a pain. Our options are:
o go to 8 space tabs and 8 space indenting
o go to 8 space tabs and 4 space indenting
o keep 4 space tabs and 4 space indenting
The first option is out. Eight space indenting is a pain, and our code
would look terrible. Eight is just too much and prevents meaningful
indenting.
The second option is your preference. It is easier to print, but
editing the file can be a pain for editors that don't support
different tab/indent values. Also, I like cursoring over tabs, so
having some indents as 4 spaces and some as full tabs give the code a
funny feeling for me.
I print a lot less, and use entab do handle the 4-space issue, so it
seems the best for me.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 19 21:35:51 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA98080
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 21:35:07 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA20543;
Sun, 19 Dec 1999 21:34:32 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200234.VAA20543@candle.pha.pa.us>
Subject: Re: [COMMITTERS] pgsql/src/interfaces/libpgeasy (libpgeasy.c)
In-Reply-To: <199912200131.UAA86295@hub.org> from Tom Lane at "Dec 19,
1999 08:31:27 pm"
To: Tom Lane <tgl@hub.org>
Date: Sun, 19 Dec 1999 21:34:32 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Date: Sunday, December 19, 1999 @ 20:31:26
Author: tglUpdate of /usr/local/cvsroot/pgsql/src/interfaces/libpgeasy
from hub.org:/home/tmp/cvs-serv86291Modified Files:
libpgeasy.c----------------------------- Log Message -----------------------------
Clean up some minor gcc warnings. I'm not touching the
major one, though, which is the truly ugly stores into libpq private
storage. Can't you find a better way to do this?
Yes, very ugly. I need some way to store my state information _inside_
the Result structure. Any ideas?
Or is this going to be another one of those, "Hey, who put the LIKE
indexing in gram.y... Oh, it was you Momjian... Well, no, I can't
think of a better way right now..." Two years pass until someone
improves it. :-)
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 19 21:36:50 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA98241
for <hackers@postgreSQL.org>; Sun, 19 Dec 1999 21:36:26 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA20605;
Sun, 19 Dec 1999 21:35:37 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200235.VAA20605@candle.pha.pa.us>
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
In-Reply-To: <000201bf4a91$654fb8a0$2801007e@cadzone.tpf.co.jp> from Hiroshi
Inoue at "Dec 20, 1999 11:24:51 am"
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Date: Sun, 19 Dec 1999 21:35:37 -0500 (EST)
CC: Keith Parks <emkxp01@mtcc.demon.co.uk>, tgl@sss.pgh.pa.us,
wieck@debis.com,
hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Seems the unique place we could call StartTransacationCommand()
during backend startup is between InitCatalogCahe() and InitUserId()
in InitPostgres() now.
I tried the following patch and it seems work at least now.<snip>
HiroshiI concur, after application of this patch I've not had a single
lock NOTICE: error in the regression tests.Thanks.
I'm not sure my patch has no problem.
May I dare to commit it to current tree ?
Commit it. If it produces other problems, at least we will know where
to look.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 19 22:14:50 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA07685
for <hackers@postgreSQL.org>; Sun, 19 Dec 1999 22:14:26 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id WAA17783;
Sun, 19 Dec 1999 22:13:06 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Peter Eisentraut <peter_e@gmx.net>, hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: [PATCHES] Lock
In-reply-to: <199912200215.VAA19562@candle.pha.pa.us>
References: <199912200215.VAA19562@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Sun, 19 Dec 1999 21:15:28 -0500"
Date: Sun, 19 Dec 1999 22:13:06 -0500
Message-ID: <17780.945659586@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
That's what I suspected. But of course LockRelation() doesn't return
anything based on whether it succeeded, it just hangs, so it'll take a
little more work. Next year ...
I think this would actually have to be implemented inside the lock
manager in order to make it work right.
regards, tom lane
From bouncefilter Sun Dec 19 22:28:50 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA09428
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 22:28:43 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id WAA17868;
Sun, 19 Dec 1999 22:26:11 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Peter Eisentraut <peter_e@gmx.net>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: initdb.sh fixed
In-reply-to: <199912200217.VAA19700@candle.pha.pa.us>
References: <199912200217.VAA19700@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Sun, 19 Dec 1999 21:17:00 -0500"
Date: Sun, 19 Dec 1999 22:26:11 -0500
Message-ID: <17865.945660371@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Seems either $USER or $LOGNAME should be set in all cases.
One or both is probably set in most shell environments ... but
it's not necessarily *right*. If you've su'd to postgres from
your login account, these env vars may still reflect your login.
I am now using:
POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"
Let's see how portable that is?
Some quick experimentation shows that id -u isn't too trustworthy,
which is a shame because it's the POSIX standard. But I find that
the SunOS implementation ignores -u:
$ id -u
uid=6902(tgl) gid=50(users0) groups=50(users0)
And no doubt there will be platforms that haven't got "id" at all.
It might be best to provide a little bitty C program that calls
geteuid() and prints the result...
regards, tom lane
From bouncefilter Sun Dec 19 22:46:50 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA13800
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 22:46:32 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA23177;
Sun, 19 Dec 1999 22:45:04 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200345.WAA23177@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: initdb.sh fixed
In-Reply-To: <17865.945660371@sss.pgh.pa.us> from Tom Lane at "Dec 19,
1999 10:26:11 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 19 Dec 1999 22:45:04 -0500 (EST)
CC: Peter Eisentraut <peter_e@gmx.net>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Seems either $USER or $LOGNAME should be set in all cases.
One or both is probably set in most shell environments ... but
it's not necessarily *right*. If you've su'd to postgres from
your login account, these env vars may still reflect your login.I am now using:
POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"
Let's see how portable that is?Some quick experimentation shows that id -u isn't too trustworthy,
which is a shame because it's the POSIX standard. But I find that
the SunOS implementation ignores -u:$ id -u
uid=6902(tgl) gid=50(users0) groups=50(users0)And no doubt there will be platforms that haven't got "id" at all.
It might be best to provide a little bitty C program that calls
geteuid() and prints the result...
We could argue that Postgres is the super-user for the database, it
should be zero userid.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 19 23:20:51 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA22296
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 23:20:27 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id XAA18032;
Sun, 19 Dec 1999 23:19:17 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Peter Eisentraut <peter_e@gmx.net>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: initdb.sh fixed
In-reply-to: <199912200345.WAA23177@candle.pha.pa.us>
References: <199912200345.WAA23177@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Sun, 19 Dec 1999 22:45:04 -0500"
Date: Sun, 19 Dec 1999 23:19:17 -0500
Message-ID: <18029.945663557@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We could argue that Postgres is the super-user for the database, it
should be zero userid.
Actually, that's quite a good thought --- is there *any* real need
for initdb to extract the UID of the postgres user? What we do need,
I think, is the *name* of the postgres user, which we might perhaps
get with something like
whoami 2>/dev/null || id -u -n 2>/dev/null || echo postgres
regards, tom lane
From bouncefilter Sun Dec 19 23:53:51 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA29122
for <pgsql-hackers@postgreSQL.org>;
Sun, 19 Dec 1999 23:53:22 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA25315;
Sun, 19 Dec 1999 23:40:52 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200440.XAA25315@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: initdb.sh fixed
In-Reply-To: <18029.945663557@sss.pgh.pa.us> from Tom Lane at "Dec 19,
1999 11:19:17 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 19 Dec 1999 23:40:52 -0500 (EST)
CC: Peter Eisentraut <peter_e@gmx.net>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We could argue that Postgres is the super-user for the database, it
should be zero userid.Actually, that's quite a good thought --- is there *any* real need
for initdb to extract the UID of the postgres user? What we do need,
I think, is the *name* of the postgres user, which we might perhaps
get with something likewhoami 2>/dev/null || id -u -n 2>/dev/null || echo postgres
We currently have:
EffectiveUser=`id -n -u 2> /dev/null` || EffectiveUser=`whoami 2> /dev/null`
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 00:25:52 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA35268
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 00:25:25 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA18118;
Mon, 20 Dec 1999 00:24:17 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Peter Eisentraut <peter_e@gmx.net>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: initdb.sh fixed
In-reply-to: <199912200440.XAA25315@candle.pha.pa.us>
References: <199912200440.XAA25315@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Sun, 19 Dec 1999 23:40:52 -0500"
Date: Mon, 20 Dec 1999 00:24:17 -0500
Message-ID: <18115.945667457@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We currently have:
EffectiveUser=`id -n -u 2>/dev/null` || EffectiveUser=`whoami 2>/dev/null`
OK, but is that really portable? I'd feel more comfortable with
EffectiveUser=`id -n -u 2>/dev/null || whoami 2>/dev/null`
because it's clearer what will happen. I wouldn't have expected an
error inside a backquoted subcommand to determine the error result of
the command as a whole, which is what the first example is depending on.
In a quick test it seemed to work with the ksh I tried it on, but I
wonder how many shells work that way...
regards, tom lane
From bouncefilter Mon Dec 20 00:40:54 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA39508
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 00:40:32 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA28874;
Mon, 20 Dec 1999 00:38:37 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912200538.AAA28874@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: initdb.sh fixed
In-Reply-To: <18115.945667457@sss.pgh.pa.us> from Tom Lane at "Dec 20,
1999 00:24:17 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 20 Dec 1999 00:38:37 -0500 (EST)
CC: Peter Eisentraut <peter_e@gmx.net>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We currently have:
EffectiveUser=`id -n -u 2>/dev/null` || EffectiveUser=`whoami 2>/dev/null`OK, but is that really portable? I'd feel more comfortable with
EffectiveUser=`id -n -u 2>/dev/null || whoami 2>/dev/null`
because it's clearer what will happen. I wouldn't have expected an
error inside a backquoted subcommand to determine the error result of
the command as a whole, which is what the first example is depending on.
In a quick test it seemed to work with the ksh I tried it on, but I
wonder how many shells work that way...
Change applied.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 02:24:53 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA56010
for <hackers@postgreSQL.org>; Mon, 20 Dec 1999 02:24:49 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id QAA05200;
Mon, 20 Dec 1999 16:24:45 +0900 (JST)
Received: from localhost (IDENT:t-ishii@localhost [127.0.0.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id QAA08392;
Mon, 20 Dec 1999 16:24:44 +0900
To: pgman@candle.pha.pa.us
Cc: wieck@debis.com, lockhart@alumni.caltech.edu, peter_e@gmx.net,
jeroen@design.nl, hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: Notation for nextval() (was Re: Several small
patches)
In-Reply-To: Your message of "Sat, 18 Dec 1999 11:06:32 +0900"
<19991218110632P.t-ishii@sra.co.jp>
References: <19991218110632P.t-ishii@sra.co.jp>
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991220162444F.t-ishii@sra.co.jp>
Date: Mon, 20 Dec 1999 16:24:44 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 18
backend/utils/mb/big5.c
* conversion between BIG5 and Mule Internal Code(CNS 116643-1992
* plane 1 and plane 2).
* This program is partially copied from lv(Multilingual file viewer)
* and slightly modified. lv is written and copyrighted by NARITA Tomio
* (nrt@web.ad.jp).I contacted the author when I borrowed his code. At that time its
license seemed to be sort of "public domain." But today I found on his
web page (http://www.ff.iij4u.or.jp/~nrt/lv/) that he seems changed
the license to GPL2. This is bad news for me, so I have written to him
about it and am waiting for his reply...
I have gotten a reply from him. He has changed the license term
*after* I copied the code from it. And he and I regard it is ok to use
the codes for PostgreSQL under the old license term.
--
Tatsuo Ishii
From bouncefilter Mon Dec 20 03:43:56 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id DAA74550
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 03:43:23 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m11zyG4-0003kIC; Mon, 20 Dec 99 09:33 MET
Message-Id: <m11zyG4-0003kIC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG varsize - how to go on
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Mon, 20 Dec 1999 09:33:32 +0100 (MET)
Cc: wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <590.945496733@sss.pgh.pa.us> from "Tom Lane" at Dec 18,
99 00:58:53 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Tom Lane wrote:
Dare I suggest
that we should declare feature freeze *now*, and concentrate on bug
fixes only for the next six weeks? If not, what features are on the
near horizon?
Only if the implementation of the temp file buffered deferred
trigger event queue isn't considered a feature, and after I
committed the catalog changes I need to go on with LONG
quietly.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 20 06:25:56 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id GAA05196
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 06:25:22 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m1200mS-0003kHC; Mon, 20 Dec 99 12:15 MET
Message-Id: <m1200mS-0003kHC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] LONG varsize - how to go on
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Mon, 20 Dec 1999 12:15:08 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912180613.BAA11773@candle.pha.pa.us> from "Bruce Momjian" at
Dec 18, 99 01:13:31 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
If Bruce wants to run pgindent before the Feb release, maybe the easiest
answer is to do it now (in the next few days) and then Jan can start
working on his new stuff without worrying about it.I don't need to run pgindent before _every_ release. No problem.
I don't see Jan's work chaning what the rest of us focus on. Let's see
how it goes. I certainly don't have anything planned.
Would be best for me if you can leave out the pgindent run
for this release. I already have some small things as
patches, that I apply to the latest cvs update. And I fear
what's currently discussed about changing 4 column tabstops
would break them completely.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 20 09:42:58 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA42828
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 09:42:26 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
JAA17344;
Mon, 20 Dec 1999 09:39:15 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912201439.JAA17344@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <m1200mS-0003kHC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 20, 1999 12:15:08 pm"
To: Jan Wieck <wieck@debis.com>
Date: Mon, 20 Dec 1999 09:39:15 -0500 (EST)
CC: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
If Bruce wants to run pgindent before the Feb release, maybe the easiest
answer is to do it now (in the next few days) and then Jan can start
working on his new stuff without worrying about it.I don't need to run pgindent before _every_ release. No problem.
I don't see Jan's work chaning what the rest of us focus on. Let's see
how it goes. I certainly don't have anything planned.Would be best for me if you can leave out the pgindent run
for this release. I already have some small things as
patches, that I apply to the latest cvs update. And I fear
what's currently discussed about changing 4 column tabstops
would break them completely.
Got it, no pgindent run.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 10:03:58 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA49629
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 10:03:01 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA18586;
Mon, 20 Dec 1999 10:02:27 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG varsize - how to go on
In-reply-to: <m11zyG4-0003kIC@orion.SAPserv.Hamburg.dsh.de>
References: <m11zyG4-0003kIC@orion.SAPserv.Hamburg.dsh.de>
Comments: In-reply-to wieck@debis.com (Jan Wieck)
message dated "Mon, 20 Dec 1999 09:33:32 +0100"
Date: Mon, 20 Dec 1999 10:02:27 -0500
Message-ID: <18583.945702147@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Tom Lane wrote:
Dare I suggest that we should declare feature freeze *now*,
Only if the implementation of the temp file buffered deferred
trigger event queue isn't considered a feature,
It's obviously a necessary fix. But no one seemed excited about an
early feature freeze anyway, so disregard that comment...
regards, tom lane
From bouncefilter Mon Dec 20 10:31:58 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA55856
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 10:31:10 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA20572;
Mon, 20 Dec 1999 10:08:14 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912201508.KAA20572@candle.pha.pa.us>
Subject: Re: QUESTION: Replication
In-Reply-To: <19991220150228.E07692B@miranda.herrera.iphil.net> from "neil d.
quiogue" at "Dec 20, 1999 11:02:28 pm"
To: "neil d. quiogue" <nquiogue@ieee.org>
Date: Mon, 20 Dec 1999 10:08:14 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Seasons Greetings Bruce,
Sorry to bother you but do you know of anyone working on replication
with PostgreSQL? I saw in the past, pgsnap (PG Snapshot) but I don't
know if anyone's working on replication these days. There was a
thread in the past and I sent them messages but haven't replied yet.
So I'm hoping you would know of someone or point me in the right
direction.
We need major work in this area, or at least a plan and an FAQ item.
We are getting major questions on this, and I don't know enough even to
make an FAQ item telling people their options.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 10:10:58 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA50562
for <pgsql-hackers@postgresql.org>;
Mon, 20 Dec 1999 10:10:26 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA18627;
Mon, 20 Dec 1999 10:09:21 -0500 (EST)
To: wieck@debis.com (Jan Wieck)
cc: pgman@candle.pha.pa.us (Bruce Momjian), pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] LONG varsize - how to go on
In-reply-to: <m1200mS-0003kHC@orion.SAPserv.Hamburg.dsh.de>
References: <m1200mS-0003kHC@orion.SAPserv.Hamburg.dsh.de>
Comments: In-reply-to wieck@debis.com (Jan Wieck)
message dated "Mon, 20 Dec 1999 12:15:08 +0100"
Date: Mon, 20 Dec 1999 10:09:21 -0500
Message-ID: <18624.945702561@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
wieck@debis.com (Jan Wieck) writes:
Would be best for me if you can leave out the pgindent run
for this release. I already have some small things as
patches, that I apply to the latest cvs update.
Why not do what Vadim is doing for XLOG: commit your changes under
#ifdefs for a symbol that isn't yet defined?
#ifdef LONG_ATTRS
new code
#else
old code
#endif
I think this'd possibly be helpful anyway for study and debugging
purposes, since people could easily see what you've changed and where.
Eventually, after all the dust settles, we can get rid of the #if's
and the old-code fragments.
I don't normally like #ifdef'd patches of this sort, but as a temporary
measure during implementation I think it'd be better than keeping a
private set of files.
And I fear
what's currently discussed about changing 4 column tabstops
would break them completely.
Bruce doesn't want to do that, and I doubt anyone will force the issue
over his veto. But it would be nice to be able to do a pgindent run;
there's a lot of new code in this release.
regards, tom lane
From bouncefilter Mon Dec 20 10:51:03 1999
Received: from news.tht.net (news.hub.org [216.126.91.242])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA59196
for <pgsql-hackers@postgresql.org>;
Mon, 20 Dec 1999 10:50:44 -0500 (EST)
(envelope-from news@news.tht.net)
Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id KAA32582
for pgsql-hackers@postgresql.org; Mon, 20 Dec 1999 10:40:24 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: news.tht.net: news set sender to <news> using -f
From: "NormanD" <vadri@onebox.com>
X-Newsgroups: comp.databases.postgresql.hackers
Subject: New Catia 5 r 4 and other appz!!!
Date: Mon, 20 Dec 1999 17:31:26 +0200
Organization: Omnitel, Lithuania
Lines: 43
Message-ID: <83lloh$19vo$9@trimpas.omnitel.net>
Reply-To: "NormanD" <vadri@onebox.com>
X-Trace: trimpas.omnitel.net 945707601 43000 195.22.176.145 (20 Dec 1999
16:33:21 GMT)
X-Complaints-To: news@omnitel.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
To: pgsql-hackers@postgresql.org
New Catia 5 r 4 and other appz!!!
CATIA 5 R4
CIMATRON IT v10.6 final rise
MICROSTATION.SE. v5.07.01.22 final cracked rise
SOLID VIEW pro v 3.52
IGES WORKS v.5.0 cracked rise
CATIA V 5R2 SERVICE PACK 4-LND
ICEM Surf Release 3.0.2
MOLDFLOW.CORP.MOLDFLOW.DYNAMIC.SERIES.V9.5.FINAL.CRACKED-RiSE (C)
Nastran v70.5.5 (c) Msc
Pads PowerPCB v3.0 licensed
Solid Edge Version 7.0
Solid Edge 7.0 Timer fix
Solidworks 99 Servicepack For WinNT 271 to 292 (c) Solidworks
SOLIDWORKS 99 207 TO 313 9X UPDATE WITH CRACK
SOLIDWORKS 99 207 TO 313 WINNT UPDATE WITH CRACK
SOLIDWORKS 99 250 TO 313 9X UPDATE WITH CRACK
SOLIDWORKS 99 250 TO 313 WINNT UPDATE WITH CRACK
SW99_207 TO 292 UPDATE_WIN98
MOLDFLOW VER. 9.5
MATHCAD 2000
PATRAN v8.5
Adams v9.1
SolidWorks 99 NEW!!! Under NT and Win9x - new version MOST POWERFUL CAD of a
package(packet)For any tasks.
And lots of others.
If you are interested please let me know at following e-mails:
cdsimpl@mailcity.com
cdsimpl@angelfire.com
NORMAN
If you lost me please send a fax message to:
Fax: +442076917580 (UK)
Fax: +493069088166 (Germany)
Fax: +18883572558 (USA)
Fax: + 61294750241 (Sydney)
Norman Tel: +370 8977935
ICQ:40497748
From bouncefilter Mon Dec 20 10:48:59 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA57428
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 10:48:21 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA18835;
Mon, 20 Dec 1999 10:47:19 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: [COMMITTERS] pgsql/src/interfaces/libpgeasy
(libpgeasy.c)
In-reply-to: <199912200234.VAA20543@candle.pha.pa.us>
References: <199912200234.VAA20543@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Sun, 19 Dec 1999 21:34:32 -0500"
Date: Mon, 20 Dec 1999 10:47:19 -0500
Message-ID: <18832.945704839@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Clean up some minor gcc warnings. I'm not touching the
major one, though, which is the truly ugly stores into libpq private
storage. Can't you find a better way to do this?
Yes, very ugly. I need some way to store my state information _inside_
the Result structure. Any ideas?
One possibility is to add an application-defined field, say of void*
type, to PGconn and PGresult, plus set/get access functions for them.
This'd be a fairly general-purpose feature; I've seen it done in other
libraries that export objects of this sort.
On the other hand, if libpq did have such a feature, it'd be nice if
libpgeasy didn't commandeer it but left it open for the application
to use. So maybe we need something else for libpgeasy.
Since libpgeasy is new in the (core) distribution for this release,
perhaps it is not too late to consider an API change? If get_result,
set_result and friends returned a pointer to a two-element struct
(PGresult* and tuplenumber) instead of a raw PGresult*, the problem
would go away. More or less anyway ... I'm not quite sure where it'd
be OK to free() such a struct ...
regards, tom lane
From bouncefilter Mon Dec 20 11:32:59 1999
Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net
[194.217.242.39]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA69002
for <pgsql-hackers@postgresql.org>;
Mon, 20 Dec 1999 11:32:43 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1)
id 1205jl-000EIe-0B; Mon, 20 Dec 1999 16:32:42 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id QAA15589; Mon, 20 Dec 1999 16:32:31 GMT
Message-Id: <199912201632.QAA15589@mtcc.demon.co.uk>
Date: Mon, 20 Dec 1999 16:32:31 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: Re: [HACKERS] Re: initdb.sh fixed7
To: peter_e@gmx.net, pgman@candle.pha.pa.us
Cc: pgsql-hackers@postgresql.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: FGD04I4iwKbNRx1QV2mKzw==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
Bruce Momjian <pgman@candle.pha.pa.us>
'insert ( data data data )' bootstrap commands are containing gaps. On
the
other hand, this was one of the key things that were supposed to be
improved because relying on $USER was not su-safe. Maybe $UID would work,
since initdb isn't supposed to be setuid anyway.Again, a bash-ism. Let's face, it, the postgres binary is going to
croak on root anyway, so we are just doing an extra check in initdb.But the point was to initialize to superuser id in Postgres as that
number, but we might as well start them out at 0, like it is now.I am now using:
POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"
Let's see how portable that is?
OOps,
"id -u" is a no-no on Solaris unless /usr/xpg4/bin is before /bin in
your path so we default to a userid of 0.
And in miscinit we assert that UserID must not equal 0 which
causes an Abort().
bash-2.03$ bin/postgres -O template1
DEBUG: Data Base System is starting up at Mon Dec 20 15:52:59 1999
DEBUG: Data Base System was shutdowned at Mon Dec 20 15:52:52 1999
DEBUG: CheckPoint record at (0, 152)
DEBUG: Redo record at (0, 152); Undo record at (0, 0)
DEBUG: NextTransactionId: 4621; NextOid: 0
DEBUG: Invalid NextTransactionId/NextOid
DEBUG: Data Base System is in production state at Mon Dec 20 15:52:59 1999
POSTGRES backend interactive interface
$Revision: 1.137 $ $Date: 1999/11/16 06:13:35 $
backend> CREATE VIEW pg_user AS SELECT usename, usesysid, usecreatedb, usetrace,
usesuper, usecatupd, '****
****'::text as passwd, valuntil FROM pg_shadow
TRAP: Failed Assertion("!(((bool) ((UserId) != 0))):", File: "miscinit.c", Line:
433)
!(((bool) ((UserId) != 0))) (0) [No such file or directory]
Abort (core dumped)
bash-2.03$
Unless I'm out of step with CVS.
Keith.
From bouncefilter Mon Dec 20 12:12:01 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA76856
for <pgsql-hackers@postgresql.org>;
Mon, 20 Dec 1999 12:12:00 -0500 (EST) (envelope-from admin@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id MAA05915;
Mon, 20 Dec 1999 12:11:11 -0500
Message-ID: <385E6328.CA6D80C4@wgcr.org>
Date: Mon, 20 Dec 1999 12:11:04 -0500
From: Lamar Owen <admin@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Oleg Bartunov <oleg@sai.msu.su>
CC: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Cc: lamar.owen@wgcr.org
References: <Pine.GSO.3.96.SK.991219003326.9631A-100000@ra>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Oleg Bartunov wrote:
Frans,
I supposed you wrote about postgres with locale support ?
If so, I'd recommend you to test LC_ALL env. variable.
Redhat 6.1 by default set is as en_US, at least in my setup
and I spend 30 minutes to figure out why I had the same problem
you described ( in my case I tried koi8-r ).
When I set LC_ALL=koi8-r everything work fine.
The /etc/sysconfig/i18n scriptlet is a three-liner:
LANGUAGE=en_US
LC_ALL=en_US
LINGUAS=en_US
This script apparently is set up during the installation of RedHat -- it
does not belong to any installed RPM. I am going to find out what these
envvars should be set to for 'normal' operation (where the definition of
'normal' varies. There is little to no documentation on this
RedHat-ism.
I have also noted that the LC_ALL variable alters the collation even
when PostgreSQL is built WITHOUT --enable-locale -- on RedHat 6.1 the
locale support seems to be embedded into the glibc installation.
Again, little to no documentation that I have yet found. Oh well. Time
to do some reading.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Mon Dec 20 12:20:00 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA77945
for <pgsql-hackers@postgresql.org>;
Mon, 20 Dec 1999 12:19:49 -0500 (EST) (envelope-from admin@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id MAA05933;
Mon, 20 Dec 1999 12:13:25 -0500
Message-ID: <385E63AE.CD1139B@wgcr.org>
Date: Mon, 20 Dec 1999 12:13:18 -0500
From: Lamar Owen <admin@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Oliver Elphick <olly@lfix.co.uk>
CC: Tom Lane <tgl@sss.pgh.pa.us>, Mike Mascari <mascarm@mascari.com>,
pgsql-hackers@postgresql.org, olly@linda.lfix.co.uk
Subject: Re: [HACKERS] SPI header dependencies
References: <1260.945537650@sss.pgh.pa.us>
<199912181831.SAA26744@linda.lfix.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Oliver Elphick wrote:
Tom Lane wrote:
Proposed TODO:
* Re-examine list of header files that get installed, add/delete as neededI attach the list of extra include files that I needed to include in Debian's
postgresql-dev package
[snip]
I owe you again, Oliver. This list gives the postgres-dev package
everything needed to do SPI development?? Good thing I haven't done my
planned 6.5.3-3 release yet.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Mon Dec 20 13:17:00 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA90725
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 13:16:37 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
NAA22477;
Mon, 20 Dec 1999 13:04:54 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912201804.NAA22477@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <18583.945702147@sss.pgh.pa.us> from Tom Lane at "Dec 20,
1999 10:02:27 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 20 Dec 1999 13:04:54 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
wieck@debis.com (Jan Wieck) writes:
Tom Lane wrote:
Dare I suggest that we should declare feature freeze *now*,
Only if the implementation of the temp file buffered deferred
trigger event queue isn't considered a feature,It's obviously a necessary fix. But no one seemed excited about an
early feature freeze anyway, so disregard that comment...
Yes, Tom, I was wondering about your early freeze proposal. If we
freeze, we may as well start beta. However, I believe it was you who
suggested Feb 1 rather than Jan 1 because you wanted to clean up some
things.
So, I assume we are scheduled for a Feb 1 beta, and anything Jan can get
done by then should be added, including any working implementation of
foreign keys or long tuples.
It doesn't have to be 100% tested, just working. Testing is for the beta
period. And Jan, others are ready to assist you. I didn't understand
foreign keys, but I think I have an idea about long tuples.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 13:15:00 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA90531
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 13:14:53 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
NAA22507;
Mon, 20 Dec 1999 13:09:46 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912201809.NAA22507@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG varsize - how to go on
In-Reply-To: <18624.945702561@sss.pgh.pa.us> from Tom Lane at "Dec 20,
1999 10:09:21 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 20 Dec 1999 13:09:46 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
wieck@debis.com (Jan Wieck) writes:
Would be best for me if you can leave out the pgindent run
for this release. I already have some small things as
patches, that I apply to the latest cvs update.Why not do what Vadim is doing for XLOG: commit your changes under
#ifdefs for a symbol that isn't yet defined?#ifdef LONG_ATTRS
new code
#else
old code
#endifI think this'd possibly be helpful anyway for study and debugging
purposes, since people could easily see what you've changed and where.
Eventually, after all the dust settles, we can get rid of the #if's
and the old-code fragments.
I think Vadim had a single entry point that he could control in that
way. Not sure Jan has such an entry point. If the stuff goes all over
the place, #ifdef can be hard to read as you are coding.
However, he may be able to get to a point with his new macros that he
can commit the changes and have long handling turned off until he is
happy with it. That would be nice so we can test it by just changing
the macro.
I don't normally like #ifdef'd patches of this sort, but as a temporary
measure during implementation I think it'd be better than keeping a
private set of files.And I fear
what's currently discussed about changing 4 column tabstops
would break them completely.Bruce doesn't want to do that, and I doubt anyone will force the issue
over his veto. But it would be nice to be able to do a pgindent run;
there's a lot of new code in this release.
I hope I didn't "veto" it. I just wanted to mention my reasons, and
look for other people to vote too. I have Vince, Peter, and Tom who
want 8-space tabs and 4-space indents. Because the old standard was
voted on by many more people, I need to hear additional votes to change
our standard.
Jan, can we run a pgindent on the current sources with the current tab
size unchanged? I don't think that would affect you very much.
However, I can wait until most of your code is committed. I don't
normally run pgindent until just before the final release date.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 13:19:04 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA90895
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 13:17:54 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
NAA22979;
Mon, 20 Dec 1999 13:14:51 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912201814.NAA22979@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: [COMMITTERS] pgsql/src/interfaces/libpgeasy
(libpgeasy.c)
In-Reply-To: <18832.945704839@sss.pgh.pa.us> from Tom Lane at "Dec 20,
1999 10:47:19 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 20 Dec 1999 13:14:51 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Clean up some minor gcc warnings. I'm not touching the
major one, though, which is the truly ugly stores into libpq private
storage. Can't you find a better way to do this?Yes, very ugly. I need some way to store my state information _inside_
the Result structure. Any ideas?One possibility is to add an application-defined field, say of void*
type, to PGconn and PGresult, plus set/get access functions for them.
This'd be a fairly general-purpose feature; I've seen it done in other
libraries that export objects of this sort.On the other hand, if libpq did have such a feature, it'd be nice if
libpgeasy didn't commandeer it but left it open for the application
to use. So maybe we need something else for libpgeasy.Since libpgeasy is new in the (core) distribution for this release,
perhaps it is not too late to consider an API change? If get_result,
set_result and friends returned a pointer to a two-element struct
(PGresult* and tuplenumber) instead of a raw PGresult*, the problem
would go away. More or less anyway ... I'm not quite sure where it'd
be OK to free() such a struct ...
I hear you. pgeasy was just an attempt to make C programming in
PostgreSQL easier. I am not sure how much it will get used, but it
seemed valuable, and a number of people were using it when it was in
contrib.
I figure the storage of the tuple at the end of the status field is
harmless enough.
Do people have any comments on it? I am willing to move it back into
contrib.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 13:23:01 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA91496
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 13:22:15 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
NAA24934;
Mon, 20 Dec 1999 13:20:39 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912201820.NAA24934@candle.pha.pa.us>
Subject: Re: [HACKERS] Re: initdb.sh fixed7
In-Reply-To: <199912201632.QAA15589@mtcc.demon.co.uk> from Keith Parks at "Dec
20, 1999 04:32:31 pm"
To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Date: Mon, 20 Dec 1999 13:20:39 -0500 (EST)
CC: peter_e@gmx.net, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I am now using:
POSTGRES_SUPERUSERID="`id -u 2>/dev/null || echo 0`"
Let's see how portable that is?
OOps,
"id -u" is a no-no on Solaris unless /usr/xpg4/bin is before /bin in
your path so we default to a userid of 0.And in miscinit we assert that UserID must not equal 0 which
causes an Abort().bash-2.03$ bin/postgres -O template1
DEBUG: Data Base System is starting up at Mon Dec 20 15:52:59 1999
DEBUG: Data Base System was shutdowned at Mon Dec 20 15:52:52 1999
DEBUG: CheckPoint record at (0, 152)
DEBUG: Redo record at (0, 152); Undo record at (0, 0)
DEBUG: NextTransactionId: 4621; NextOid: 0
DEBUG: Invalid NextTransactionId/NextOid
DEBUG: Data Base System is in production state at Mon Dec 20 15:52:59 1999POSTGRES backend interactive interface
$Revision: 1.137 $ $Date: 1999/11/16 06:13:35 $backend> CREATE VIEW pg_user AS SELECT usename, usesysid, usecreatedb, usetrace,
usesuper, usecatupd, '****
****'::text as passwd, valuntil FROM pg_shadow
TRAP: Failed Assertion("!(((bool) ((UserId) != 0))):", File: "miscinit.c", Line:
433)!(((bool) ((UserId) != 0))) (0) [No such file or directory]
Abort (core dumped)
bash-2.03$
Oh, this is bad news. I see what you are saying. In 6.5.*, we had
pg_id, which was used to do this. We still have pg_id, but I assume the
attempt was to remove reliance ont that in the new initdb.sh. Right
Peter?
If so, can you suggest a solution under Solaris for getting the user id
value?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 13:29:00 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA92765
for <pgsql-hackers@postgresql.org>;
Mon, 20 Dec 1999 13:28:58 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id NAA06066;
Mon, 20 Dec 1999 13:28:47 -0500
Message-ID: <385E7557.F7C6DDB9@wgcr.org>
Date: Mon, 20 Dec 1999 13:28:39 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Oleg Bartunov <oleg@sai.msu.su>
CC: Frans Van Elsacker <fve@atbib.be>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Cc: lamar.owen@wgcr.org
References: <Pine.GSO.3.96.SK.991219003326.9631A-100000@ra>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Oleg Bartunov wrote:
Frans,
I supposed you wrote about postgres with locale support ?
If so, I'd recommend you to test LC_ALL env. variable.
Redhat 6.1 by default set is as en_US, at least in my setup
and I spend 30 minutes to figure out why I had the same problem
you described ( in my case I tried koi8-r ).
When I set LC_ALL=koi8-r everything work fine.
The /etc/sysconfig/i18n scriptlet is a three-liner:
LANGUAGE=en_US
LC_ALL=en_US
LINGUAS=en_US
This script apparently is set up during the installation of RedHat -- it
does not belong to any installed RPM. I am going to find out what these
envvars should be set to for 'normal' operation (where the definition of
'normal' varies. There is little to no documentation on this
RedHat-ism.
I have also noted that the LC_ALL variable alters the collation even
when PostgreSQL is built WITHOUT --enable-locale -- on RedHat 6.1 the
locale support seems to be embedded into the glibc installation.
Again, little to no documentation that I have yet found. Oh well. Time
to do some reading.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Mon Dec 20 13:30:02 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA92868
for <pgsql-hackers@postgresql.org>;
Mon, 20 Dec 1999 13:29:23 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id NAA06073
for <pgsql-hackers@postgresql.org>; Mon, 20 Dec 1999 13:29:27 -0500
Message-ID: <385E7580.A959B61F@wgcr.org>
Date: Mon, 20 Dec 1999 13:29:20 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
CC: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] SPI header dependencies
References: <1260.945537650@sss.pgh.pa.us>
<199912181831.SAA26744@linda.lfix.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Oliver Elphick wrote:
Tom Lane wrote:
Proposed TODO:
* Re-examine list of header files that get installed, add/delete as neededI attach the list of extra include files that I needed to include in Debian's
postgresql-dev package
[snip]
I owe you again, Oliver. This list gives the postgres-dev package
everything needed to do SPI development?? Good thing I haven't done my
planned 6.5.3-3 release yet.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Mon Dec 20 14:38:01 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA08577;
Mon, 20 Dec 1999 14:37:43 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id OAA06201;
Mon, 20 Dec 1999 14:37:44 -0500
Message-ID: <385E857D.2AA5D56F@wgcr.org>
Date: Mon, 20 Dec 1999 14:37:33 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org, pgsql-ports@postgresql.org
Subject: SPI Headers -- RPM distribution
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Ok, thanks to Oliver and others, I think I may have a handle on which
header files to include in the postgresql-devel RPM for the ability to
compile backend modules.
So, I'm going to put these headers under /usr/include/pgsql/backend.
Any objections or comments?
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Mon Dec 20 14:57:01 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id OAA16776;
Mon, 20 Dec 1999 14:56:53 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-ports@postgreSQL.org
id m1208m7-0003kHC; Mon, 20 Dec 99 20:47 MET
Message-Id: <m1208m7-0003kHC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] SPI Headers -- RPM distribution
To: lamar.owen@wgcr.org (Lamar Owen)
Date: Mon, 20 Dec 1999 20:47:19 +0100 (MET)
Cc: pgsql-hackers@postgreSQL.org, pgsql-ports@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <385E857D.2AA5D56F@wgcr.org> from "Lamar Owen" at Dec 20,
99 02:37:33 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Ok, thanks to Oliver and others, I think I may have a handle on which
header files to include in the postgresql-devel RPM for the ability to
compile backend modules.So, I'm going to put these headers under /usr/include/pgsql/backend.
Any objections or comments?
I'm not totally sure, but IIRC the dependency list was the
one of spi.c, no?
If so, it's IMHO wrong. A user written module doesn't need
anything, spi.c needs (especially the parts included by
spi_priv.h). SPI hides many internals by making the prepared
plan an opaque object (void *).
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 20 15:31:02 1999
Received: from villa.bildbasen.se (villa.bildbasen.se [193.45.225.97])
by hub.org (8.9.3/8.9.3) with SMTP id PAA25265
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 15:30:26 -0500 (EST) (envelope-from goran@kirra.net)
Received: (qmail 2485 invoked from network); 20 Dec 1999 20:29:53 -0000
Received: from a112.dial.kiruna.se (HELO kirra.net) (193.45.238.12)
by villa.bildbasen.se with SMTP; 20 Dec 1999 20:29:53 -0000
Sender: goran
Message-ID: <385E9192.226CC37D@kirra.net>
Date: Mon, 20 Dec 1999 21:29:06 +0100
From: Goran Thyni <goran@kirra.net>
Organization: kirra.net
X-Mailer: Mozilla 4.6 [en] (X11; U; Linux 2.2.13 i586)
X-Accept-Language: sv, en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: "neil d. quiogue" <nquiogue@ieee.org>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: QUESTION: Replication
References: <199912201508.KAA20572@candle.pha.pa.us>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Bruce Momjian wrote:
We need major work in this area, or at least a plan and an FAQ item.
We are getting major questions on this, and I don't know enough even to
make an FAQ item telling people their options.
My 2 cents, or 2 ���ren since I'm a Swede, on this:
It is pretty simple to build a replication with pg_dump, transfer,
empty replic and reload.
But if we want "live replicas" we better base our efforts on a
mechanism using WAL-logs to rollforward the replicas.
regards,
-----------------
G���ran Thyni
On quiet nights you can hear Windows NT reboot!
From bouncefilter Mon Dec 20 15:42:02 1999
Received: from biology.nmsu.edu (biology.NMSU.Edu [128.123.5.72])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA27850;
Mon, 20 Dec 1999 15:41:14 -0500 (EST)
(envelope-from brook@biology.nmsu.edu)
Received: (from brook@localhost) by biology.nmsu.edu (8.8.8/8.8.8) id
NAA09745;
Mon, 20 Dec 1999 13:41:12 -0700 (MST)
Date: Mon, 20 Dec 1999 13:41:12 -0700 (MST)
Message-Id: <199912202041.NAA09745@biology.nmsu.edu>
X-Authentication-Warning: biology.nmsu.edu: brook set sender to
brook@biology.nmsu.edu using -f
From: Brook Milligan <brook@biology.nmsu.edu>
To: wieck@debis.com
CC: lamar.owen@wgcr.org, pgsql-hackers@postgreSQL.org,
pgsql-ports@postgreSQL.org
In-reply-to: <m1208m7-0003kHC@orion.SAPserv.Hamburg.dsh.de> (wieck@debis.com)
Subject: Re: [HACKERS] SPI Headers -- RPM distribution
References: <m1208m7-0003kHC@orion.SAPserv.Hamburg.dsh.de>
I'm not totally sure, but IIRC the dependency list was the
one of spi.c, no?
I've had problems just including spi.h and trigger.h, actually.
Cheers,
Brook
From bouncefilter Mon Dec 20 15:59:02 1999
Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net
[194.217.242.90]) by hub.org (8.9.3/8.9.3) with ESMTP id PAA30117
for <pgsql-hackers@postgresql.org>;
Mon, 20 Dec 1999 15:58:57 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1)
id 1209sD-000HZA-0W; Mon, 20 Dec 1999 20:57:42 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id UAA07348; Mon, 20 Dec 1999 20:57:14 GMT
Message-Id: <199912202057.UAA07348@mtcc.demon.co.uk>
Date: Mon, 20 Dec 1999 20:57:14 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: Re: [HACKERS] Re: initdb.sh fixed7
To: pgman@candle.pha.pa.us
Cc: peter_e@gmx.net, pgsql-hackers@postgresql.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: LgT7B3MK3MxbgAwPvzAMgA==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
Bruce Momjian <pgman@candle.pha.pa.us>
Oh, this is bad news. I see what you are saying. In 6.5.*, we had
pg_id, which was used to do this. We still have pg_id, but I assume the
attempt was to remove reliance ont that in the new initdb.sh. Right
Peter?If so, can you suggest a solution under Solaris for getting the user id
value?
I wonder if pg_id was the result of a similar portability
discussion/problem some years ago ;-)
I'd vote for keeping pg_id, if then we are free'd from all the
portability issues. (getpwent() is portable?)
Keith
From bouncefilter Mon Dec 20 16:29:02 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id QAA36126;
Mon, 20 Dec 1999 16:28:50 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-ports@postgreSQL.org
id m120AD3-0003kHC; Mon, 20 Dec 99 22:19 MET
Message-Id: <m120AD3-0003kHC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] SPI Headers -- RPM distribution
To: brook@biology.nmsu.edu (Brook Milligan)
Date: Mon, 20 Dec 1999 22:19:13 +0100 (MET)
Cc: wieck@debis.com, lamar.owen@wgcr.org, pgsql-hackers@postgreSQL.org,
pgsql-ports@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912202041.NAA09745@biology.nmsu.edu> from "Brook Milligan" at
Dec 20, 99 01:41:12 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
I'm not totally sure, but IIRC the dependency list was the
one of spi.c, no?I've had problems just including spi.h and trigger.h, actually.
This is from gcc -M for contrib/spi/autoinc.c:
src/backend/fmgr.h
src/include/access/attnum.h
src/include/access/funcindex.h
src/include/access/heapam.h
src/include/access/htup.h
src/include/access/relscan.h
src/include/access/sdir.h
src/include/access/skey.h
src/include/access/strat.h
src/include/access/transam.h
src/include/access/tupdesc.h
src/include/access/tupmacs.h
src/include/access/xact.h
src/include/c.h
src/include/catalog/pg_am.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_class.h
src/include/catalog/pg_language.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_type.h
src/include/commands/trigger.h
src/include/config.h
src/include/executor/execdefs.h
src/include/executor/execdesc.h
src/include/executor/executor.h
src/include/executor/hashjoin.h
src/include/executor/spi.h
src/include/executor/tuptable.h
src/include/lib/fstack.h
src/include/nodes/execnodes.h
src/include/nodes/memnodes.h
src/include/nodes/nodes.h
src/include/nodes/params.h
src/include/nodes/parsenodes.h
src/include/nodes/pg_list.h
src/include/nodes/plannodes.h
src/include/nodes/primnodes.h
src/include/nodes/relation.h
src/include/os.h
src/include/parser/parse_node.h
src/include/postgres.h
src/include/postgres_ext.h
src/include/rewrite/prs2lock.h
src/include/storage/block.h
src/include/storage/buf.h
src/include/storage/buf_internals.h
src/include/storage/buffile.h
src/include/storage/bufmgr.h
src/include/storage/bufpage.h
src/include/storage/fd.h
src/include/storage/ipc.h
src/include/storage/item.h
src/include/storage/itemid.h
src/include/storage/itemptr.h
src/include/storage/lmgr.h
src/include/storage/lock.h
src/include/storage/off.h
src/include/storage/page.h
src/include/storage/shmem.h
src/include/storage/spin.h
src/include/tcop/dest.h
src/include/tcop/pquery.h
src/include/tcop/tcopprot.h
src/include/tcop/utility.h
src/include/utils/array.h
src/include/utils/builtins.h
src/include/utils/datetime.h
src/include/utils/datum.h
src/include/utils/dt.h
src/include/utils/elog.h
src/include/utils/fcache.h
src/include/utils/geo_decls.h
src/include/utils/hsearch.h
src/include/utils/inet.h
src/include/utils/int8.h
src/include/utils/lztext.h
src/include/utils/mcxt.h
src/include/utils/memutils.h
src/include/utils/nabstime.h
src/include/utils/numeric.h
src/include/utils/palloc.h
src/include/utils/pg_lzcompress.h
src/include/utils/portal.h
src/include/utils/rel.h
src/include/utils/syscache.h
src/include/utils/tqual.h
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 20 16:47:06 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA41430;
Mon, 20 Dec 1999 16:46:54 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id QAA06389;
Mon, 20 Dec 1999 16:47:00 -0500
Message-ID: <385EA3CA.CD7B1437@wgcr.org>
Date: Mon, 20 Dec 1999 16:46:50 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Jan Wieck <wieck@debis.com>
CC: pgsql-hackers@postgreSQL.org, pgsql-ports@postgreSQL.org
Subject: Re: [HACKERS] SPI Headers -- RPM distribution
References: <m1208m7-0003kHC@orion.SAPserv.Hamburg.dsh.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Jan Wieck wrote:
Ok, thanks to Oliver and others, I think I may have a handle on which
header files to include in the postgresql-devel RPM for the ability to
compile backend modules.
I'm not totally sure, but IIRC the dependency list was the
one of spi.c, no?
If so, it's IMHO wrong. A user written module doesn't need
anything, spi.c needs (especially the parts included by
spi_priv.h). SPI hides many internals by making the prepared
plan an opaque object (void *).
As is probably obvious from my posting, I have never built an SPI module
-- however, I do want to make the RPM's SPI-friendly. Oliver posted the
list of includes that he ships in the Debian packages -- I am digesting
that list now, comparing with a list of the files in the distribution
tarball.
While including the entire source tree is a last resort, it should be
possible to allow SPI programming without the whole 28MB unbuilt source
tree. According to the documentation, all an SPI module needs is to
#include executor/spi.h.
Well, spi.h needs (all includes after full expansion via /usr/lib/cpp
-I../../include -I../../backend -M spi.h, stripping the system header
files, stripping the ../../, reformatting to one header per line, and
sorting):
(paths relative to PG-SOURCE-TREE/src/)
backend/fmgr.h
include/access/attnum.h
include/access/funcindex.h
include/access/heapam.h
include/access/htup.h
include/access/ibit.h
include/access/itup.h
include/access/relscan.h
include/access/sdir.h
include/access/skey.h
include/access/strat.h
include/access/transam.h
include/access/tupdesc.h
include/access/tupmacs.h
include/access/xact.h
include/c.h
include/catalog/catname.h
include/catalog/pg_am.h
include/catalog/pg_attribute.h
include/catalog/pg_class.h
include/catalog/pg_index.h
include/catalog/pg_language.h
include/catalog/pg_proc.h
include/catalog/pg_type.h
include/config.h
include/executor/execdefs.h
include/executor/execdesc.h
include/executor/executor.h
include/executor/hashjoin.h
include/executor/tuptable.h
include/lib/fstack.h
include/nodes/execnodes.h
include/nodes/memnodes.h
include/nodes/nodes.h
include/nodes/params.h
include/nodes/parsenodes.h
include/nodes/pg_list.h
include/nodes/plannodes.h
include/nodes/primnodes.h
include/nodes/relation.h
include/os.h
include/parser/parse_node.h
include/parser/parse_type.h
include/postgres.h
include/postgres_ext.h
include/rewrite/prs2lock.h
include/storage/block.h
include/storage/buf.h
include/storage/buf_internals.h
include/storage/bufmgr.h
include/storage/bufpage.h
include/storage/fd.h
include/storage/ipc.h
include/storage/item.h
include/storage/itemid.h
include/storage/itemptr.h
include/storage/lmgr.h
include/storage/lock.h
include/storage/off.h
include/storage/page.h
include/storage/shmem.h
include/storage/sinvaladt.h
include/storage/spin.h
include/tcop/dest.h
include/tcop/pquery.h
include/tcop/tcopprot.h
include/tcop/utility.h
include/utils/array.h
include/utils/builtins.h
include/utils/datetime.h
include/utils/datum.h
include/utils/dt.h
include/utils/elog.h
include/utils/fcache.h
include/utils/geo_decls.h
include/utils/hsearch.h
include/utils/inet.h
include/utils/int8.h
include/utils/mcxt.h
include/utils/memutils.h
include/utils/nabstime.h
include/utils/numeric.h
include/utils/palloc.h
include/utils/portal.h
include/utils/rel.h
include/utils/syscache.h
include/utils/tqual.h
(87 header files)
Well, analyzing spi.c the same way, it needs only 90 headers -- diff
tells me that the ONLY additional headers needed by spi.c that are not
needed by spi.h are spi.h (duh), spi_priv.h, and printtup.h.
To reiterate my thought -- a full source tree should not be necessary to
do meaningful work on PostgreSQL -- that's the whole reason for
existence of the binary distributions. I am going to incorporate the
above listed headers in the postgresql-devel RPM -- I am not at all sure
where I need to put them, however. The PostgreSQL include directory
under the RPM installation is /usr/include/pgsql (not my choice, but
would be hard to retroactively change) -- maybe put these files under
that in either backend, or SPI??
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Mon Dec 20 18:28:04 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA63703
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 18:27:10 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m120C3U-0003kHC; Tue, 21 Dec 99 00:17 MET
Message-Id: <m120C3U-0003kHC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Tuple toaster (was: Re: LONG varsize - how to go on)
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Tue, 21 Dec 1999 00:17:28 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912201809.NAA22507@candle.pha.pa.us> from "Bruce Momjian" at
Dec 20, 99 01:09:46 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Bruce Momjian wrote:
I think Vadim had a single entry point that he could control in that
way. Not sure Jan has such an entry point. If the stuff goes all over
the place, #ifdef can be hard to read as you are coding.
Sure, there will be some more entry points this time. But as
far as I see up to now, not too many in the beginning. And
for storing values, they're all located in heapam.c.
Since we decided not to create a separate LONG datatype, and
not doing LONG attributes alone (compression at some point
too), I looked for some unique name for it - and found one.
The characters 'toast' did not show up on a case insensitive
grep over the entire CVS tree. Thus, I'll call it
tuple toaster
subsequently. I think there are enough similarities to a
toaster in this case. If you take a bread (tuple) and toast
some of the slices (attributes), anything can work as you
want and it will smell and taste delicious. In some cases,
slices might get burned (occationally hitting an indexed
value), taste bitter and it will stink.
BTW: The idea itself was stolen from toast/untoast, a GSM
voice data compression/decompression tool.
I'll commit some more changes that put in the basics #ifdef'd
out soon.
Bruce doesn't want to do that, and I doubt anyone will force the issue
over his veto. But it would be nice to be able to do a pgindent run;
there's a lot of new code in this release.I hope I didn't "veto" it. I just wanted to mention my reasons, and
look for other people to vote too. I have Vince, Peter, and Tom who
want 8-space tabs and 4-space indents. Because the old standard was
voted on by many more people, I need to hear additional votes to change
our standard.
Who uses an editor that cannot distinguish between tabstop
and shiftwidth? And which editors are these - are they useful
for programming at all?
Anyway, I vote for 8-space tabs and 4-space indents too. My
.exrc set's up 4-space tabs actually, and it's a real mess
when editing non-PG sources.
Jan, can we run a pgindent on the current sources with the current tab
size unchanged? I don't think that would affect you very much.
However, I can wait until most of your code is committed. I don't
normally run pgindent until just before the final release date.
You can do anything you want soon. I intend only to put the
#ifdef'd out calls to the toaster into heapam.c, and create a
new tuptoaster.c in the same location, again all code
#ifdef'd out. From then on, I can work CVS based without any
interference.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 20 18:47:04 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA68826
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 18:46:33 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m120CMQ-0003kLC; Tue, 21 Dec 99 00:37 MET
Message-Id: <m120CMQ-0003kLC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: LONG vs. Toaster
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Tue, 21 Dec 1999 00:37:02 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Well,
AFAIK we had a consensus on making "try to compress
attributes before moving off" a runtime, per column
configuration option. And that's what I'm after.
This might interfere with the LZTEXT data type as is. Since
this new data type isn't released yet, I'll have to remove it
again before freeze. The compressor/decompressor will become
part of the toaster.
Needs to revert the changes to pg_rewrite too, so the next
release will NOT gain any bigger rules. But to release it and
later fight problems that I already see, only to enable
bigger rules right now, is IMHO the wrong decision.
Any complaints?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 20 19:46:05 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id TAA80337
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 19:45:40 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m120DHd-0003kLC; Tue, 21 Dec 99 01:36 MET
Message-Id: <m120DHd-0003kLC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: T-O-A-S-T meaning
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Tue, 21 Dec 1999 01:36:09 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Sorry, can't resist :-)
Any time I see such a name for a piece of software, I'm
trying to figure out what the single characters could stand
for. Thus I'm looking for a good interpretation of TOAST. So
far I have
Tuple
Outgrown
Attribute
Storage
Technique
It somehow reflects what the toaster should do for us.
Well, outgrown could be replaced by obscure, off-beat, off-
side, omnipotent, outcast and many more. Omnipotent is my
second choice.
Some other ideas?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Mon Dec 20 23:12:07 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA16766
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 23:11:17 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA09407;
Mon, 20 Dec 1999 21:10:25 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912210210.VAA09407@candle.pha.pa.us>
Subject: Re: [HACKERS] T-O-A-S-T meaning
In-Reply-To: <m120DHd-0003kLC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 21, 1999 01:36:09 am"
To: Jan Wieck <wieck@debis.com>
Date: Mon, 20 Dec 1999 21:09:10 -0500 (EST)
CC: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sorry, can't resist :-)
Any time I see such a name for a piece of software, I'm
trying to figure out what the single characters could stand
for. Thus I'm looking for a good interpretation of TOAST. So
far I haveTuple
Outgrown
Attribute
Storage
Technique
Tuple Overflow Attribute Storage Technique
I thought "slicer" would be more natural.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 21 00:42:08 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id AAA34136
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 00:41:25 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA09459;
Mon, 20 Dec 1999 21:13:42 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912210213.VAA09459@candle.pha.pa.us>
Subject: Re: [HACKERS] Tuple toaster (was: Re: LONG varsize - how to go on)
In-Reply-To: <m120C3U-0003kHC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 21, 1999 00:17:28 am"
To: Jan Wieck <wieck@debis.com>
Date: Mon, 20 Dec 1999 21:12:27 -0500 (EST)
CC: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
I think Vadim had a single entry point that he could control in that
way. Not sure Jan has such an entry point. If the stuff goes all over
the place, #ifdef can be hard to read as you are coding.Sure, there will be some more entry points this time. But as
far as I see up to now, not too many in the beginning. And
for storing values, they're all located in heapam.c.
Good.
Who uses an editor that cannot distinguish between tabstop
and shiftwidth? And which editors are these - are they useful
for programming at all?Anyway, I vote for 8-space tabs and 4-space indents too. My
.exrc set's up 4-space tabs actually, and it's a real mess
when editing non-PG sources.
OK, that tips the scales in favor of 8-char tabs. My micro-emacs can't
handle different indent and tab sizes, but that is an old non-X-based
editor. I then checked Crisp, my new X editor, and I can't see how to
that either.
However, I don't do that much coding, so if people want to go for 8-byte
tabs and 4-byte indent, we can do that.
Any objections on for that?
You can do anything you want soon. I intend only to put the
#ifdef'd out calls to the toaster into heapam.c, and create a
new tuptoaster.c in the same location, again all code
#ifdef'd out. From then on, I can work CVS based without any
interference.
Let me know.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 23:12:09 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA16781
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 23:11:22 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA09508;
Mon, 20 Dec 1999 21:15:29 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912210215.VAA09508@candle.pha.pa.us>
Subject: Re: [HACKERS] LONG vs. Toaster
In-Reply-To: <m120CMQ-0003kLC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 21, 1999 00:37:02 am"
To: Jan Wieck <wieck@debis.com>
Date: Mon, 20 Dec 1999 21:14:14 -0500 (EST)
CC: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Well,
AFAIK we had a consensus on making "try to compress
attributes before moving off" a runtime, per column
configuration option. And that's what I'm after.This might interfere with the LZTEXT data type as is. Since
this new data type isn't released yet, I'll have to remove it
again before freeze. The compressor/decompressor will become
part of the toaster.Needs to revert the changes to pg_rewrite too, so the next
release will NOT gain any bigger rules. But to release it and
later fight problems that I already see, only to enable
bigger rules right now, is IMHO the wrong decision.
Agreed. There are over five weeks left. Let's see what happens as we
get closer.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 20 23:55:07 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA23383
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 23:54:24 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id XAA06366;
Mon, 20 Dec 1999 23:53:42 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] T-O-A-S-T meaning
In-reply-to: <199912210210.VAA09407@candle.pha.pa.us>
References: <199912210210.VAA09407@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Mon, 20 Dec 1999 21:09:10 -0500"
Date: Mon, 20 Dec 1999 23:53:42 -0500
Message-ID: <6363.945752022@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Thus I'm looking for a good interpretation of TOAST. So
far I haveTuple
Outgrown
Attribute
Storage
Technique
Tuple Overflow Attribute Storage Technique
The Outsized-Attribute Storage Technique ?
I thought "slicer" would be more natural.
Only if you can provide an acronym...
I have a project slogan, if Jan wants one:
"TOAST --- the best thing since sliced bread!"
regards, tom lane
From bouncefilter Tue Dec 21 00:00:08 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA23930
for <pgsql-hackers@postgreSQL.org>;
Mon, 20 Dec 1999 23:59:37 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id XAA06396;
Mon, 20 Dec 1999 23:57:34 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] LONG vs. Toaster
In-reply-to: <199912210215.VAA09508@candle.pha.pa.us>
References: <199912210215.VAA09508@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Mon, 20 Dec 1999 21:14:14 -0500"
Date: Mon, 20 Dec 1999 23:57:34 -0500
Message-ID: <6393.945752254@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
This might interfere with the LZTEXT data type as is. Since
this new data type isn't released yet, I'll have to remove it
again before freeze. The compressor/decompressor will become
part of the toaster.Needs to revert the changes to pg_rewrite too, so the next
release will NOT gain any bigger rules. But to release it and
later fight problems that I already see, only to enable
bigger rules right now, is IMHO the wrong decision.
Agreed.
Yes. I thought that LZTEXT was redundant as soon as we agreed that
compression could be part of the out-of-line storage mechanism.
Better to pull it now than have to support it long after it has
no purpose. We can struggle along with limited-length rules for
a little bit longer.
regards, tom lane
From bouncefilter Tue Dec 21 00:08:09 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA27953;
Tue, 21 Dec 1999 00:08:08 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA06453;
Tue, 21 Dec 1999 00:07:07 -0500 (EST)
To: Lamar Owen <lamar.owen@wgcr.org>
cc: pgsql-hackers@postgreSQL.org, pgsql-ports@postgreSQL.org
Subject: Re: [HACKERS] SPI Headers -- RPM distribution
In-reply-to: <385E857D.2AA5D56F@wgcr.org>
References: <385E857D.2AA5D56F@wgcr.org>
Comments: In-reply-to Lamar Owen <lamar.owen@wgcr.org>
message dated "Mon, 20 Dec 1999 14:37:33 -0500"
Date: Tue, 21 Dec 1999 00:07:07 -0500
Message-ID: <6450.945752827@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Lamar Owen <lamar.owen@wgcr.org> writes:
So, I'm going to put these headers under /usr/include/pgsql/backend.
Some of these headers already are exported. The right thing is to
export the rest in parallel, not throw in an extra level of directory.
The path from /usr/include/pgsql should be the same as the path from
.../src/include in the source tree.
The only real problem with doing that is with fmgr.h, which for reasons
that I don't fathom isn't in src/include at all. Seems to me it would
be a good idea to have fmgr.h (and I guess parse.h too) put into
src/include, and then we could get rid of -I../backend from the switches
used for backend compilations.
A good longer-term project would be to reduce the number of headers that
we need to export. 80 include files to compile spi.h? Ugh.
regards, tom lane
From bouncefilter Tue Dec 21 01:02:08 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id BAA39526
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 01:01:26 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA18726;
Tue, 21 Dec 1999 00:48:25 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912210548.AAA18726@candle.pha.pa.us>
Subject: Re: [HACKERS] T-O-A-S-T meaning
In-Reply-To: <6363.945752022@sss.pgh.pa.us> from Tom Lane at "Dec 20,
1999 11:53:42 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 21 Dec 1999 00:48:25 -0500 (EST)
CC: Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
The Outsized-Attribute Storage Technique ?
I thought "slicer" would be more natural.
Only if you can provide an acronym...
I have a project slogan, if Jan wants one:
"TOAST --- the best thing since sliced bread!"
Nice.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 21 04:05:10 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA78595
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 04:04:27 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id KAA96826
for <pgsql-hackers@postgreSQL.org>; Tue, 21 Dec 1999 10:04:16 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <Y93Q8QJR>; Tue, 21 Dec 1999 10:04:16 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1D7@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: AW: [HACKERS] LONG varsize - how to go on (pgindent)
Date: Tue, 21 Dec 1999 10:04:15 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
Bruce doesn't want to do that, and I doubt anyone will
force the issue
over his veto. But it would be nice to be able to do a
pgindent run;
there's a lot of new code in this release.
I hope I didn't "veto" it. I just wanted to mention my reasons, and
look for other people to vote too. I have Vince, Peter, and Tom who
want 8-space tabs and 4-space indents. Because the old standard was
voted on by many more people, I need to hear additional votes
to change
our standard.
I think the idea at that time was also, that with a tab only setup people
can
look at the code with 2 space, 3 space and 4 space indents, whatever suits
them best.
I like the current setup. Our company uses the same.
Most Programmers editors (and vi) can handle the 4 space tabs perfectly.
The pager less handles them also.
Andreas
From bouncefilter Tue Dec 21 06:27:14 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id GAA01938
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 06:27:12 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 4158 invoked by uid 1001); 21 Dec 1999 11:27:12 -0000
Date: Tue, 21 Dec 1999 06:27:12 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] T-O-A-S-T meaning
In-Reply-To: <199912210548.AAA18726@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.05.9912210626470.4096-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 21 Dec 1999, Bruce Momjian wrote:
The Outsized-Attribute Storage Technique ?
I thought "slicer" would be more natural.
Only if you can provide an acronym...
I have a project slogan, if Jan wants one:
"TOAST --- the best thing since sliced bread!"
Nice.
And don't forget the theme song by Haywood Banks.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Tue Dec 21 07:14:12 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id HAA14280
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 07:13:45 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 4238 invoked by uid 1001); 21 Dec 1999 12:13:46 -0000
Date: Tue, 21 Dec 1999 07:13:46 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
cc: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)
In-Reply-To:
<219F68D65015D011A8E000006F8590C603FDC1D7@sdexcsrv1.f000.d0188.sd.spardat.at>
Message-ID: <Pine.BSF.4.05.9912210707210.4096-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 21 Dec 1999, Zeugswetter Andreas SB wrote:
Bruce doesn't want to do that, and I doubt anyone will
force the issue
over his veto. But it would be nice to be able to do a
pgindent run;
there's a lot of new code in this release.
I hope I didn't "veto" it. I just wanted to mention my reasons, and
look for other people to vote too. I have Vince, Peter, and Tom who
want 8-space tabs and 4-space indents. Because the old standard was
voted on by many more people, I need to hear additional votes
to change
our standard.
Whoa. Wait. Timeout! If I ever said I liked 8 space anythings I musta
mistyped, been half asleep, not paying attention or something. I'm
flexible, the only thing I want is a noticable indent and tab; I don't
really care if it's anywhere between one and four, but eight is too many.
Actually the only comment I remember making is that I always preferred
blocks like this:
if( ) {
// do something
}
which I guess isn't very popular. I did, however, utilize the xemacs
indent thing that Tom Lane posted here a couple weeks ago. Thanks Tom!
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Tue Dec 21 10:34:16 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA55438
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 10:33:35 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m120R8g-0003kHC; Tue, 21 Dec 99 16:23 MET
Message-Id: <m120R8g-0003kHC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] T-O-A-S-T meaning
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Tue, 21 Dec 1999 16:23:50 +0100 (MET)
Cc: tgl@sss.pgh.pa.us, wieck@debis.com, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912210548.AAA18726@candle.pha.pa.us> from "Bruce Momjian" at
Dec 21, 99 00:48:25 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
The Outsized-Attribute Storage Technique ?
"TOAST --- the best thing since sliced bread!"
Nice.
What can I say - LOL!
And I don't think that "slicer" fit's like that. It'll not
only slice 'em, it can squeeze them into the master tuple
too.
High cross-bar (is that the right wording?) though, but I
like it.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Tue Dec 21 10:38:15 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA56059
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 10:37:27 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA07185;
Tue, 21 Dec 1999 10:36:40 -0500 (EST)
To: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)
In-reply-to:
<219F68D65015D011A8E000006F8590C603FDC1D7@sdexcsrv1.f000.d0188.sd.spardat.at>
References:
<219F68D65015D011A8E000006F8590C603FDC1D7@sdexcsrv1.f000.d0188.sd.spardat.at>
Comments: In-reply-to Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
message dated "Tue, 21 Dec 1999 10:04:15 +0100"
Date: Tue, 21 Dec 1999 10:36:40 -0500
Message-ID: <7181.945790600@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
I think the idea at that time was also, that with a tab only setup
people can look at the code with 2 space, 3 space and 4 space indents,
whatever suits them best.
Not really. If the code still looked OK at different tab widths, people
wouldn't be complaining. A fairly typical example is
if (root->query_pathkeys == NIL ||
pathkeys_contained_in(root->query_pathkeys,
final_rel->cheapestpath->pathkeys))
{
root->query_pathkeys = final_rel->cheapestpath->pathkeys;
which is really
<tb>if (root->query_pathkeys == NIL ||
<tb><tb>pathkeys_contained_in(root->query_pathkeys,
<tb><tb><tb><tb><tb><tb><tb> final_rel->cheapestpath->pathkeys))
<tb>{
<tb><tb>root->query_pathkeys = final_rel->cheapestpath->pathkeys;
so at 8-space tab expansion it looks like
if (root->query_pathkeys == NIL ||
pathkeys_contained_in(root->query_pathkeys,
final_rel->cheapestpath->pathkeys))
{
root->query_pathkeys = final_rel->cheapestpath->pathkeys;
and in fact at any tab spacing other than 4, it will look bizarre.
Things get even worse for declarations and comments in the right margin:
typedef struct Unique
{
Plan plan; /* noname node flattened out */
Oid nonameid;
int keycount;
char *uniqueAttr; /* NULL if all attrs, or unique attribute
* name */
AttrNumber uniqueAttrNum; /* attribute number of attribute to select
* distinct on */
UniqueState *uniquestate;
} Unique;
is really
typedef struct Unique
{
<tb>Plan<tb><tb>plan;<tb><tb><tb>/* noname node flattened out */
<tb>Oid<tb><tb><tb>nonameid;
<tb>int<tb><tb><tb>keycount;
<tb>char<tb> *uniqueAttr;<tb><tb>/* NULL if all attrs, or unique attribute
<tb><tb><tb><tb><tb><tb><tb><tb> * name */
<tb>AttrNumber<tb>uniqueAttrNum;<tb>/* attribute number of attribute to select
<tb><tb><tb><tb><tb><tb><tb><tb> * distinct on */
<tb>UniqueState *uniquestate;
} Unique;
so at 8-space tabs it looks like
typedef struct Unique
{
Plan plan; /* noname node flattened out */
Oid nonameid;
int keycount;
char *uniqueAttr; /* NULL if all attrs, or unique attribute
* name */
AttrNumber uniqueAttrNum; /* attribute number of attribute to select
* distinct on */
UniqueState *uniquestate;
} Unique;
and again, it's not going to look right at any tab width except 4.
Most Programmers editors (and vi) can handle the 4 space tabs perfectly.
Anyone who can't persuade his editor to show tabs as 4 spaces isn't
going to be contributing to Postgres, because he's not going to find
the code readable. So it's not surprising that the population of this
list considers it a non-problem; natural selection has eliminated the
people who might complain. But I'd like to get rid of that barrier
to new contributors. How many potential contributors have we lost
because they took one look at the code and decided it was too ugly
even to think of working with?
If changing the tabs is too radical, it'd at least be a good idea to add
a section to the Developers' FAQ explaining how to set up all the common
editors for Postgres. I can contribute a recipe for Emacs, but I have
no idea how to do it for vi or anything else...
regards, tom lane
From bouncefilter Tue Dec 21 10:41:16 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA56605;
Tue, 21 Dec 1999 10:40:22 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id KAA07577;
Tue, 21 Dec 1999 10:40:24 -0500
Message-ID: <385F9F62.F6CF5D92@wgcr.org>
Date: Tue, 21 Dec 1999 10:40:18 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: pgsql-hackers@postgreSQL.org, pgsql-ports@postgreSQL.org
Subject: Re: [HACKERS] SPI Headers -- RPM distribution
References: <385E857D.2AA5D56F@wgcr.org> <6450.945752827@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Lamar Owen <lamar.owen@wgcr.org> writes:
So, I'm going to put these headers under /usr/include/pgsql/backend.
Some of these headers already are exported. The right thing is to
export the rest in parallel, not throw in an extra level of directory.
The path from /usr/include/pgsql should be the same as the path from
.../src/include in the source tree.
Good point.
The only real problem with doing that is with fmgr.h, which for reasons
that I don't fathom isn't in src/include at all. Seems to me it would
be a good idea to have fmgr.h (and I guess parse.h too) put into
src/include, and then we could get rid of -I../backend from the switches
used for backend compilations.
Also, I have noticed that some headers are #included with <>, while
others are included with "". Now, I understand that system headers
should be included with <>, but I'm seeing PostgreSQL headers wrapped
with <>. This makes the cpp -M variants a little confusing -- while
tracing down the header dependencies, I started using cpp -MM, which
only follows user headers and not system headers -- but it doesn't get
all of the headers.
And that fmgr.h thingy -- ewww. I'm sure there is a reason somewhere
that it is in backend, but it escapes me as to why.
A good longer-term project would be to reduce the number of headers that
we need to export. 80 include files to compile spi.h? Ugh.
After reading Jan's message about the list of dependencies for spi.c
containing more than the dependencies for a user SPI module, I was
prepared to see alot less headers -- and was quite disappointed to see
87 headers show up.
My goal is to provide the minimum required to build things for the
backend for those who want to do so, without requiring them to install a
source tarball and relearn where all of the files are located. Like I
said, if I have to provide a complete source tarball to do some things,
I will -- I just would rather not. If someone wants the source to
study, they can install the src.rpm and play to their hearts' content --
and they can then rebuild the whole package in a manner consistent with
the standard RPM installation with a single command, and not have to
relearn anything.
So, taking your suggestion, I'm going to add all these required headers
to the RPM package as part of the postgresql-devel RPM. Since RPM's
database handles the aspect of what files belong to what package, it is
redundant to place these SPI includes in a separate place -- and then
developers only need to properly set the location of the PostgreSQL
include tree once (/usr/include/pgsql).
I will try to fully document these changes -- and am building this RPM
as a beta RPM until such time as it is verified to work for those
developing SPI modules under the RPM installation.
Thanks Tom.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Tue Dec 21 10:49:16 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA58348;
Tue, 21 Dec 1999 10:48:18 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA07266;
Tue, 21 Dec 1999 10:47:16 -0500 (EST)
To: Lamar Owen <lamar.owen@wgcr.org>
cc: pgsql-hackers@postgreSQL.org, pgsql-ports@postgreSQL.org
Subject: Re: [HACKERS] SPI Headers -- RPM distribution
In-reply-to: <385F9F62.F6CF5D92@wgcr.org>
References: <385E857D.2AA5D56F@wgcr.org> <6450.945752827@sss.pgh.pa.us>
<385F9F62.F6CF5D92@wgcr.org>
Comments: In-reply-to Lamar Owen <lamar.owen@wgcr.org>
message dated "Tue, 21 Dec 1999 10:40:18 -0500"
Date: Tue, 21 Dec 1999 10:47:16 -0500
Message-ID: <7263.945791236@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Lamar Owen <lamar.owen@wgcr.org> writes:
Also, I have noticed that some headers are #included with <>, while
others are included with "". Now, I understand that system headers
should be included with <>, but I'm seeing PostgreSQL headers wrapped
with <>. This makes the cpp -M variants a little confusing -- while
tracing down the header dependencies, I started using cpp -MM, which
only follows user headers and not system headers -- but it doesn't get
all of the headers.
Bruce has done a nice job of cleaning that up in current sources, but
yes, 6.5.* and older releases were mighty inconsistent about header
inclusions.
regards, tom lane
From bouncefilter Tue Dec 21 11:17:16 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA66601
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 11:16:36 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id RAA171572
for <pgsql-hackers@postgreSQL.org>; Tue, 21 Dec 1999 17:16:34 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <Y93Q8T4J>; Tue, 21 Dec 1999 17:16:34 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1DB@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] LONG varsize - how to go on (pgindent)
Date: Tue, 21 Dec 1999 17:16:27 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
a section to the Developers' FAQ explaining how to set up all
the common
editors for Postgres. I can contribute a recipe for Emacs, but I have
no idea how to do it for vi or anything else...
vi:
:set ts=4
more:
more -x4
less:
less -x4
I guess that comment is not so helpful :-(
Andreas
From bouncefilter Tue Dec 21 11:40:15 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id LAA72507
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 11:39:29 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m120SAi-0003kHC; Tue, 21 Dec 99 17:30 MET
Message-Id: <m120SAi-0003kHC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Tue, 21 Dec 1999 17:30:00 +0100 (MET)
Cc: ZeugswetterA@wien.spardat.at, pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <7181.945790600@sss.pgh.pa.us> from "Tom Lane" at Dec 21,
99 10:36:40 am
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
If changing the tabs is too radical, it'd at least be a good idea to add
a section to the Developers' FAQ explaining how to set up all the common
editors for Postgres. I can contribute a recipe for Emacs, but I have
no idea how to do it for vi or anything else...
In ~/.exrc you need:
set tabstop=4
set sw=4
That's all. But I like 8-spaced tabs anyway. It's a very old
de-facto standard (I think CP/M already treated TAB this
way), so having something different is definitely what Tom
said - a reason for potential contributors NOT do contribute.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Tue Dec 21 11:58:17 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id LAA75165
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 11:58:09 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA05794;
Tue, 21 Dec 1999 11:57:04 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912211657.LAA05794@candle.pha.pa.us>
Subject: Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)
In-Reply-To:
<219F68D65015D011A8E000006F8590C603FDC1D7@sdexcsrv1.f000.d0188.sd.spardat.at>
from Zeugswetter Andreas SB at "Dec 21, 1999 10:04:15 am"
To: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
Date: Tue, 21 Dec 1999 11:57:04 -0500 (EST)
CC: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset iso-8859-1 unsupported, filtering to ASCII...]
Bruce doesn't want to do that, and I doubt anyone will
force the issue
over his veto. But it would be nice to be able to do a
pgindent run;
there's a lot of new code in this release.
I hope I didn't "veto" it. I just wanted to mention my reasons, and
look for other people to vote too. I have Vince, Peter, and Tom who
want 8-space tabs and 4-space indents. Because the old standard was
voted on by many more people, I need to hear additional votes
to change
our standard.I think the idea at that time was also, that with a tab only setup people
can
look at the code with 2 space, 3 space and 4 space indents, whatever suits
them best.I like the current setup. Our company uses the same.
Most Programmers editors (and vi) can handle the 4 space tabs perfectly.
The pager less handles them also.
Wow, that's something I never thought of. By using only tabs, they can
be configured as any size in the editor. Good point.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 21 12:00:17 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id MAA76371
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 12:00:05 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA05996;
Tue, 21 Dec 1999 11:59:12 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912211659.LAA05996@candle.pha.pa.us>
Subject: Re: [HACKERS] T-O-A-S-T meaning
In-Reply-To: <Pine.BSF.4.05.9912210626470.4096-100000@paprika.michvhf.com>
from
Vince Vielhaber at "Dec 21, 1999 06:27:12 am"
To: Vince Vielhaber <vev@michvhf.com>
Date: Tue, 21 Dec 1999 11:59:12 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Tue, 21 Dec 1999, Bruce Momjian wrote:
The Outsized-Attribute Storage Technique ?
I thought "slicer" would be more natural.
Only if you can provide an acronym...
I have a project slogan, if Jan wants one:
"TOAST --- the best thing since sliced bread!"
Nice.
And don't forget the theme song by Haywood Banks.
Can I have a title? Maybe I can find an MP3 of it.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 21 12:03:17 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id MAA79841
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 12:02:55 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 4801 invoked by uid 1001); 21 Dec 1999 17:02:56 -0000
Date: Tue, 21 Dec 1999 12:02:56 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] T-O-A-S-T meaning
In-Reply-To: <199912211659.LAA05996@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.05.9912211202030.4431-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 21 Dec 1999, Bruce Momjian wrote:
On Tue, 21 Dec 1999, Bruce Momjian wrote:
The Outsized-Attribute Storage Technique ?
I thought "slicer" would be more natural.
Only if you can provide an acronym...
I have a project slogan, if Jan wants one:
"TOAST --- the best thing since sliced bread!"
Nice.
And don't forget the theme song by Haywood Banks.
Can I have a title? Maybe I can find an MP3 of it.
Yep. Toast. He's got a website: www.haywoodbanks.com
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Tue Dec 21 12:09:16 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id MAA80945
for <pgsql-hackers@postgresql.org>;
Tue, 21 Dec 1999 12:08:42 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA06582;
Tue, 21 Dec 1999 12:07:55 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912211707.MAA06582@candle.pha.pa.us>
Subject: Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)
In-Reply-To: <Pine.BSF.4.05.9912210707210.4096-100000@paprika.michvhf.com>
from
Vince Vielhaber at "Dec 21, 1999 07:13:46 am"
To: Vince Vielhaber <vev@michvhf.com>
Date: Tue, 21 Dec 1999 12:07:55 -0500 (EST)
CC: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>,
"'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgresql.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I hope I didn't "veto" it. I just wanted to mention my reasons, and
look for other people to vote too. I have Vince, Peter, and Tom who
want 8-space tabs and 4-space indents. Because the old standard was
voted on by many more people, I need to hear additional votes
to change
our standard.Whoa. Wait. Timeout! If I ever said I liked 8 space anythings I musta
mistyped, been half asleep, not paying attention or something. I'm
flexible, the only thing I want is a noticable indent and tab; I don't
really care if it's anywhere between one and four, but eight is too many.
Actually the only comment I remember making is that I always preferred
blocks like this:if( ) {
// do something
}which I guess isn't very popular. I did, however, utilize the xemacs
indent thing that Tom Lane posted here a couple weeks ago. Thanks Tom!
OK, now we have two items on the floor. One is 8 vs. 4 space tabs, and
the other is different bracketing as illustrated above.
I have only Vince on the new bracketing. Let's see if others vote for
new bracketing too.
I have Tom Lane, Jan, and Peter voting for 8-space tabs, and myself and
Andreas voting for 4-space tabs. I think we all agree on 4-space
indenting.
Any more votes? I see there is more discussion on this in my mailbox.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 21 12:37:16 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id MAA87127
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 12:36:54 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
MAA08323;
Tue, 21 Dec 1999 12:36:10 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912211736.MAA08323@candle.pha.pa.us>
Subject: Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)
In-Reply-To: <199912211707.MAA06582@candle.pha.pa.us> from Bruce Momjian at
"Dec 21, 1999 12:07:55 pm"
To: Bruce Momjian <pgman@candle.pha.pa.us>
Date: Tue, 21 Dec 1999 12:36:10 -0500 (EST)
CC: Vince Vielhaber <vev@michvhf.com>,
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>,
"'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
OK, now we have two items on the floor. One is 8 vs. 4 space tabs, and
the other is different bracketing as illustrated above.I have only Vince on the new bracketing. Let's see if others vote for
new bracketing too.I have Tom Lane, Jan, and Peter voting for 8-space tabs, and myself and
Andreas voting for 4-space tabs. I think we all agree on 4-space
indenting.Any more votes? I see there is more discussion on this in my mailbox.
While we are waiting for votes, I have added the needed sections to the
developers FAQ on the web site and on the main tree. This certain
should have been done earlier.
If we don't get enough votes to change the tab size to 8, maybe we can
add the /* Local variables */ line to the bottom of all the C files.
That would make Emacs users happy. Of course, that only does Emacs.
We could throw .exrc files in the directories for vi users, usually as
one file and symlinks to the main file.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Dec 21 15:26:18 1999
Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net
[194.217.242.20]) by hub.org (8.9.3/8.9.3) with ESMTP id PAA19618
for <hackers@postgresql.org>; Tue, 21 Dec 1999 15:25:20 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2)
id 120VqM-000OU0-0K; Tue, 21 Dec 1999 20:25:15 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id UAA10291; Tue, 21 Dec 1999 20:25:05 GMT
Message-Id: <199912212025.UAA10291@mtcc.demon.co.uk>
Date: Tue, 21 Dec 1999 20:25:05 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
To: Inoue@tpf.co.jp
Cc: hackers@postgresql.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: em0vOKO2Vmid9xwhTA3AIg==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
"Hiroshi Inoue" <Inoue@tpf.co.jp>
I'm not sure it's possible or not.
If startup sequence in InitPostgres() is changed,we may hardly
find the place to start transaction during backend startup.Seems the unique place we could call StartTransacationCommand()
during backend startup is between InitCatalogCahe() and InitUserId()
in InitPostgres() now.
I tried the following patch and it seems work at least now.<snip>
HiroshiI concur, after application of this patch I've not had a single
lock NOTICE: error in the regression tests.Thanks.
I'm not sure my patch has no problem.
May I dare to commit it to current tree ?
I've not seen any problems so-far.
Can you commit your patch for wider testing?
Keith.
From bouncefilter Tue Dec 21 17:42:19 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id RAA48419
for <pgsql-hackers@postgreSQL.org>;
Tue, 21 Dec 1999 17:41:38 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m120Xoi-0003kHC; Tue, 21 Dec 99 23:31 MET
Message-Id: <m120Xoi-0003kHC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: update_pg_pwd and AR triggers
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Tue, 21 Dec 1999 23:31:40 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
I have additional information on the update_pg_pwd()
discussion, whether AFTER ROW triggers should return
HeapTuple or void. The return value of AFTER ROW triggers
isn't void - definitely.
The trigger manager tries to pfree() the returned pointer, if
it's neither NULL, nor one of the tuples he sent down to the
trigger (trigtuple and newtuple).
Thus, ANY trigger must at least return (HeapTuple)NULL.
Fix is committed.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Tue Dec 21 18:40:20 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA67205
for <pgsql-hackers@postgresql.org>;
Tue, 21 Dec 1999 18:39:47 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.27.30.169]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Tue, 21 Dec 1999 17:31:18 -0600
Sender: ed
Message-ID: <38600FF4.B2E9A7C2@austin.rr.com>
Date: Tue, 21 Dec 1999 17:40:36 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Re: QUESTION: Replication
References: <19991221225215.3CA6C7D@miranda.herrera.iphil.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
One issue that needs to be handled with replication is the synchronization of
serial/sequence values, especially when these are used as primary/foreign
keys. Here's part of how I've seen this handled, for what it's worth to
anyone who might work on this. I'm sure there are better solutions, but its
food for thought.
There was the notion of a 'primary' db server and any number of 'secondary' db
servers. Replication would occur on the 'secondaries' by serially
hot-streaming a log of all successful state-changing queries (creates, drops,
inserts, updates, and deletes) to a replayer on each downstream 2ndary
server. The replayers would then re-execute those queries on that server.
Q: How would you keep track of where in the replay log you were if a server
went down, etc.? A: Each secondary dbserver had a table with a single record
that noted the filename and offset of the log it was currently processing.
The replayer would read the logs and update this table as it processed the
log.
Q: How were serials/sequences kept in sync? A: A special INSERT command was
created called 'SINSERT' (as in "Serial INSERT"). When the primary db server
saw this, it knew to log the query with the explicit value of the primary's
sequence/serial rather than allow the downstream secondaries to autogenerate
it.
Q: Did the databases ever get out of sync? A: Yes, occasionally. It was
not bulletproof. If things got way out of sync, a backup copy was put out on
all servers (with some data loss, which was acceptable).
Q: How did it handle transaction effects, serialization level, etc.? A: The
db had no transactions, so it didn't handle this at all. This is the hard
part of the problem in my view.
Cheers,
Ed Loehr
From bouncefilter Tue Dec 21 19:15:21 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA73757
for <hackers@postgreSQL.org>; Tue, 21 Dec 1999 19:14:32 -0500 (EST)
(envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id JAA01982; Wed, 22 Dec 1999 09:14:24 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Keith Parks" <emkxp01@mtcc.demon.co.uk>
Cc: <hackers@postgreSQL.org>
Subject: RE: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
Date: Wed, 22 Dec 1999 09:19:31 +0900
Message-ID: <000001bf4c12$376ee500$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <199912212025.UAA10291@mtcc.demon.co.uk>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
-----Original Message-----
From: Keith Parks [mailto:emkxp01@mtcc.demon.co.uk]"Hiroshi Inoue" <Inoue@tpf.co.jp>
I'm not sure it's possible or not.
If startup sequence in InitPostgres() is changed,we may hardly
find the place to start transaction during backend startup.Seems the unique place we could call StartTransacationCommand()
during backend startup is between InitCatalogCahe() and InitUserId()
in InitPostgres() now.
I tried the following patch and it seems work at least now.<snip>
HiroshiI concur, after application of this patch I've not had a single
lock NOTICE: error in the regression tests.Thanks.
I'm not sure my patch has no problem.
May I dare to commit it to current tree ?I've not seen any problems so-far.
Can you commit your patch for wider testing?
OK,I have commited the patch to current tree now.
I had no time to do it yesterday,sorry.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Tue Dec 21 23:31:23 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA23568
for <pgsql-hackers@postgresql.org>;
Tue, 21 Dec 1999 23:31:06 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id NAA13739
for <pgsql-hackers@postgresql.org>;
Wed, 22 Dec 1999 13:31:04 +0900 (JST)
Received: from localhost (IDENT:t-ishii@localhost [127.0.0.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id NAA16800
for <pgsql-hackers@postgresql.org>; Wed, 22 Dec 1999 13:31:04 +0900
To: pgsql-hackers@postgresql.org
Subject: pg_ctl updated
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991222133104Q.t-ishii@sra.co.jp>
Date: Wed, 22 Dec 1999 13:31:04 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 13
I have committed changes to pg_ctl.
1) postmaster.opts.default is being copied from
src/bin/pg_ctl/postmaster.opts.default.sample in the installation
procedure.
2) postmaster.opts.default is now installed by initdb.
3) The path to postmaster is determined in the runtime rather than
while creating pg_ctl script. That is a similar way to initdb
(actually codes stolen from it).
--
Tatsuo Ishii
From bouncefilter Tue Dec 21 17:52:20 1999
Received: from miranda.herrera.iphil.net
(IDENT:postfix@ip132.herrera.iphil.net [203.176.28.132])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA49473
for <pgsql-hackers@postgresql.org>;
Tue, 21 Dec 1999 17:52:18 -0500 (EST)
(envelope-from nquiogue@ieee.org)
Received: from VPENG (ddu-31.herrera.iphil.net [203.176.44.31])
by miranda.herrera.iphil.net (Postfix) with SMTP
id 3CA6C7D; Wed, 22 Dec 1999 06:52:15 +0800 (PHT)
From: "neil d. quiogue" <nquiogue@ieee.org>
To: Goran Thyni <goran@kirra.net>
Date: Wed, 22 Dec 1999 06:52:14 +0000
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: Re: [HACKERS] Re: QUESTION: Replication
Cc: pgsql-hackers@postgresql.org
Priority: normal
In-reply-to: <385E9192.226CC37D@kirra.net>
Message-Id: <19991221225215.3CA6C7D@miranda.herrera.iphil.net>
Hello Goran,
We need major work in this area, or at least a plan and an FAQ item.
We are getting major questions on this, and I don't know enough even to
make an FAQ item telling people their options.
It is pretty simple to build a replication with pg_dump, transfer,
empty replic and reload.
Simple process for simple replication. This would not work optimally
for replication through the WAN (or Internet) since it does not do
differential replication (and therefore transfering dumps isn't
good enough). Then one has to worry about the integrity of the
replicated data. Then we need to answer the n-way question (any db
server may be a source for the replication).
Regards,
Neil D. Quiogue
STO - dotPH, Inc.
"Nothing great was ever achieved without enthusiasm."
- Ralph Waldo Emerson
From bouncefilter Wed Dec 22 03:05:27 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA69296
for <pgsql-hackers@postgresql.org>;
Wed, 22 Dec 1999 03:04:30 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id EF28BB5B3; Wed, 22 Dec 1999 10:07:40 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <386086CC.2E3125FB@tm.ee>
Date: Wed, 22 Dec 1999 10:07:40 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>,
pgsql-hackers@postgresql.org
Subject: Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)
References:
<219F68D65015D011A8E000006F8590C603FDC1D7@sdexcsrv1.f000.d0188.sd.spardat.at>
<7181.945790600@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
I think the idea at that time was also, that with a tab only setup
people can look at the code with 2 space, 3 space and 4 space indents,
whatever suits them best.Not really. If the code still looked OK at different tab widths, people
wouldn't be complaining. A fairly typical example isif (root->query_pathkeys == NIL ||
pathkeys_contained_in(root->query_pathkeys,
final_rel->cheapestpath->pathkeys))
{
root->query_pathkeys = final_rel->cheapestpath->pathkeys;which is really
<tb>if (root->query_pathkeys == NIL ||
<tb><tb>pathkeys_contained_in(root->query_pathkeys,
<tb><tb><tb><tb><tb><tb><tb> final_rel->cheapestpath->pathkeys))
<tb>{
<tb><tb>root->query_pathkeys = final_rel->cheapestpath->pathkeys;
So we either need ident that understands C syntax and formats the
above as
<tb>if (root->query_pathkeys == NIL ||
<tb><tb>pathkeys_contained_in(root->query_pathkeys,
<tb><tb> final_rel->cheapestpath->pathkeys))
<tb>{
<tb><tb>root->query_pathkeys = final_rel->cheapestpath->pathkeys;
or just use spaces for indentation
I transferred all my coding to spaces-only after starting with python
about 5-6 years ago, as in python the whitespace is meaningful to parser
too and not only to human reader.
Python has even a special script for detecting space/tab combinations
that can potentially break things.
And it would be easy for someone who desparately needs tabs in his code
to run a much-simpler-than-indent script on the spaces only source to get
what we have currently (and another script to put the spaces back before
submitting patches)
-------------------
Hannu
From bouncefilter Wed Dec 22 10:03:32 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id KAA58906
for <pgsql-hackers@postgreSQL.org>;
Wed, 22 Dec 1999 10:02:48 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m120n8I-0003kHC; Wed, 22 Dec 99 15:52 MET
Message-Id: <m120n8I-0003kHC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: TOAST project page
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Wed, 22 Dec 1999 15:52:54 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
Hi,
I thought it would be good to have our WEB-site telling some
more details about TODO items, that are actually under
development.
Therefore I created a subdirectory "projects", placed an
initial "index.html" and a "devel-toast.html" there (along
with an image and Heywood's TOAST song). They aren't added to
CVS yet, since I don't know if ya'll want this stuff and/or
others will add more project pages. But at least I think
it's a possible way to find co-developers who don't listen to
our mailing lists.
Of course, the mp3 song will disappear soon, it's just that
some (Bruce at least) wanted to hear it and that's the
easiest way to provide.
Vince: If this kind of stuff should be added, a link from the
"Helping Us" page would be fine. Maybe one from the "Lates
News" too, because one looking for upcoming features probably
visits this instead.
Comments, suggestions?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Wed Dec 22 10:42:31 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id KAA67039
for <pgsql-hackers@postgreSQL.org>;
Wed, 22 Dec 1999 10:42:21 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 9617 invoked by uid 1001); 22 Dec 1999 15:42:19 -0000
Date: Wed, 22 Dec 1999 10:42:19 -0500 (EST)
From: Vince Vielhaber <vev@michvhf.com>
To: Jan Wieck <wieck@debis.com>
cc: PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] TOAST project page
In-Reply-To: <m120n8I-0003kHC@orion.SAPserv.Hamburg.dsh.de>
Message-ID: <Pine.BSF.4.05.9912221040380.9394-100000@paprika.michvhf.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 22 Dec 1999, Jan Wieck wrote:
Hi,
I thought it would be good to have our WEB-site telling some
more details about TODO items, that are actually under
development.Therefore I created a subdirectory "projects", placed an
initial "index.html" and a "devel-toast.html" there (along
with an image and Heywood's TOAST song). They aren't added to
CVS yet, since I don't know if ya'll want this stuff and/or
others will add more project pages. But at least I think
it's a possible way to find co-developers who don't listen to
our mailing lists.Of course, the mp3 song will disappear soon, it's just that
some (Bruce at least) wanted to hear it and that's the
easiest way to provide.Vince: If this kind of stuff should be added, a link from the
"Helping Us" page would be fine. Maybe one from the "Lates
News" too, because one looking for upcoming features probably
visits this instead.Comments, suggestions?
Great idea. It's now on the Helping Us page, in the announcements and
the news. Go ahead and commit it to CVS.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN - $24.95/mo or less; 56K Dialup - $17.95/mo or less www.pop4.net
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Fri Dec 24 10:41:48 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA62964
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 10:40:49 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id RAA00496;
Wed, 22 Dec 1999 17:16:10 GMT
Sender: lockhart@hub.org
Message-ID: <3861075A.FF5C6D40@alumni.caltech.edu>
Date: Wed, 22 Dec 1999 17:16:10 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Bruce Momjian <pgman@candle.pha.pa.us>, Jan Wieck <wieck@debis.com>,
PostgreSQL HACKERS <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] T-O-A-S-T meaning
References: <199912210210.VAA09407@candle.pha.pa.us>
<6363.945752022@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The Outsized-Attribute Storage Technique ?
The Oversized-Attribute Storage Technique??
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Dec 22 13:07:35 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id NAA03143
for <pgsql-hackers@postgreSQL.org>;
Wed, 22 Dec 1999 13:06:33 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
NAA17929;
Wed, 22 Dec 1999 13:05:42 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912221805.NAA17929@candle.pha.pa.us>
Subject: Re: AW: [HACKERS] LONG varsize - how to go on (pgindent)
In-Reply-To: <199912211707.MAA06582@candle.pha.pa.us> from Bruce Momjian at
"Dec 21, 1999 12:07:55 pm"
To: Bruce Momjian <pgman@candle.pha.pa.us>
Date: Wed, 22 Dec 1999 13:05:42 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
OK, now we have two items on the floor. One is 8 vs. 4 space tabs, and
the other is different bracketing as illustrated above.I have only Vince on the new bracketing. Let's see if others vote for
new bracketing too.I have Tom Lane, Jan, and Peter voting for 8-space tabs, and myself and
Andreas voting for 4-space tabs. I think we all agree on 4-space
indenting.Any more votes? I see there is more discussion on this in my mailbox.
OK, I have 3 for 8-space tabs, 2 for 4-space tabs, and 1 for no tabs.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 22 13:08:33 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id NAA03308
for <pgsql-hackers@postgreSQL.org>;
Wed, 22 Dec 1999 13:08:24 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id NAA17962
for pgsql-hackers@postgreSQL.org; Wed, 22 Dec 1999 13:07:45 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912221807.NAA17962@candle.pha.pa.us>
Subject: tab size
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Wed, 22 Dec 1999 13:07:45 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
OK, I have 3 for 8-space tabs, 2 for 4-space tabs, and 1 for no tabs.
All want 4-space indenting. One wants braces on if () line.
Anyone want the sources converted to another language. :-)
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 22 14:54:34 1999
Received: from px.com.br (IDENT:root@[200.253.250.2])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA26024
for <pgsql-hackers@postgresql.org>;
Wed, 22 Dec 1999 14:53:37 -0500 (EST)
(envelope-from rcoelho@px.com.br)
Received: from riclou.px.com.br ([200.253.250.51])
by px.com.br (8.9.3/8.8.7) with SMTP id QAA15264
for <pgsql-hackers@postgresql.org>; Wed, 22 Dec 1999 16:56:56 -0200
Message-ID: <000701bf4cae$3c8c2060$33fafdc8@px.com.br>
From: "Ricardo Coelho" <rcoelho@px.com.br>
To: <pgsql-hackers@postgresql.org>
Subject: Non-group columns with aggregate functions
Date: Wed, 22 Dec 1999 16:56:16 -0200
Organization:
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Hi All,
I had seen the answer for my question before, but hacker's E-mail search
isn't finding any word.
I'm using PgSQL 6.5.2 with RHLinux 6.0.
How can I use non-group columns in a select with aggregate functions ? To
me, the following query makes sense.
teste=> create table people(pp_id int2 primary key, pp_name text);
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'people_pkey'
for table 'people'
CREATE
teste=> create table workpgsql(wp_people int2, wp_date date, hoursofwork
int2);
CREATE
teste=> insert into people values (1,'ME');
INSERT 226808 1
teste=> insert into people values (2,'YOU');
INSERT 226809 1
teste=> insert into workpgsql values (1,'01/01/2000',5);
INSERT 226810 1
teste=> insert into workpgsql values (1,'01/01/2000',4);
INSERT 226811 1
teste=> insert into workpgsql values (2,'01/01/2000',6);
INSERT 226812 1
teste=> insert into workpgsql values (2,'01/01/2000',6);
INSERT 226813 1
teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql
teste-> where pp_id=wp_people
teste-> group by wp_people,wp_date;
ERROR: Illegal use of aggregates or non-group column in target list
If anybody knows how to rebuild this query to work, thanks in advance.
Thanks,
Ricardo Coelho.
From bouncefilter Wed Dec 22 15:20:36 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA32918
for <pgsql-hackers@postgresql.org>;
Wed, 22 Dec 1999 15:20:34 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.93.43.109]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Wed, 22 Dec 1999 14:12:04 -0600
Sender: ed
Message-ID: <386132C1.DA9F18B1@austin.rr.com>
Date: Wed, 22 Dec 1999 14:21:21 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Ricardo Coelho <rcoelho@px.com.br>
CC: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Non-group columns with aggregate functions
References: <000701bf4cae$3c8c2060$33fafdc8@px.com.br>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Ricardo Coelho wrote:
How can I use non-group columns in a select with aggregate functions ? To
me, the following query makes sense.teste=> create table people(pp_id int2 primary key, pp_name text);
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'people_pkey'
for table 'people'
CREATE
teste=> create table workpgsql(wp_people int2, wp_date date, hoursofwork
int2);
CREATE
teste=> insert into people values (1,'ME');
INSERT 226808 1
teste=> insert into people values (2,'YOU');
INSERT 226809 1
teste=> insert into workpgsql values (1,'01/01/2000',5);
INSERT 226810 1
teste=> insert into workpgsql values (1,'01/01/2000',4);
INSERT 226811 1
teste=> insert into workpgsql values (2,'01/01/2000',6);
INSERT 226812 1
teste=> insert into workpgsql values (2,'01/01/2000',6);
INSERT 226813 1
teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql
teste-> where pp_id=wp_people
teste-> group by wp_people,wp_date;
ERROR: Illegal use of aggregates or non-group column in target listIf anybody knows how to rebuild this query to work, thanks in advance.
Non-aggregated columns must appear in the group by clause.
select pp_name, wp_date, sum(hoursofwork)
from people, workpgsql
where pp_id=wp_people
group by pp_name,wp_date;
Cheers.
Ed Loehr
From bouncefilter Wed Dec 22 15:29:35 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67] (may
be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id PAA34331
for <pgsql-hackers@postgreSQL.org>;
Wed, 22 Dec 1999 15:28:40 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
PAA01180;
Wed, 22 Dec 1999 15:21:37 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912222021.PAA01180@candle.pha.pa.us>
Subject: Re: [HACKERS] Non-group columns with aggregate functions
In-Reply-To: <000701bf4cae$3c8c2060$33fafdc8@px.com.br> from Ricardo Coelho at
"Dec 22, 1999 04:56:16 pm"
To: Ricardo Coelho <rcoelho@px.com.br>
Date: Wed, 22 Dec 1999 15:21:37 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[Charset iso-8859-1 unsupported, filtering to ASCII...]
Hi All,
I had seen the answer for my question before, but hacker's E-mail search
isn't finding any word.I'm using PgSQL 6.5.2 with RHLinux 6.0.
How can I use non-group columns in a select with aggregate functions ? To
me, the following query makes sense.teste=> create table people(pp_id int2 primary key, pp_name text);
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'people_pkey'
for table 'people'
CREATE
teste=> create table workpgsql(wp_people int2, wp_date date, hoursofwork
int2);
CREATE
teste=> insert into people values (1,'ME');
INSERT 226808 1
teste=> insert into people values (2,'YOU');
INSERT 226809 1
teste=> insert into workpgsql values (1,'01/01/2000',5);
INSERT 226810 1
teste=> insert into workpgsql values (1,'01/01/2000',4);
INSERT 226811 1
teste=> insert into workpgsql values (2,'01/01/2000',6);
INSERT 226812 1
teste=> insert into workpgsql values (2,'01/01/2000',6);
INSERT 226813 1
teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql
teste-> where pp_id=wp_people
teste-> group by wp_people,wp_date;
ERROR: Illegal use of aggregates or non-group column in target listIf anybody knows how to rebuild this query to work, thanks in advance.
New 7.0 error message will be:
ERROR: Attribute people.pp_name must be GROUPed or used in an aggregate function
Cause is that you group by wp_people, not pp_name.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Dec 22 16:46:35 1999
Received: from px.com.br (IDENT:root@[200.253.250.2])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA51452
for <pgsql-hackers@postgresql.org>;
Wed, 22 Dec 1999 16:46:18 -0500 (EST)
(envelope-from rcoelho@px.com.br)
Received: from riclou.px.com.br ([200.253.250.57])
by px.com.br (8.9.3/8.8.7) with SMTP id SAA15499;
Wed, 22 Dec 1999 18:49:33 -0200
Message-ID: <002601bf4cbd$f817c320$39fafdc8@px.com.br>
From: "Ricardo Coelho" <rcoelho@px.com.br>
To: "Ed Loehr" <ELOEHR@austin.rr.com>, <pgsql-hackers@postgresql.org>
References: <000701bf4cae$3c8c2060$33fafdc8@px.com.br>
<386132C1.DA9F18B1@austin.rr.com>
Subject: Re: [HACKERS] Non-group columns with aggregate functions
Date: Wed, 22 Dec 1999 18:48:56 -0200
Organization:
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Ed,
The query works now. Thanks.
Thanks everybody.
----- Original Message -----
From: Ed Loehr <ELOEHR@austin.rr.com>
To: Ricardo Coelho <rcoelho@px.com.br>
Cc: <pgsql-hackers@postgreSQL.org>
Sent: Wednesday, December 22, 1999 6:21 PM
Subject: Re: [HACKERS] Non-group columns with aggregate functions
Ricardo Coelho wrote:
How can I use non-group columns in a select with aggregate functions ?
To
me, the following query makes sense.
teste=> create table people(pp_id int2 primary key, pp_name text);
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
'people_pkey'
for table 'people'
CREATE
teste=> create table workpgsql(wp_people int2, wp_date date, hoursofwork
int2);
CREATE
teste=> insert into people values (1,'ME');
INSERT 226808 1
teste=> insert into people values (2,'YOU');
INSERT 226809 1
teste=> insert into workpgsql values (1,'01/01/2000',5);
INSERT 226810 1
teste=> insert into workpgsql values (1,'01/01/2000',4);
INSERT 226811 1
teste=> insert into workpgsql values (2,'01/01/2000',6);
INSERT 226812 1
teste=> insert into workpgsql values (2,'01/01/2000',6);
INSERT 226813 1
teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql
teste-> where pp_id=wp_people
teste-> group by wp_people,wp_date;
ERROR: Illegal use of aggregates or non-group column in target listIf anybody knows how to rebuild this query to work, thanks in advance.
Non-aggregated columns must appear in the group by clause.
select pp_name, wp_date, sum(hoursofwork)
from people, workpgsql
where pp_id=wp_people
group by pp_name,wp_date;Cheers.
Ed Loehr************
From bouncefilter Wed Dec 22 16:26:35 1999
Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net
[194.217.242.89]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA46641
for <pgsql-hackers@postgresql.org>;
Wed, 22 Dec 1999 16:26:34 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1)
id 120tHE-0008Ij-0V; Wed, 22 Dec 1999 21:26:32 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id UAA02650; Wed, 22 Dec 1999 20:55:13 GMT
Message-Id: <199912222055.UAA02650@mtcc.demon.co.uk>
Date: Wed, 22 Dec 1999 20:55:13 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: Re: [HACKERS] Non-group columns with aggregate functions
To: pgsql-hackers@postgresql.org, rcoelho@px.com.br
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: uSaj8mD6aSdugANvRoeUjA==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
"Ricardo Coelho" <rcoelho@px.com.br>
How can I use non-group columns in a select with aggregate functions ? To
me, the following query makes sense.
<snip>
teste=> select pp_name,wp_date,sum(hoursofwork) from people,workpgsql
teste-> where pp_id=wp_people
teste-> group by wp_people,wp_date;
ERROR: Illegal use of aggregates or non-group column in target listIf anybody knows how to rebuild this query to work, thanks in advance.
Maybe one of these?
postgres=# select pp_name,wp_date,sum(hoursofwork) from people,workpgsql where
pp_id=wp_people group by pp_name,wp_date;
pp_name | wp_date | sum
---------+------------+-----
ME | 01-01-2000 | 9
YOU | 01-01-2000 | 12
(2 rows)
postgres=# select wp_people,wp_date,sum(hoursofwork) from people,workpgsql where
pp_id=wp_people group by wp_people,wp_date;
wp_people | wp_date | sum
-----------+------------+-----
1 | 01-01-2000 | 9
2 | 01-01-2000 | 12
(2 rows)
Keith.
From bouncefilter Thu Dec 23 10:35:32 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA63963
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 10:34:57 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id QAA25231
for <pgsql-hackers@postgreSQL.org>; Thu, 23 Dec 1999 16:20:23 +0100
Date: Thu, 23 Dec 1999 16:20:23 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
Reply-To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: empty concatenate
Message-ID: <Pine.LNX.3.96.991223152436.24288A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
I try concatenate text via standard '||' oprerator, but result is
interesting:
PgSQL 6.5.3/7.0:
~~~~~~~~~~~~~~~
test=> select * from x;
a |b
---+---
AAA|BBB
xxx|
(2 rows)
test=> select a || b from x;
?column?
--------
AAABBB
<-------------- empty !
(2 rows)
Oracle8:
~~~~~~~~
SVRMGR> select * from x;
A B
-------------------------------- --------------------------------
AAA BBB
xxx
2 rows selected.
SVRMGR> select a || b from x;
A||B
----------------------------------------------------------------
AAABBB
xxx <---------------- not empty !
2 rows selected.
I fistly think that problem is in the textcat() routine, but PgSQL ignore
all functions's results if any argument (column) is empty. Example:
text *
xxx(text *t1, text *t2)
{
text *result;
result = (text *) palloc(10 + VARHDRSZ);
strcpy(VARDATA(result), "happy");
VARSIZE(result) = 5 + VARHDRSZ;
elog(NOTICE, "RETURN: %s", VARDATA(result));
return result; /* always return 'happy' */
}
test=> select * from x;
a |b
---+---
AAA|BBB
xxx|
(2 rows)
test=> select xxx(a, b) from x;
NOTICE: RETURN: happy
NOTICE: RETURN: happy
xxx
----
happy
<--------- empty ?!
(2 rows)
Why is it empty? I believe that is not feature :-)
Karel
PS. sorry, if this is old point, mail-list archive seacher (htdig)
not work...
----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------
From bouncefilter Thu Dec 23 11:12:32 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA71781
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 11:11:42 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id QAA25365;
Thu, 23 Dec 1999 16:55:55 +0100
Date: Thu, 23 Dec 1999 16:55:55 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] empty concatenate
In-Reply-To: <199912231556.KAA05091@candle.pha.pa.us>
Message-ID: <Pine.LNX.3.96.991223164928.25235B-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
NULL's can not be concatenated, but '' can. Looks fine to me:
---------------------------------------------------------------------------
test=> create table ff (x text, y text);
insCREATE
test=> insert into ff values ('a','');
INSERT 19082 1
test=> insert into ff values ('b',null);
INSERT 19083 1
test=> select x || y from ff;
?column?
----------
a(2 rows)
Well, but why PgSQL ignore function result if any argument is NULL. IMHO is
function's problem what return, and PgSQL must use this result.
How can user write / use function which response on NULL (as IFNULL())?
Karel
From bouncefilter Thu Dec 23 11:00:33 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA67058
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 10:58:54 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA05091;
Thu, 23 Dec 1999 10:56:20 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912231556.KAA05091@candle.pha.pa.us>
Subject: Re: [HACKERS] empty concatenate
In-Reply-To: <Pine.LNX.3.96.991223152436.24288A-100000@ara.zf.jcu.cz> from
Karel Zak - Zakkr at "Dec 23, 1999 04:20:23 pm"
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
Date: Thu, 23 Dec 1999 10:56:20 -0500 (EST)
CC: pgsql-hackers <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Hi,
I try concatenate text via standard '||' oprerator, but result is
interesting:PgSQL 6.5.3/7.0:
~~~~~~~~~~~~~~~
test=> select * from x;
a |b
---+---
AAA|BBB
xxx|
(2 rows)test=> select a || b from x;
?column?
--------
AAABBB
<-------------- empty !
(2 rows)
NULL's can not be concatenated, but '' can. Looks fine to me:
---------------------------------------------------------------------------
test=> create table ff (x text, y text);
insCREATE
test=> insert into ff values ('a','');
INSERT 19082 1
test=> insert into ff values ('b',null);
INSERT 19083 1
test=> select x || y from ff;
?column?
----------
a
(2 rows)
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 23 11:00:32 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA67165
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 10:59:51 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id KAA10994
for <pgsql-hackers@postgresql.org>; Thu, 23 Dec 1999 10:59:55 -0500
Message-ID: <386246F6.C26B5771@wgcr.org>
Date: Thu, 23 Dec 1999 10:59:50 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: --with-mb=SQL_ASCII for 6.5.3 RPMs.
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Ok, got a minor problem here in RPM building. It was requested that
when I build locale-enabled RPM's, that I also enable multibyte
support. The suggestion was then made to use --with-mb=SQL_ASCII -- and
the README.mb for 6.5.3 supports that.
HOWEVER, --with-mb=SQL_ASCII throws a configure error -- SQL_ASCII is
not valid for this switch, or something like that.
So, my question is: unless someone here who is an autoconf wizard
suggests otherwise, I'm going to patch configure to allow the SQL_ASCII
switch (I _know_ that the real fix lies in patching configure.in -- I'm
just wanting to get the RPM out the door without having to learn how to
run autoconf first -- unless that would be preferable). Are there any
other things I need to patch other than the list of allowed encodings in
order to use --with-mb=SQL_ASCII??
I'd love to get the 6.5.3-3 RPMs out the door today if possible.
This RPM set includes a few bugfixes as well as the headers necessary to
build SPI modules.
TIA
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Thu Dec 23 11:21:33 1999
Received: from news.tht.net (news.hub.org [216.126.91.242])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA73138
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 11:20:56 -0500 (EST)
(envelope-from news@news.tht.net)
Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id LAA78621
for pgsql-hackers@postgresql.org; Thu, 23 Dec 1999 11:07:09 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: news.tht.net: news set sender to <news> using -f
X-Newsgroups: comp.databases.postgresql.hackers
From: rjb@typeline.com (Robert Badaracco)
Subject: Foreign Key support
Organization: Typeline, Inc.
X-Newsreader: News Xpress 2.01
Lines: 2
Message-ID: <vIr84.66$2d6.655538@dca1-nnrp1.news.digex.net>
Date: Thu, 23 Dec 1999 16:02:35 GMT
X-Complaints-To: abuse@digex.net
X-Trace: dca1-nnrp1.news.digex.net 945964955 209.116.143.141 (Thu,
23 Dec 1999 11:02:35 EST)
To: pgsql-hackers@postgresql.org
Does anyone know when support for foreign keys will be implemented?
From bouncefilter Thu Dec 23 11:21:36 1999
Received: from news.tht.net (news.hub.org [216.126.91.242])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA73142
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 11:20:57 -0500 (EST)
(envelope-from news@news.tht.net)
Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id LAA78947
for pgsql-hackers@postgresql.org; Thu, 23 Dec 1999 11:10:04 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: news.tht.net: news set sender to <news> using -f
X-Newsgroups: comp.databases.postgresql.hackers
From: rjb@typeline.com (Robert Badaracco)
Subject: Cascade on delete
Organization: Typeline, Inc.
X-Newsreader: News Xpress 2.01
Lines: 5
Message-ID: <dLr84.67$2d6.655538@dca1-nnrp1.news.digex.net>
Date: Thu, 23 Dec 1999 16:05:29 GMT
X-Complaints-To: abuse@digex.net
X-Trace: dca1-nnrp1.news.digex.net 945965129 209.116.143.141 (Thu,
23 Dec 1999 11:05:29 EST)
To: pgsql-hackers@postgresql.org
During an delete I'd like to reference a foreign key and cascade the deletion
across the referenced table or tables. When will this be supported or is
there any work around?
Thanks
From bouncefilter Thu Dec 23 11:21:33 1999
Received: from news.tht.net (news.hub.org [216.126.91.242])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA73141
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 11:20:57 -0500 (EST)
(envelope-from news@news.tht.net)
Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id LAA79023
for pgsql-hackers@postgresql.org; Thu, 23 Dec 1999 11:12:40 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: news.tht.net: news set sender to <news> using -f
X-Newsgroups: comp.databases.postgresql.hackers
From: rjb@typeline.com (Robert Badaracco)
Subject: libpg and remote access
Organization: Typeline, Inc.
X-Newsreader: News Xpress 2.01
Lines: 4
Message-ID: <HNr84.68$2d6.655538@dca1-nnrp1.news.digex.net>
Date: Thu, 23 Dec 1999 16:08:07 GMT
X-Complaints-To: abuse@digex.net
X-Trace: dca1-nnrp1.news.digex.net 945965287 209.116.143.141 (Thu,
23 Dec 1999 11:08:07 EST)
To: pgsql-hackers@postgresql.org
Is libpg a shared library? Can I write a client program say on a FreeBSD
box that links to this library and calls a remote Postgres db server running
on a Linux box?
From bouncefilter Thu Dec 23 11:37:33 1999
Received: from bologna.nettuno.it (bologna.nettuno.it [193.43.2.1])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA78652
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 11:36:54 -0500 (EST)
(envelope-from jose@sferacarta.com)
Received: from proxy.sferacarta.com (sfcabop1.nettuno.it [193.207.10.213])
by bologna.nettuno.it (8.9.3/8.9.3/NETTuno 4.1) with ESMTP id RAA06028;
Thu, 23 Dec 1999 17:36:42 +0100 (MET)
Received: from rosso.sferacarta.com (sferacarta.com) [10.20.30.5]
by proxy.sferacarta.com with esmtp (Exim 2.05 #1 (Debian))
id 121C9I-0003Iv-00; Thu, 23 Dec 1999 17:35:36 +0000
Message-ID: <3862500A.2F26802E@sferacarta.com>
Date: Thu, 23 Dec 1999 17:38:34 +0100
From: Jose Soares <jose@sferacarta.com>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
CC: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] empty concatenate
References: <Pine.LNX.3.96.991223152436.24288A-100000@ara.zf.jcu.cz>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I think this is a known bug.
You can try the standard COALESCE function as in:
select coalesce(a,'')||coalesce(b,'') from test;
?column?
--------
AAAABBBB
xxxx
(2 rows)
Jose'
Karel Zak - Zakkr wrote:
Hi,
I try concatenate text via standard '||' oprerator, but result is
interesting:PgSQL 6.5.3/7.0:
~~~~~~~~~~~~~~~
test=> select * from x;
a |b
---+---
AAA|BBB
xxx|
(2 rows)test=> select a || b from x;
?column?
--------
AAABBB
<-------------- empty !
(2 rows)Oracle8:
~~~~~~~~
SVRMGR> select * from x;
A B
-------------------------------- --------------------------------
AAA BBB
xxx
2 rows selected.
SVRMGR> select a || b from x;
A||B
----------------------------------------------------------------
AAABBB
xxx <---------------- not empty !
2 rows selected.I fistly think that problem is in the textcat() routine, but PgSQL ignore
all functions's results if any argument (column) is empty. Example:text *
xxx(text *t1, text *t2)
{
text *result;result = (text *) palloc(10 + VARHDRSZ);
strcpy(VARDATA(result), "happy");
VARSIZE(result) = 5 + VARHDRSZ;
elog(NOTICE, "RETURN: %s", VARDATA(result));return result; /* always return 'happy' */
}test=> select * from x;
a |b
---+---
AAA|BBB
xxx|
(2 rows)test=> select xxx(a, b) from x;
NOTICE: RETURN: happy
NOTICE: RETURN: happy
xxx
----
happy
<--------- empty ?!
(2 rows)Why is it empty? I believe that is not feature :-)
Karel
PS. sorry, if this is old point, mail-list archive seacher (htdig)
not work...----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------************
From bouncefilter Thu Dec 23 11:59:33 1999
Received: from blargh.bigpanda.org
(IDENT:root@client-151-198-27-104.bellatlantic.net [151.198.27.104])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA81342
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 11:58:40 -0500 (EST)
(envelope-from acroyear@homeworld.bigpanda.org)
Received: from homeworld.bigpanda.org (IDENT:acroyear@localhost.awc.net
[127.0.0.1])
by blargh.bigpanda.org (8.9.3/8.9.3) with ESMTP id LAA26868;
Thu, 23 Dec 1999 11:58:14 -0500
Message-Id: <199912231658.LAA26868@blargh.bigpanda.org>
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
CC: pgsql-hackers@postgresql.org
From: sszabo@bigpanda.com
Subject: Re: [HACKERS] empty concatenate
In-Reply-To: Your message of "Thu, 23 Dec 1999 16:55:55 +0100."
<Pine.LNX.3.96.991223164928.25235B-100000@ara.zf.jcu.cz>
Date: Thu, 23 Dec 1999 11:58:13 -0500
Sender: acroyear@homeworld.bigpanda.org
Well, but why PgSQL ignore function result if any argument is NULL. IMHO is
function's problem what return, and PgSQL must use this result.
I believe this is a known issue that's being looked at right now.
However, in this case PostgreSQL seems to be correct.
2) If <concatenation> is specified, then let S1 and S2 be the re-
sult of the <character value expression> and <character factor>,
respectively.
Case:
a) If either S1 or S2 is the null value, then the result of the
<concatenation> is the null value.
How can user write / use function which response on NULL (as IFNULL())?
Well, for now, you probably want to use coalesce around any input that
might be null. I believe coalesce returns the first non-null parameter,
so coalesce(<column>, '') will return either the column's value (if not
NULL) or the empty string which can then be used for concatenation.
Stephan
From bouncefilter Thu Dec 23 12:16:33 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA87363
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 12:16:10 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id SAA25715;
Thu, 23 Dec 1999 18:01:33 +0100
Date: Thu, 23 Dec 1999 18:01:33 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: sszabo@bigpanda.com
cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] empty concatenate
In-Reply-To: <199912231658.LAA26868@blargh.bigpanda.org>
Message-ID: <Pine.LNX.3.96.991223174850.25235C-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Well, but why PgSQL ignore function result if any argument is NULL. IMHO is
function's problem what return, and PgSQL must use this result.I believe this is a known issue that's being looked at right now.
I not agree with this concept:-).
(My problem is not write query, I know SQL and coalesce()...etc. I want
good understand current implementation.)
! Why is textcat() (and other) function called if result from this
function is ignored, it is bad spending (my CPU is not boredom). See
my 'C' example in my first letter...
Karel
From bouncefilter Thu Dec 23 12:37:33 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA93471
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 12:37:21 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA06998;
Thu, 23 Dec 1999 12:35:43 -0500 (EST)
To: sszabo@bigpanda.com
cc: Karel Zak - Zakkr <zakkr@zf.jcu.cz>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] empty concatenate
In-reply-to: <199912231658.LAA26868@blargh.bigpanda.org>
References: <199912231658.LAA26868@blargh.bigpanda.org>
Comments: In-reply-to sszabo@bigpanda.com
message dated "Thu, 23 Dec 1999 11:58:13 -0500"
Date: Thu, 23 Dec 1999 12:35:43 -0500
Message-ID: <6995.945970543@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
sszabo@bigpanda.com writes:
Well, but why PgSQL ignore function result if any argument is NULL. IMHO is
function's problem what return, and PgSQL must use this result.I believe this is a known issue that's being looked at right now.
Current plans are to fix it in the release-after-next (7.1).
As you say, the behavior is correct for standard SQL operators; the
only real problem is that user-written operators might want to return
non-null results for null inputs, and we can't handle that right now.
Applying COALESCE before calling the operator will get the job done
in some cases, but it clutters your queries...
regards, tom lane
From bouncefilter Thu Dec 23 12:47:34 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA94861
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 12:47:09 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA07046;
Thu, 23 Dec 1999 12:46:07 -0500 (EST)
To: Lamar Owen <lamar.owen@wgcr.org>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] --with-mb=SQL_ASCII for 6.5.3 RPMs.
In-reply-to: <386246F6.C26B5771@wgcr.org>
References: <386246F6.C26B5771@wgcr.org>
Comments: In-reply-to Lamar Owen <lamar.owen@wgcr.org>
message dated "Thu, 23 Dec 1999 10:59:50 -0500"
Date: Thu, 23 Dec 1999 12:46:07 -0500
Message-ID: <7043.945971167@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Lamar Owen <lamar.owen@wgcr.org> writes:
(I _know_ that the real fix lies in patching configure.in -- I'm
just wanting to get the RPM out the door without having to learn how to
run autoconf first -- unless that would be preferable).
1. Install autoconf (get it from any GNU archive). Be sure you have
version 2.13 to ensure you get the same results as the rest of us.
Install is no harder than "configure; make; make install". You do need
to have GNU m4, but if you are on a Linux box you probably already do.
Try "m4 --version" to check.
2. type "autoconf" in the pgsql/src directory.
Can't get much easier. Changing configure.in is a LOT easier than
patching the output, IMHO...
regards, tom lane
From bouncefilter Thu Dec 23 12:47:34 1999
Received: from druid.net (root@druid.net [216.126.72.98])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA94916
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 12:47:33 -0500 (EST) (envelope-from darcy@druid.net)
Received: from localhost (1491 bytes) by druid.net
via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp
(sender: <darcy>) (ident <darcy> using unix)
id <m121CKg-0000daC@druid.net> for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 12:47:22 -0500 (EST)
(Smail-3.2.0.104 1998-Nov-20 #4 built 1999-Apr-13)
Message-Id: <m121CKg-0000daC@druid.net>
Subject: Re: [HACKERS] empty concatenate
In-Reply-To: <Pine.LNX.3.96.991223174850.25235C-100000@ara.zf.jcu.cz> from
Karel Zak - Zakkr at "Dec 23, 1999 06:01:33 pm"
To: zakkr@zf.jcu.cz (Karel Zak - Zakkr)
Date: Thu, 23 Dec 1999 12:47:22 -0500 (EST)
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
Cc: sszabo@bigpanda.com, pgsql-hackers@postgreSQL.org
Reply-To: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL50 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Thus spake Karel Zak - Zakkr
I not agree with this concept:-).
You are not alone.
(My problem is not write query, I know SQL and coalesce()...etc. I want
good understand current implementation.)! Why is textcat() (and other) function called if result from this
function is ignored, it is bad spending (my CPU is not boredom). See
my 'C' example in my first letter...
This is the issue no matter which side of the debate you are on. I
think everyone agrees that either the function should not be called
or else the result should be used if it is. CPU is a terrible thing
to waste.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
From bouncefilter Thu Dec 23 12:46:34 1999
Received: from cap-ferrat.albourne.com (cap-ferrat.albourne.com
[195.89.178.227]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA94731
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 12:46:32 -0500 (EST)
(envelope-from a.joubert@albourne.com)
Received: from albourne.com (bishop-rock.albourne.com [195.89.178.230])
by cap-ferrat.albourne.com (8.9.3/8.9.3/Albourne/UKS/2.9/MAPS) with
ESMTP id RAA19889
for <pgsql-hackers@postgresql.org>; Thu, 23 Dec 1999 17:46:31 GMT
Sender: a.joubert@albourne.com
Message-ID: <38626197.4ED6092F@albourne.com>
Date: Thu, 23 Dec 1999 19:53:27 +0200
From: Adriaan Joubert <a.joubert@albourne.com>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.38 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgresql.org
Subject: Index corruption
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
Something in my pg_proc table got corrupted and when trying to
vacuum it, vacuum would create thousands of index files in the database
directory. It would just go into an endless loop and all it seems to do
is create files. Anybody else seen this before? I've tried everything
and am now in the process of dumping all the data out table by table and
rebuilding the database from scratch. Any ideas what I can do to avoid
this or any idea how this could have happened? I'm running 6.5.2 on
Digital Unix 4.0F.
Cheers,
Adriaan
From bouncefilter Thu Dec 23 13:38:34 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA13641
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 13:38:18 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org ([206.74.232.197])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id NAA11333;
Thu, 23 Dec 1999 13:32:05 -0500
Message-ID: <38626A9E.E3AAA85@wgcr.org>
Date: Thu, 23 Dec 1999 13:31:58 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] --with-mb=SQL_ASCII for 6.5.3 RPMs.
References: <386246F6.C26B5771@wgcr.org> <7043.945971167@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Lamar Owen <lamar.owen@wgcr.org> writes:
(I _know_ that the real fix lies in patching configure.in -- I'm
just wanting to get the RPM out the door without having to learn how to
run autoconf first -- unless that would be preferable).1. Install autoconf (get it from any GNU archive). Be sure you have
version 2.13 to ensure you get the same results as the rest of us.
Install is no harder than "configure; make; make install". You do need
to have GNU m4, but if you are on a Linux box you probably already do.
Try "m4 --version" to check.2. type "autoconf" in the pgsql/src directory.
Can't get much easier. Changing configure.in is a LOT easier than
patching the output, IMHO...
Well, I actually have to do both, in the RPM scheme of things. I did as
you suggested (RedHat 6.1 ships autoconf 2.13 -- installing is a simple
'rpm -i autoconf-2.13-5.i386.rpm'). Popped configure.in into vi, made
the change, ran autoconf, generated the resulting patchset (the RPM
philosophy is that a source RPM contains everything necessary to rebuild
all the binary RPMs -- using pristine sources plus whatever scripts,
patches, and extra programs are necessary to make it build binaries that
will run. The control file that determines how to do all of this is
called a 'spec' file -- the postgresql spec file is one of the more
complex ones due to the large differences in file locations vis-a-vis
the pristine source install.), built a test RPM set, and am editing the
README now to reflect the successful changes.
I should release in a couple of hours, once I have all four sets of
binaries built (RH 6.1, RH 6.1 non-locale, RH5.2, RH 5.2 non-locale).
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Thu Dec 23 13:45:34 1999
Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA14663
for <pgsql-hackers@postgresql.org>;
Thu, 23 Dec 1999 13:45:25 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.28.83.215]) by mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Thu, 23 Dec 1999 12:45:33 -0600
Sender: ed
Message-ID: <38626DE4.980D4617@austin.rr.com>
Date: Thu, 23 Dec 1999 12:45:56 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Adriaan Joubert <a.joubert@albourne.com>
CC: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Index corruption
References: <38626197.4ED6092F@albourne.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Were other queries occurring during your vacuum? There have been reports
in these mailing lists that concurrent queries cause vacuum failures...
Cheers,
Ed Loehr
Adriaan Joubert wrote:
Hi,
Something in my pg_proc table got corrupted and when trying to
vacuum it, vacuum would create thousands of index files in the database
directory. It would just go into an endless loop and all it seems to do
is create files. Anybody else seen this before? I've tried everything
and am now in the process of dumping all the data out table by table and
rebuilding the database from scratch. Any ideas what I can do to avoid
this or any idea how this could have happened? I'm running 6.5.2 on
Digital Unix 4.0F.Cheers,
Adriaan
************
From bouncefilter Thu Dec 23 16:44:36 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA51378
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 16:44:17 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id QAA18004
for pgsql-hackers@postgreSQL.org; Thu, 23 Dec 1999 16:40:36 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912232140.QAA18004@candle.pha.pa.us>
Subject: Source code format votes
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Thu, 23 Dec 1999 16:40:36 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
OK I have:
8-space tabs: Tom Lane, Peter, Vince, Massimo
4-space tabs: Bruce, Andreas
open bracket on if () line -
yes: Massimo, Peter
no: Bruce
More votes?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 23 16:57:36 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA52801
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 16:56:57 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
QAA19191;
Thu, 23 Dec 1999 16:55:57 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912232155.QAA19191@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <38629907.DB3E31BF@krs.ru> from Vadim Mikheev at "Dec 24,
1999 04:49:59 am"
To: Vadim Mikheev <vadim@krs.ru>
Date: Thu, 23 Dec 1999 16:55:57 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
This is quoted mail from Vadim.
Bruce Momjian wrote:
OK I have:
8-space tabs: Tom Lane, Peter, Vince, Massimo
4-space tabs: Bruce, Andreas^^^^^^^^^^^^^
+ me
Yea. I am so glad you were able to vote. I was getting clobbered.
We still may lose, but now we have a chance. :-)
open bracket on if () line -
yes: Massimo, Peter
no: Bruce^^^
+ me
CC'ed to hackers list for all to see, so they don't think I am making
this up.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 23 16:57:36 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id QAA52822
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 16:57:24 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 15055 invoked by uid 1001); 23 Dec 1999 21:57:24 -0000
Message-ID: <XFMail.991223165724.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <199912232140.QAA18004@candle.pha.pa.us>
Date: Thu, 23 Dec 1999 16:57:24 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Subject: RE: [HACKERS] Source code format votes
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
On 23-Dec-99 Bruce Momjian wrote:
OK I have:
8-space tabs: Tom Lane, Peter, Vince, Massimo
4-space tabs: Bruce, Andreasopen bracket on if () line -
yes: Massimo, Peter
no: BruceMore votes?
Correction. I don't want 8 space anythings. Move me to 4 please.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Thu Dec 23 17:12:37 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA57685
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 17:11:42 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
RAA19908;
Thu, 23 Dec 1999 17:10:51 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912232210.RAA19908@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <XFMail.991223165724.vev@michvhf.com> from Vince Vielhaber at
"Dec
23, 1999 04:57:24 pm"
To: Vince Vielhaber <vev@michvhf.com>
Date: Thu, 23 Dec 1999 17:10:51 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On 23-Dec-99 Bruce Momjian wrote:
OK I have:
8-space tabs: Tom Lane, Peter, Massimo
4-space tabs: Bruce, Andreas, Vince, Vadimopen bracket on if () line -
yes: Massimo, Peter
no: Bruce, Vadim
OK, sorry Vince. I was confused. Here is the updated tally. We can
keep voting until I run pgindent for 7.0.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 23 17:54:37 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id RAA64799
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 17:53:43 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 15164 invoked by uid 1001); 23 Dec 1999 22:53:46 -0000
Message-ID: <XFMail.991223175346.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <199912232210.RAA19908@candle.pha.pa.us>
Date: Thu, 23 Dec 1999 17:53:46 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
On 23-Dec-99 Bruce Momjian wrote:
On 23-Dec-99 Bruce Momjian wrote:
OK I have:
8-space tabs: Tom Lane, Peter, Massimo
4-space tabs: Bruce, Andreas, Vince, Vadimopen bracket on if () line -
yes: Massimo, Peter
no: Bruce, VadimOK, sorry Vince. I was confused. Here is the updated tally. We can
keep voting until I run pgindent for 7.0.
I just realized I'm not counted on the YES vote for the bracket. Can
you add me in there?
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Thu Dec 23 18:01:37 1999
Received: from druid.net (root@druid.net [216.126.72.98])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA67416
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 18:00:49 -0500 (EST) (envelope-from darcy@druid.net)
Received: from localhost (1548 bytes) by druid.net
via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp
(sender: <darcy>) (ident <darcy> using unix)
id <m121HCD-0000daC@druid.net> for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 17:58:57 -0500 (EST)
(Smail-3.2.0.104 1998-Nov-20 #4 built 1999-Apr-13)
Message-Id: <m121HCD-0000daC@druid.net>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <199912232155.QAA19191@candle.pha.pa.us> from Bruce Momjian at
"Dec 23, 1999 04:55:57 pm"
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Thu, 23 Dec 1999 17:58:57 -0500 (EST)
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
Cc: vadim@krs.ru, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL50 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Been busy and missed this discussion. Is it too late to vote?
8-space tabs: Tom Lane, Peter, Vince, Massimo
4-space tabs: Bruce, Andreas^^^^^^^^^^^^^
+ me
And me for 4 space tabs.
open bracket on if () line -
yes: Massimo, Peter
no: Bruce^^^
+ me
Me for next line too. It just seems so easy to see the blocks when the
brackets line up _and_ are on a line by themselves.
Was there a vote for brackets around 1 line statements? If so I vote no.
CC'ed to hackers list for all to see, so they don't think I am making
this up.
No one would ever believe that of you, Bruce.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
From bouncefilter Thu Dec 23 18:24:37 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id SAA70871
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 18:23:57 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m121HQP-0003kGC; Fri, 24 Dec 99 00:13 MET
Message-Id: <m121HQP-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: Re: [HACKERS] Source code format votes
To: pgman@candle.pha.pa.us (Bruce Momjian)
Date: Fri, 24 Dec 1999 00:13:37 +0100 (MET)
Cc: pgsql-hackers@postgreSQL.org
Reply-To: wieck@debis.com (Jan Wieck)
In-Reply-To: <199912232140.QAA18004@candle.pha.pa.us> from "Bruce Momjian" at
Dec 23, 99 04:40:36 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
OK you have:
8-space tabs: Tom Lane, Peter, Vince, Massimo, Jan
4-space tabs: Bruce, Andreas
open bracket on if () line -
yes: Massimo, Peter
no: Bruce, Jan
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Thu Dec 23 19:45:38 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA88549
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 19:44:54 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id TAA08203;
Thu, 23 Dec 1999 19:44:20 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
cc: zakkr@zf.jcu.cz (Karel Zak - Zakkr), sszabo@bigpanda.com
Subject: Re: [HACKERS] empty concatenate
In-reply-to: <m121CKg-0000daC@druid.net>
References: <m121CKg-0000daC@druid.net>
Comments: In-reply-to "D'Arcy" "J.M." Cain <darcy@druid.net>
message dated "Thu, 23 Dec 1999 12:47:22 -0500"
Date: Thu, 23 Dec 1999 19:44:20 -0500
Message-ID: <8200.945996260@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"D'Arcy" "J.M." Cain <darcy@druid.net> writes:
! Why is textcat() (and other) function called if result from this
function is ignored, it is bad spending (my CPU is not boredom). See
my 'C' example in my first letter...
This is the issue no matter which side of the debate you are on.
"Debate"? There's no debate --- everybody agrees that the current
fmgr interface doesn't handle NULLs reasonably. It's just a matter
of finding time to fix it. It's a fairly large project, given the
amount of code that needs to be touched.
regards, tom lane
From bouncefilter Thu Dec 23 19:50:38 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA89103
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 19:50:04 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id TAA08221;
Thu, 23 Dec 1999 19:49:26 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Source code format votes
In-reply-to: <199912232140.QAA18004@candle.pha.pa.us>
References: <199912232140.QAA18004@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Thu, 23 Dec 1999 16:40:36 -0500"
Date: Thu, 23 Dec 1999 19:49:25 -0500
Message-ID: <8218.945996565@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
open bracket on if () line -
yes: Massimo, Peter
no: Bruce
More votes?
No on that one. I actually prefer "if () {" myself, but not enough
to think that we should engage in wholesale reformatting of the source.
Our existing layout convention is not broken (unlike the tab situation ;-))
so don't fix it.
regards, tom lane
From bouncefilter Thu Dec 23 19:53:38 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA89515
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 19:53:11 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id TAA08238;
Thu, 23 Dec 1999 19:51:59 -0500 (EST)
To: Adriaan Joubert <a.joubert@albourne.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Index corruption
In-reply-to: <38626197.4ED6092F@albourne.com>
References: <38626197.4ED6092F@albourne.com>
Comments: In-reply-to Adriaan Joubert <a.joubert@albourne.com>
message dated "Thu, 23 Dec 1999 19:53:27 +0200"
Date: Thu, 23 Dec 1999 19:51:59 -0500
Message-ID: <8235.945996719@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Adriaan Joubert <a.joubert@albourne.com> writes:
Something in my pg_proc table got corrupted and when trying to
vacuum it, vacuum would create thousands of index files in the database
directory. It would just go into an endless loop and all it seems to do
is create files. Anybody else seen this before?
No, that's a new one AFAIK. I don't suppose you saved the state of your
DB before rebuilding it? I'd like to try to reproduce the problem...
regards, tom lane
From bouncefilter Thu Dec 23 21:34:39 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA10441
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 21:33:52 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA23454;
Thu, 23 Dec 1999 21:12:42 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912240212.VAA23454@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <8218.945996565@sss.pgh.pa.us> from Tom Lane at "Dec 23,
1999 07:49:25 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu, 23 Dec 1999 21:12:41 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
open bracket on if () line -
yes: Massimo, Peter
no: BruceMore votes?
No on that one. I actually prefer "if () {" myself, but not enough
to think that we should engage in wholesale reformatting of the source.
Our existing layout convention is not broken (unlike the tab situation ;-))
so don't fix it.
pgindent can be changed very easily to fix that if you prefer. The
change is no extra work. Let me put you down for yes on that.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 23 21:29:40 1999
Received: from druid.net (root@druid.net [216.126.72.98])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA07135
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 21:29:14 -0500 (EST) (envelope-from darcy@druid.net)
Received: from localhost (1846 bytes) by druid.net
via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp
(sender: <darcy>) (ident <darcy> using unix)
id <m121KTc-0000daC@druid.net> for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 21:29:08 -0500 (EST)
(Smail-3.2.0.104 1998-Nov-20 #4 built 1999-Apr-13)
Message-Id: <m121KTc-0000daC@druid.net>
Subject: Re: [HACKERS] empty concatenate
In-Reply-To: <8200.945996260@sss.pgh.pa.us> from Tom Lane at "Dec 23,
1999 07:44:20 pm"
To: tgl@sss.pgh.pa.us (Tom Lane)
Date: Thu, 23 Dec 1999 21:29:08 -0500 (EST)
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
Cc: pgsql-hackers@postgreSQL.org, zakkr@zf.jcu.cz, sszabo@bigpanda.com
Reply-To: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL50 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Thus spake Tom Lane
"D'Arcy" "J.M." Cain <darcy@druid.net> writes:
! Why is textcat() (and other) function called if result from this
function is ignored, it is bad spending (my CPU is not boredom). See
my 'C' example in my first letter...This is the issue no matter which side of the debate you are on.
"Debate"? There's no debate --- everybody agrees that the current
fmgr interface doesn't handle NULLs reasonably. It's just a matter
of finding time to fix it. It's a fairly large project, given the
amount of code that needs to be touched.
Well, it may have been a lopsided (and friendly) debate but there was
definitely two sides. The one (which I assume you mean as the one
that "everyone" accepts says to stick to SQL conformance and fix it
so that the functions are just never called. The other said to have
the functions called then use the value returned so that each function
could decide what to do with NULLs.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
From bouncefilter Thu Dec 23 23:01:40 1999
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA25893;
Thu, 23 Dec 1999 23:01:22 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from lorc.wgcr.org (dial-11.r7.ncbrvr.InfoAve.Net [206.74.232.81])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with SMTP id XAA12049;
Thu, 23 Dec 1999 23:01:21 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: pgsql-hackers@postgresql.org
Subject: Announcing PostgreSQL 6.5.3-3 and 6.5.3-3nl RPMs.
Date: Thu, 23 Dec 1999 22:49:17 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
Cc: pgsql-ports@postgresql.org, jbj@redhat.com, pgsql-announce@postgresql.org
MIME-Version: 1.0
Message-Id: <99122323051400.00550@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
Announcing PostgreSQL 6.5.3-3 and 6.5.3-3nl RPMs.
These RPMs are once again primarily bug fix RPMs, with the following additions:
* The header files necessary to build SPI applications are now included in the
/usr/include/pgsql tree in the appropriate places. To build an SPI program,
#include "spi.h" and use -I/usr/include/pgsql.
* The libpq++.H header (note the capital H...) was left out of previous
packages.
* The locale enabled RPMs now also have MultiByte enabled, and set to a default
of SQL_ASCII.
* The locale enabled RPMS include /usr/bin/pg_encoding, to set the MultiByte
encoding.
RPMs available for immediate download from
http://www.ramifordistat.net/postgres -- for bulk download, use 'wget -m
http://www.ramifordistat.net/postgres'.
Changelog from 6.5-1 to 6.5.3-3:
* Thu Dec 23 1999 Lamar Owen <lamar.owen@wgcr.org>
- 6.5.3-3 and 6.5.3-3nl RPMs.
- --with-mb=SQL_ASCII enabled.
* Wed Dec 22 1999 Lamar Owen <lamar.owen@wgcr.org>
- SPI headers in -devel
- Fixed libpq++.H funniness -- fully corrected in CURRENT
* Fri Nov 26 1999 Lamar Owen <lamar.owen@wgcr.org>
- Corrected security problem of /var/lib/pgsql being mode 755.
- /usr/lib/pgsql/backup permissions also a potential hole, though not
-- as serious as the /var/lib/pgsql hole
- Removed PostgreSQL-HOWTO until further notice. This HOWTO is worse
-- than having no documentation at all in its present form. When it is
-- corrected for accuracy and conciseness, it will be reinstated.
- Documentation updates in README.rpm
- Corrected some misinformation in /etc/rc.d/init.d/postgresql
* Fri Nov 05 1999 Lamar Owen <lamar.owen@wgcr.org>
- Add ARMV41 support, thanks to Mark Knox <segfault@hardline.org>
- Add patches for ARMV41
-- adds a 'linux_arm' template - Removed Excludearch for armv41
* Thu Nov 04 1999 Lamar Owen <lamar.owen@wgcr.org>
- Release 6.5.3-1
- ODBC odbcinst.ini in /usr/lib/pgsql (postgresql-odbc)
- ALPHA patchset unmodified from 6.5.2
-- tested by Ryan Kirkpatrick
- Documentation changes and additions in README.rpm
* Mon Nov 01 1999 Lamar Owen <lamar.owen@wgcr.org>
- Initial pre-6.5.3 build
-- 6.5.3-0.1
-- built from REL6_5_PATCHES CVS checkout
- pgaccess no longer a separate source file
-- 6.5.3 has pgaccess 0.98 fully
-- integrated
- fixed up patches
-- pgaccess patch, gram.y patch, and src/interfaces/Makefile
-- perl5 -> perl patch mainlined.
* Sat Sep 25 1999 Dale Lovelace <dale@redhat.com>
- Fix init script
- fix README.rpm
* Sat Sep 25 1999 Jeff Johnson <jbj@redhat.com>
- Red Hat 6.1 release candidate.
* Fri Sep 24 1999 Jeff Johnson <jbj@redhat.com>
- apply arithmetic operator patch to gram.y.
* Wed Sep 22 1999 Jeff Johnson <jbj@redhat.com>
- merge postgresql-6.5.2-0.2lo changes.
- Note: the postgresql description refers to postgresql-data but that can't be
changed until after 6.1 ships.
* Tue Sep 21 1999 Jeff Johnson <jbj@redhat.com>
- merge postgresql-6.5.1-0.7lo changes. Thanks Lamar!
- use uid = 40 for user postgres (will affect new installs only).
- postgresql-server needs prereq on /usr/sbin/useradd.
* Mon Sep 20 1999 Lamar Owen <lamar.owen@wgcr.org>
- 6.5.2-0.2lo
- Upgrade to 6.5.2
- Add some versioning to the init script
-- source is postgresql.init.VERSION
- Added some intelligence to init script
- Cleaned up the migration script packaging
-- now in a tarball
- Consolidated some patches
- Added the JDK 1.2 JDBC jar to the existing JDK1.1 jar.
* Sat Sep 18 1999 Lamar Owen <lamar.owen@wgcr.org>
- 0.7lo - First stab at integrating modified versions of the Debian migration scripts.
-- Courtesy Oliver Elphick, Debian package maintainer, PostgreSQL Global
-- Development Group.
- /usr/lib/pgsql/backup/pg_dumpall_new
-- a modifed pg_dumpall used in the
-- migration
-- modified to work with the older executables.
- /usr/bin/postgresql_dump
-- the migration script.
- Upgrade strategy:
--1.) %pre for main package saves old package's executables
--2.) the postgresql init script in -server detects PGDATA existence
-- and version, notifies user if upgrade is necessary
--3.) Rather than fully automating upgrade, the tools are provided:
-- a.) /usr/bin/postgresql-dump
-- b.) /usr/lib/pgsql/backup/pg_dumpall_new
-- c.) The executables backed up by %pre in /usr/lib/pgsql/backup
--4.) Documentation on RPM differences and upgrades in README.rpm
--5.) A fully automatic upgrade can be facilitated by some more code
-- in /etc/rc.d/init.d/postgresql, if desired.
- added documentation for rpm setup, and upgrade (README.rpm)
- added newer man pages from Thomas Lockhart
- Put the PL's in the right place
-- /usr/lib/pgsql, not /usr/lib. My error.
- Added Requires: postgresql = %{version} for all sub packages.
- Need to reorganize sources in next release, as the current number of source
-- files is a little large.
* Tue Sep 07 1999 Cristian Gafton <gafton@redhat.com>
- upgraded pgaccess to the latest 0.98 stable version
- fix braindead pgaccess installation and add pgaccess dosucmenattaion to
the package containing pgaccess rather than main package
- add missing templates tp the /usr/lib/pgsql directory
- added back the PostgreSQL howto (I wish people will STOP removing
documentation from this package!)
- get rid of the perl handling overkill
- "chkconfig --del" should be done in the server package, not the main
package
- make server packeg own only /etc/rc.d/init.d/postgresql, not the whole
/etc/rc.d (doh!)
- don't ship OS2 executable client as documenatation...
- if we have a -tcl subpackage, make sure that other packages don't need tcl
anymore by moving tcl-dependent binaries in the -tcl package... [pltcl.so]
- if we are using /sbin/chkconfig we don't need the /etc/rc.d/rc?.d symlinks
* Sat Sep 4 1999 Jeff Johnson <jbj@redhat.com>
- use _arch not (unknown!) buildarch macro (#4913).
* Fri Aug 20 1999 Jeff Johnson <jbj@redhat.com>
- obsolete postgres-clients (not conflicts).
* Thu Aug 19 1999 Jeff Johnson <jbj@redhat.com>
- add to Red Hat 6.1.
* Wed Aug 11 1999 Lamar Owen <lamar.owen@wgcr.org>
- Release 3lo
- Picked up pgaccess README.
- Built patch set for rpm versus tarball idiosyncrasies:
-- munged some paths in the regression tests (_OBJWD_), trigger functions
-- munged USER for regression tests.
-- Added perl and python examples
-- required patching the shebang to drop
-- local in /usr/local/bin
- Changed rc.d level from S99 to S75, as there are a few server daemons that
-- might actually need to load AFTER pgsql
-- AOLserver is an example.
- config.guess included in server package by default
-- used by regress tests.
- Preliminary test subpackage, containing entire src/test tree.
- Prebuild of binaries in the test subpackage.
- Added pgaccess-0.97 beta as /usr/bin/pgaccess97 for testing
- Removed the DATABASE-HOWTO; it was SO old, and the newer release of it
-- is a stock part of the RedHat HOWTOS package.
- Put in the RIGHT postgresql.init ('/etc/rc.d/init.d/postgresql')
- Noted that the perl client is operational.
* Fri Aug 6 1999 Lamar Owen <lamar.owen@wgcr.org>
- Release 2lo
- Added alpha patches courtesy Ryan Kirkpatrick and Uncle George
- Renamed lamar owen series of RPMS with release of #lo
- Put Ramifordistat as vendor and URL for lamar owen RPM series, until non-beta
-- release coordinated with PGDG.
* Mon Jul 19 1999 Lamar Owen <lamar.owen@wgcr.org>
- Correct some file misappropriations:
-- /usr/lib/pgsql was in wrong package
-- createlang, destroylang, and vacuumdb now in main package
-- ipcclean now in server subpackage
-- The static libraries are now in the devel subpackage
-- /usr/lib/plpgsql.so and /usr/lib/pltcl.so now in server
- Cleaned up some historical artifacts for readability
-- left references to these artifacts in the changelog
* Sat Jun 19 1999 Thomas Lockhart <lockhart@alumni.caltech.edu>
- deprecate clients rpm, and define a server rpm for the backend
- version 6.5
- updated pgaccess to version 0.96
- build ODBC interface library
- split tcl and ODBC packages into separate binary rpms
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Thu Dec 23 23:02:41 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA26789
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 23:02:35 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA24607;
Thu, 23 Dec 1999 22:55:23 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912240355.WAA24607@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votest
In-Reply-To: <m121HCD-0000daC@druid.net> from "D'Arcy J.M. Cain" at "Dec 23,
1999 05:58:57 pm"
To: "D'Arcy J.M. Cain" <darcy@druid.net>
Date: Thu, 23 Dec 1999 22:55:23 -0500 (EST)
CC: vadim@krs.ru, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Me for next line too. It just seems so easy to see the blocks when the
brackets line up _and_ are on a line by themselves.
I agree, but many don't, hence the vote.
Was there a vote for brackets around 1 line statements? If so I vote no.
No one has mentioned that, and I have removed most of them.
CC'ed to hackers list for all to see, so they don't think I am making
this up.No one would ever believe that of you, Bruce.
I want to make sure the voting remains unbiased, even though I am
tallying the votes.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 23 23:02:40 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA26715
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 23:02:14 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA24678;
Thu, 23 Dec 1999 22:55:57 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912240355.WAA24678@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <m121HQP-0003kGC@orion.SAPserv.Hamburg.dsh.de> from Jan Wieck at
"Dec 24, 1999 00:13:37 am"
To: Jan Wieck <wieck@debis.com>
Date: Thu, 23 Dec 1999 22:55:57 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Added.
OK you have:
8-space tabs: Tom Lane, Peter, Vince, Massimo, Jan
4-space tabs: Bruce, Andreasopen bracket on if () line -
yes: Massimo, Peter
no: Bruce, JanJan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Thu Dec 23 23:00:40 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA24149
for <pgsql-hackers@postgreSQL.org>;
Thu, 23 Dec 1999 23:00:31 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id WAA24834
for pgsql-hackers@postgreSQL.org; Thu, 23 Dec 1999 22:59:04 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912240359.WAA24834@candle.pha.pa.us>
Subject: Source code format votes
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Date: Thu, 23 Dec 1999 22:59:04 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Current tally:
8-space tabs: Tom Lane, Peter, Massimo, Jan
4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy
open bracket on if () line -
yes: Massimo, Peter, Vince, Tom Lane
no: Bruce, Vadim, D'Arcy, Jan
Man, both votes look very close.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 24 00:12:41 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA39893
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 00:11:55 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA09238;
Fri, 24 Dec 1999 00:09:58 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Source code format votes
In-reply-to: <199912240359.WAA24834@candle.pha.pa.us>
References: <199912240359.WAA24834@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Thu, 23 Dec 1999 22:59:04 -0500"
Date: Fri, 24 Dec 1999 00:09:58 -0500
Message-ID: <9235.946012198@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Man, both votes look very close.
If there's not a clear consensus to change, I think we have to stick
with what we have. (Sigh.)
regards, tom lane
From bouncefilter Fri Dec 24 00:16:41 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA40309
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 00:16:03 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from tpf.co.jp ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with ESMTP
id OAA02985; Fri, 24 Dec 1999 14:15:47 +0900
Message-ID: <386302B5.52B0D86B@tpf.co.jp>
Date: Fri, 24 Dec 1999 14:20:53 +0900
From: Hiroshi Inoue <Inoue@tpf.co.jp>
X-Mailer: Mozilla 4.51 [ja] (WinNT; I)
X-Accept-Language: ja
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Source code format votes
References: <199912240359.WAA24834@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
Current tally:
8-space tabs: Tom Lane, Peter, Massimo, Jan
4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy
Add me for 8-space tabs.
open bracket on if () line -
yes: Massimo, Peter, Vince, Tom Lane
no: Bruce, Vadim, D'Arcy, Jan
no:(current style ?)
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Fri Dec 24 00:27:41 1999
Received: from iximd.com (root@real.iximd.com [151.196.79.22])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA41617;
Fri, 24 Dec 1999 00:26:47 -0500 (EST)
(envelope-from dwalker@iximd.com)
Received: from vmware98 (dwalker.iximd.com [151.196.99.113])
by iximd.com (8.9.3/8.9.3) with SMTP id AAA18462;
Fri, 24 Dec 1999 00:35:46 -0500
Message-ID: <000f01bf4dd7$42008160$b263a8c0@vmware98.walkers.org>
From: "Damond Walker" <dwalker@iximd.com>
To: "PostgreSQL-development" <pgsql-hackers@postgreSQL.org>,
<owner-pgsql-hackers@postgreSQL.org>
Subject: Replication
Date: Fri, 24 Dec 1999 01:22:29 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
I've been thinking of taking a shot at implementing replication between
distributed servers. What I'm looking for at this point are gaping holes in
my reasoning/plans/etc. I had planned on doing this in Python but if that
proves to be troublesome (from a performance standpoint) then I will code
the thing in C. Though to be honest I'm not expecting that much trouble...
What I'm *not* talking about here is running distributed queries
Here's the replication system in a nutshell.
1) Using a configuration file format yet to be determined, define values
which denote: 1) the databases to replicate, 2) the tables to be replicated
[possibly, primary key information as well], and 3) the servers to be
included in the 'conversation.' This configuration file be a database on a
PostgreSQL server or a standard text file. Other information in this
2) Programatically add a column to represent the last time a row was
updated. This column will be named pgr_time or some other long column name
which won't be easily confused with user columns. If I read the
documentation correctly all dates and times are stored as Zulu (GT) time
correct? This should take care of time zones and the like. Further
direction (or a 'hey dummy, read this page') would be helpful here.
3) Programatically create plpgsql triggers to update the PGR_TIME field
on all inserts, updates. These triggers will call a plpgsql function to
update the field. The naming scheme will be
<table_name>_replicate_update_function and
<table_name>_replicate_update_trigger.
4) This program will be a stand-alone application which can be fired off
via cron or whatever scheduling application is used at the local site.
5) If you run the applet from the command line a GUI will pop up
allowing you to change replication settings or whatever. Running the applet
with any commandline will start the replication process. Further
commandline processing can take place to only replicate with one server or
show the status of the last or current replication attempts.
Replication, using this scheme anyway, is a simple matter of comparing a
few dates: 1) Give me a list of all rows which changed from the last
replication time. Using these rows, build a list of rows on the local
server and start comparing dates stored in the remote/local PGR_TIME field.
Depending on how the rows compare to each other, update the local or remote
tables.
Some kind of strategy will have to be developed to determine the depth
of the replication in the row itself. Do I do full row replication or do I
do fine grained (column level) replication? I'd prefer column level but
I'll probably start at row level with a "most current date/time stamp wins"
strategy as it's the easiest to get going.
I can see some serious performance problems as tables get huge (we're
talking a ton of network chit-chat here). How much is acceptable?
I have a problem with #2 and #3 from the standpoint that I don't like
tools "automagically" carressing my data if I can help it. That's when the
testing comes into play. On the flip side, a feature will have to be put in
place to clean up a replica (remove all replication functions/fields/etc)
from a database.
I havn't talked about security yet either... Do I write code to handle
the system catalogs as well? Or do I just stick to pushing data around?
Any "you're insane, why don't you just run home to momma" comments?
Damond
From bouncefilter Fri Dec 24 03:56:44 1999
Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net
[194.217.242.41]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA83610
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 03:56:24 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1)
id 121QWN-000Dok-0C; Fri, 24 Dec 1999 08:56:23 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id JAA06040;
Fri, 24 Dec 1999 09:44:41 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <ZLAGR8A4>; Fri, 24 Dec 1999 08:56:19 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70C009@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Bruce Momjian'" <pgman@candle.pha.pa.us>, PostgreSQL-development
<pgsql-hackers@postgresql.org>
Subject: RE: [HACKERS] Source code format votes
Date: Fri, 24 Dec 1999 08:56:08 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
I'd prefer 8-space tabs, mainly because I have to set emacs to 4-space
every time I enter a source file :-)
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: Thursday, December 23, 1999 9:41 PM
To: PostgreSQL-development
Subject: [HACKERS] Source code format votes
OK I have:
8-space tabs: Tom Lane, Peter, Vince, Massimo
4-space tabs: Bruce, Andreas
open bracket on if () line -
yes: Massimo, Peter
no: Bruce
More votes?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania
19026
************
From bouncefilter Fri Dec 24 04:31:44 1999
Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net
[194.217.242.89]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA92437
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 04:31:33 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1)
id 121R4O-000HNL-0V; Fri, 24 Dec 1999 09:31:32 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id KAA06156;
Fri, 24 Dec 1999 10:19:52 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <ZLAGR8A7>; Fri, 24 Dec 1999 09:31:29 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70C00A@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Bruce Momjian'" <pgman@candle.pha.pa.us>, PostgreSQL-development
<pgsql-hackers@postgresql.org>
Subject: RE: [HACKERS] Source code format votes
Date: Fri, 24 Dec 1999 09:31:21 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
Yes for the open-bracket on if() on line.
Also, remember that for Java, // marks the begining of an inline
comment, terminating at the end-of-line.
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: Friday, December 24, 1999 3:59 AM
To: PostgreSQL-development
Subject: [HACKERS] Source code format votes
Current tally:
8-space tabs: Tom Lane, Peter, Massimo, Jan
4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy
open bracket on if () line -
yes: Massimo, Peter, Vince, Tom Lane
no: Bruce, Vadim, D'Arcy, Jan
Man, both votes look very close.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania
19026
************
From bouncefilter Fri Dec 24 04:33:44 1999
Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net
[194.217.242.89]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA92586
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 04:32:53 -0500 (EST)
(envelope-from petermount@it.maidstone.gov.uk)
Received: from mailgate.maidstone.gov.uk ([194.159.6.98]
helo=gatekeeper.maidstone.gov.uk)
by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1)
id 121R5g-000HSw-0V; Fri, 24 Dec 1999 09:32:52 +0000
Received: from exchange1.nt.maidstone.gov.uk (exchange1.nt.maidstone.gov.uk
[172.16.0.150])
by gatekeeper.maidstone.gov.uk (8.9.3/8.9.3) with ESMTP id KAA06160;
Fri, 24 Dec 1999 10:21:12 GMT
Received: by exchange1.nt.maidstone.gov.uk with Internet Mail Service
(5.5.1960.3) id <ZLAGR8A8>; Fri, 24 Dec 1999 09:32:49 -0000
Message-ID:
<1B3D5E532D18D311861A00600865478C70C00B@exchange1.nt.maidstone.gov.uk>
From: Peter Mount <petermount@it.maidstone.gov.uk>
To: "'Bruce Momjian'" <pgman@candle.pha.pa.us>, "D'Arcy J.M. Cain"
<darcy@druid.net>
Cc: vadim@krs.ru, pgsql-hackers@postgresql.org
Subject: RE: [HACKERS] Source code format votest
Date: Fri, 24 Dec 1999 09:32:45 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)
Content-Type: text/plain
Java's ok with them removed from 1 line statements, but perl requires
the brackets.
Peter
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: Friday, December 24, 1999 3:55 AM
To: D'Arcy J.M. Cain
Cc: vadim@krs.ru; pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Source code format votest
Me for next line too. It just seems so easy to see the blocks when
the
brackets line up _and_ are on a line by themselves.
I agree, but many don't, hence the vote.
Was there a vote for brackets around 1 line statements? If so I vote
no.
No one has mentioned that, and I have removed most of them.
CC'ed to hackers list for all to see, so they don't think I am
making
this up.
No one would ever believe that of you, Bruce.
I want to make sure the voting remains unbiased, even though I am
tallying the votes.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania
19026
************
From bouncefilter Fri Dec 24 05:03:45 1999
Received: from mail.ngi.de ([195.243.0.227])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA99813
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 05:03:15 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: from p3E9D3E35.dip0.t-ipconnect.de
(root@p3E9D3E35.dip0.t-ipconnect.de [62.157.62.53])
by mail.ngi.de (8.9.3/8.9.3) with ESMTP id LAA80672
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 11:04:46 +0100 (CET)
(envelope-from michael@fam-meskes.de)
Received: (from michael@localhost)
by tanja.fam-meskes.de (8.9.3/8.9.0/Debian/GNU) id KAA00367
for pgsql-hackers@postgresql.org; Fri, 24 Dec 1999 10:52:37 +0100
Date: Fri, 24 Dec 1999 10:52:37 +0100
From: Michael Meskes <meskes@postgresql.org>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Source code format votes
Message-ID: <19991224105237.A357@fam-meskes.de>
Mail-Followup-To: PostgreSQL-development <pgsql-hackers@postgresql.org>
References: <199912240359.WAA24834@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0i
In-Reply-To: <199912240359.WAA24834@candle.pha.pa.us>;
from pgman@candle.pha.pa.us on Thu, Dec 23, 1999 at 10:59:04PM
-0500
On Thu, Dec 23, 1999 at 10:59:04PM -0500, Bruce Momjian wrote:
Current tally:
8-space tabs: Tom Lane, Peter, Massimo, Jan
Count me in on 8.
4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy
open bracket on if () line -
yes: Massimo, Peter, Vince, Tom Lane
no: Bruce, Vadim, D'Arcy, Jan
I have no problems with both. But if I have to choose I say: no.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Fri Dec 24 04:53:44 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA94494
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 04:53:03 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1])
by hu.tm.ee (Postfix) with ESMTP id C4C2FB4E9
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 11:56:19 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <38634343.B03C430B@tm.ee>
Date: Fri, 24 Dec 1999 11:56:19 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "pgsql-hackers@postgreSQL.org" <pgsql-hackers@postgreSQL.org>
Subject: Is there a tool to get at old/deleted tuples ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I know that time travel is not supported any more
but has anyone written a tool that lets you extract
old tuples from a table file ?
We have a customer who demanded the ability to permanently
delete records and who now wants them back.
They have not run vacuum on their tables, so the data
should still be there.
So, has anyone written such tool or should I roll my own ?
----------------
Hannu
From bouncefilter Fri Dec 24 06:55:46 1999
Received: from vulcan.ifnet.com.br (vulcan.ifnet.com.br [200.203.210.18])
by hub.org (8.9.3/8.9.3) with ESMTP id GAA19014
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 06:55:25 -0500 (EST)
(envelope-from mateus@ifnet.com.br)
Received: from ifnet.com.br (IDENT:root@gw4-ppp15.ifnet.com.br
[200.224.74.185])
by vulcan.ifnet.com.br (8.9.3/8.9.3) with ESMTP id JAA02022
for <pgsql-hackers@postgresql.org>; Fri, 24 Dec 1999 09:58:32 -0200
Received: (from mateus@localhost) by ifnet.com.br (8.9.3/8.9.3) id JAA01040;
Fri, 24 Dec 1999 09:55:15 -0200
From: Mateus Cordeiro Inssa <mateus@ifnet.com.br>
Message-ID: <14435.24355.627616.355738@Blaublau.home.br>
Date: Fri, 24 Dec 1999 09:55:15 -0200 (EDT)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: pgsql-hackers@postgresql.org
Subject: Error "vacuum pg_proc"
X-Mailer: VM 6.71 under 21.1 (patch 4) "Arches" XEmacs Lucid
X-Face: "|YUb*(O#,z=WN#Ez3~WeW{ZQ2w<Y/?6t>t-lKh/"d:#gq~!Bl&q+_,z+|KAB1C'oqyF_;
P O=40^mm!nklMDs:aXGjL4C1EcM\yMJsA8:F[9
Hi,
I got this error vacuuming pg_proc:
ERROR: _bt_endpoint: leftmost page (20) has not leftmost flag
It's postgresql 6.5.3 (Linux).
[]'s
Mateus Cordeiro Inssa
---------------------
Linux User: 76186 Kernel: 2.3.34
ICQ (Licq): 15243895
---------------------
mateus@ifnet.com.br
mateus@cwb.fnn.net
Fri Dec 24 09:55:14 EDT 1999
From bouncefilter Fri Dec 24 10:08:48 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA56592
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 10:08:25 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA12154;
Fri, 24 Dec 1999 10:06:36 -0500 (EST)
To: Peter Mount <petermount@it.maidstone.gov.uk>
cc: "'Bruce Momjian'" <pgman@candle.pha.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Source code format votes
In-reply-to:
<1B3D5E532D18D311861A00600865478C70C009@exchange1.nt.maidstone.gov.uk>
References:
<1B3D5E532D18D311861A00600865478C70C009@exchange1.nt.maidstone.gov.uk>
Comments: In-reply-to Peter Mount <petermount@it.maidstone.gov.uk>
message dated "Fri, 24 Dec 1999 08:56:08 +0000"
Date: Fri, 24 Dec 1999 10:06:36 -0500
Message-ID: <12151.946047996@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Peter Mount <petermount@it.maidstone.gov.uk> writes:
I'd prefer 8-space tabs, mainly because I have to set emacs to 4-space
every time I enter a source file :-)
Not if you know how to configure Emacs properly ;-)
You need to put two things in your ~/.emacs. First you need a
suitable mode-setting command, for which I use
; Cmd to set tab stops &etc for working with PostgreSQL code
(defun pgsql-c-mode ()
"Set PostgreSQL C indenting conventions in current buffer."
(interactive)
(c-mode) ; make sure major mode is right
(setq tab-width 4) ; adjust to nonstandard tab width
(c-set-style "bsd") ; indent conventions are BSD
(c-set-offset 'case-label '+) ; except we indent case labels
)
Now the above can be invoked by hand, but Peter E. showed me the
following trick for having it called automatically: add entries to your
auto-mode-alist that match both the start and end of the pathname,
so that pgsql-c-mode is automatically called for C files living in a
particular region of your filesystem. Mine looks like
(setq auto-mode-alist
(cons '("\\`/home/postgres/.*\\.[chyl]\\'" . pgsql-c-mode)
(cons '("\\`/home/tgl/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
auto-mode-alist)))
This has the effect of setting Pgsql mode automatically for any .c, .h,
.y, or .l file underneath either /home/postgres/ or /home/tgl/pgsql/.
Adjust to taste and never think about tabs again.
BTW, Bruce suggested adding Local-variables settings to all the source
files to push Emacs into making the right settings, but I much prefer
doing it as above. Local-variables is an insecure feature if you ask
me; I keep it disabled.
regards, tom lane
From bouncefilter Fri Dec 24 10:29:48 1999
Received: from bocs170n.black-oak.COM ([38.149.137.131])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA58795
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 10:29:00 -0500 (EST)
(envelope-from DWalker@black-oak.com)
From: DWalker@black-oak.com
To: pgsql-hackers@postgreSQL.org
Cc:
Subject: database replication
Date: Fri, 24 Dec 1999 10:27:59 -0500
Message-ID: <OFD38C9424.B391F434-ON85256851.0054F41A@black-oak.COM>
X-Priority: 3 (Normal)
X-MIMETrack: Serialize by Router on notes01n/BOCS(Release 5.0.1|July 16,
1999) at 12/24/99 10:28:01 AM
MIME-Version: 1.0
MIME-Version: 1.0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<P>I've been toying with the idea of implementing database replication for =
the last few days. The system I'm proposing will be a seperate progra=
m which can be run on any machine and will most likely be implemented in Py=
thon. What I'm looking for at this point are gaping holes in my think=
ing/logic/etc. Here's what I'm thinking...</P><P> </P><P>1) I wa=
nt to make this program an additional layer over PostgreSQL. I really=
don't want to hack server code if I can get away with it. At this po=
int I don't feel I need to.</P><P>2) The replication system will need to ad=
d at least one field to each table in each database that needs to be replic=
ated. This field will be a date/time stamp which identifies the "=
;last update" of the record. This field will be called PGR=5FTIM=
E for lack of a better name. Because this field will be used from wit=
hin programs and triggers it can be longer so as to not mistake it for a us=
er field.</P><P>3) For each table to be replicated the replication system w=
ill programatically add one plpgsql function and trigger to modify the PGR=
=5FTIME field on both UPDATEs and INSERTs. The name of this function =
and trigger will be along the lines of <table=5Fname>=5Freplication=
=5Fupdate=5Ftrigger and <table=5Fname>=5Freplication=5Fupdate=5Ffunct=
ion. The function is a simple two-line chunk of code to set the field=
PGR=5FTIME equal to NOW. The trigger is called before each insert/up=
date. When looking at the Docs I see that times are stored in Zulu (G=
T) time. Because of this I don't have to worry about time zones and t=
he like. I need direction on this part (such as "hey dummy, look=
at page N of file X.").</P><P>4) At this point we have tables which c=
an, at a basic level, tell the replication system when they were last updat=
ed.</P><P>5) The replication system will have a database of its own to reco=
rd the last replication event, hold configuration, logs, etc. I'd pre=
fer to store the configuration in a PostgreSQL table but it could just as e=
asily be stored in a text file on the filesystem somewhere.</P><P>6) To han=
dle replication I basically check the local "last replication time&quo=
t; and compare it against the remote PGR=5FTIME fields. If the remote=
PGR=5FTIME is greater than the last replication time then change the local=
copy of the database, otherwise, change the remote end of the database. &n=
bsp;At this point I don't have a way to know WHICH field changed between th=
e two replicas so either I do ROW level replication or I check each field. =
I check PGR=5FTIME to determine which field is the most current. &nbs=
p;Some fine tuning of this process will have to occur no doubt.</P><P>7) Th=
e commandline utility, fired off by something like cron, could run several =
times during the day -- command line parameters can be implemented to say P=
USH ALL CHANGES TO SERVER A, or PULL ALL CHANGES FROM SERVER B.</P><P> =
;</P><P>Questions/Concerns:</P><P>1) How far do I go with this? Do I =
start manhandling the system catalogs (pg=5F* tables)?</P><P>2) As to #2 an=
d #3 above, I really don't like tools automagically changing my tables but =
at this point I don't see a way around it. I guess this is where the =
testing comes into play.</P><P>3) Security: the replication app will have t=
o have pretty good rights to the database so it can add the nessecary funct=
ions and triggers, modify table schema, etc. </P><P> </P><P>&nbs=
p; So, any "you're insane and should run home to momma" comments?=
</P><P> </P><P> Damond=
</P><P></P>=
From bouncefilter Fri Dec 24 10:54:48 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA64260
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 10:53:59 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA12361;
Fri, 24 Dec 1999 10:52:50 -0500 (EST)
To: Mateus Cordeiro Inssa <mateus@ifnet.com.br>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-reply-to: <14435.24355.627616.355738@Blaublau.home.br>
References: <14435.24355.627616.355738@Blaublau.home.br>
Comments: In-reply-to Mateus Cordeiro Inssa <mateus@ifnet.com.br>
message dated "Fri, 24 Dec 1999 09:55:15 -0200"
Date: Fri, 24 Dec 1999 10:52:50 -0500
Message-ID: <12358.946050770@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Mateus Cordeiro Inssa <mateus@ifnet.com.br> writes:
I got this error vacuuming pg_proc:
ERROR: _bt_endpoint: leftmost page (20) has not leftmost flag
Hmm, I wonder if this could be yet another manifestation of the problems
that btree indexes have with oversized key values. Do you have any
procedures with long definitions? "Long" in this context means over
about 4K. If you're not sure, try
select proname from pg_proc where length(prosrc) > 4000;
If you do, try breaking them up into smaller procedures. You might have
to dump and rebuild the database to get rid of the corruption in
pg_proc's index, though.
The reason this is an issue is that btree wants to be able to store at
least two index tuples per disk page, so it has problems with indexing
values over half-a-page-less-overhead. I'm not sure exactly what the
critical size is, but it is somewhere around 4000 bytes. And pg_proc
has an index on the prosrc field.
The prosrc index is actually completely unnecessary, so we've removed
it for 7.0. Work is in progress to fix the tuple-size problem as well,
but that will probably take longer.
regards, tom lane
From bouncefilter Fri Dec 24 11:41:49 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA74787
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 11:41:15 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA00427
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 11:41:13 -0500 (EST)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA11621;
Fri, 24 Dec 1999 11:13:39 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912241613.LAA11621@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <9235.946012198@sss.pgh.pa.us> from Tom Lane at "Dec 24,
1999 00:09:58 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 24 Dec 1999 11:13:39 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Man, both votes look very close.
If there's not a clear consensus to change, I think we have to stick
with what we have. (Sigh.)
Don't give up now, Tom. With today's votes, you are winning.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 24 11:41:49 1999
Received: from trends.net (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA74776
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 11:41:05 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by trends.net (8.8.8/8.8.8) with ESMTP id LAA00415
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 11:41:02 -0500 (EST)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA11807;
Fri, 24 Dec 1999 11:18:42 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912241618.LAA11807@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votest
In-Reply-To:
<1B3D5E532D18D311861A00600865478C70C00B@exchange1.nt.maidstone.gov.uk>
from Peter Mount at "Dec 24, 1999 09:32:45 am"
To: Peter Mount <petermount@it.maidstone.gov.uk>
Date: Fri, 24 Dec 1999 11:18:42 -0500 (EST)
CC: "D'Arcy J.M. Cain" <darcy@druid.net>, vadim@krs.ru,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Java's ok with them removed from 1 line statements, but perl requires
the brackets.
As does tcl. Fortunately, pgindent doesn't touch those files.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 24 11:33:49 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA73962
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 11:32:51 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA12092;
Fri, 24 Dec 1999 11:24:06 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912241624.LAA12092@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <12151.946047996@sss.pgh.pa.us> from Tom Lane at "Dec 24,
1999 10:06:36 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 24 Dec 1999 11:24:06 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Current vote totals:
(7) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,
Michael
(5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcy
open bracket on if () line -
(5) yes: Massimo, Peter, Vince, Tom Lane, Peter M.
(6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 24 11:46:49 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA75437
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 11:46:13 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
LAA12733;
Fri, 24 Dec 1999 11:43:19 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912241643.LAA12733@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <12151.946047996@sss.pgh.pa.us> from Tom Lane at "Dec 24,
1999 10:06:36 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Fri, 24 Dec 1999 11:43:19 -0500 (EST)
CC: Peter Mount <petermount@it.maidstone.gov.uk>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Peter Mount <petermount@it.maidstone.gov.uk> writes:
I'd prefer 8-space tabs, mainly because I have to set emacs to 4-space
every time I enter a source file :-)Not if you know how to configure Emacs properly ;-)
You need to put two things in your ~/.emacs. First you need a
suitable mode-setting command, for which I use; Cmd to set tab stops &etc for working with PostgreSQL code
(defun pgsql-c-mode ()
"Set PostgreSQL C indenting conventions in current buffer."
(interactive)
(c-mode) ; make sure major mode is right
(setq tab-width 4) ; adjust to nonstandard tab width
(c-set-style "bsd") ; indent conventions are BSD
(c-set-offset 'case-label '+) ; except we indent case labels
)Now the above can be invoked by hand, but Peter E. showed me the
following trick for having it called automatically: add entries to your
auto-mode-alist that match both the start and end of the pathname,
so that pgsql-c-mode is automatically called for C files living in a
particular region of your filesystem. Mine looks like(setq auto-mode-alist
(cons '("\\`/home/postgres/.*\\.[chyl]\\'" . pgsql-c-mode)
(cons '("\\`/home/tgl/pgsql/.*\\.[chyl]\\'" . pgsql-c-mode)
auto-mode-alist)))
Developers FAQ updated with this macro.
This has the effect of setting Pgsql mode automatically for any .c, .h,
.y, or .l file underneath either /home/postgres/ or /home/tgl/pgsql/.
Adjust to taste and never think about tabs again.BTW, Bruce suggested adding Local-variables settings to all the source
files to push Emacs into making the right settings, but I much prefer
doing it as above. Local-variables is an insecure feature if you ask
me; I keep it disabled.
OK. I just know some developers added them on their own, so it
certainly is an issue for them.
Also, is there a way to add a dot-file in a directory to control default
formatting, but still allow the main .emacs to be read? .exrc is used
for vi and it controls formatting for all files edited in that
directory.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 24 11:56:49 1999
Received: from fep132.fep.ru (mail@fep132.fep.ru [195.230.89.88])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA76886
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 11:56:11 -0500 (EST) (envelope-from phd@phd.russ.ru)
Received: from localhost [127.0.0.1] (phd)
by fep132.fep.ru with esmtp (Exim 2.05 #1 (Debian))
id 121Y0Z-0002QP-00; Fri, 24 Dec 1999 19:56:03 +0300
Date: Fri, 24 Dec 1999 16:56:03 +0000 (GMT)
From: Oleg Broytmann <phd@phd.russ.ru>
X-Sender: phd@fep132.fep.ru
Reply-To: phd2@earthling.net
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <199912241624.LAA12092@candle.pha.pa.us>
Message-ID: <Pine.LNX.4.21.9912241654580.9317-100000@fep132.fep.ru>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
D'Arcy,
your signature fits here very well, I think...
On Fri, 24 Dec 1999, Bruce Momjian wrote:
Current vote totals:
(7) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,
Michael
(5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcyopen bracket on if () line -
(5) yes: Massimo, Peter, Vince, Tom Lane, Peter M.
(6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.
Oleg.
----
Oleg Broytmann http://members.xoom.com/phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.
From bouncefilter Fri Dec 24 12:24:49 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA82586
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 12:24:03 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA12662;
Fri, 24 Dec 1999 12:21:30 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Peter Mount <petermount@it.maidstone.gov.uk>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Source code format votes
In-reply-to: <199912241643.LAA12733@candle.pha.pa.us>
References: <199912241643.LAA12733@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Fri, 24 Dec 1999 11:43:19 -0500"
Date: Fri, 24 Dec 1999 12:21:30 -0500
Message-ID: <12659.946056090@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
BTW, Bruce suggested adding Local-variables settings to all the source
files to push Emacs into making the right settings, but I much prefer
doing it as above. Local-variables is an insecure feature if you ask
me; I keep it disabled.
OK. I just know some developers added them on their own, so it
certainly is an issue for them.
Yes, I notice Thomas has all of the .sgml files set up with
Local-variables settings. I think that adding a pgsql-sgml-mode
along the same lines as I just illustrated would be a much better
way of handling it.
Also, is there a way to add a dot-file in a directory to control default
formatting, but still allow the main .emacs to be read?
I don't think so. If there were, it'd have the same kinds of security
risks as Local-variables has (visit someone else's file, auto-execute
someone else's code ... not cool).
regards, tom lane
From bouncefilter Fri Dec 24 12:52:50 1999
Received: from paprika.michvhf.com (paprika.michvhf.com [209.57.60.12])
by hub.org (8.9.3/8.9.3) with SMTP id MAA88297
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 12:52:15 -0500 (EST) (envelope-from vev@michvhf.com)
Received: (qmail 17903 invoked by uid 1001); 24 Dec 1999 17:52:17 -0000
Message-ID: <XFMail.991224125217.vev@michvhf.com>
X-Mailer: XFMail 1.4.0 on FreeBSD
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
In-Reply-To: <12659.946056090@sss.pgh.pa.us>
Date: Fri, 24 Dec 1999 12:52:17 -0500 (EST)
X-Face: *<Qp5V!eyV,gni`N^N%1YX'$I&uuX]ay;
oq#ZL5Hn8EQsu'.oK0j9$#JM0V?!=Q^[i.81u9
@~=ZjeI}gHY`?2_1,xy/,Gde>0^4Iw)<k8}vg!%l;
&]@PF0LjU)N*m*2"R^UO+PAQ<w}/y)5UVE==w
H$q0*b`HN{+Ekeo?5V(0$MH&NZA3~vOThJxhY(7M:"`CrqO9[VC!^W&&eih!MTq4qk=Vg'd&`{dpgp
3-nck}7do'o/|<RI,
igc#cg8t|PZUEh{Rrx4<~tm`/G8E*wE{G:x}bva@[+YVT`g(u]*^!`1iO*
Sender: vev@paprika.michvhf.com
From: Vince Vielhaber <vev@michvhf.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [HACKERS] Source code format votes
Cc: Peter Mount <petermount@it.maidstone.gov.uk>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>,
Bruce Momjian <pgman@candle.pha.pa.us>
On 24-Dec-99 Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
BTW, Bruce suggested adding Local-variables settings to all the source
files to push Emacs into making the right settings, but I much prefer
doing it as above. Local-variables is an insecure feature if you ask
me; I keep it disabled.OK. I just know some developers added them on their own, so it
certainly is an issue for them.Yes, I notice Thomas has all of the .sgml files set up with
Local-variables settings. I think that adding a pgsql-sgml-mode
along the same lines as I just illustrated would be a much better
way of handling it.
Umm.. That might've been me. I reformatted all the sgml files last
year and added the missing close tags. I seem to recall having some
problems with saving files and my preferences - too new to xemacs at
the time.
Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
128K ISDN: $24.95/mo or less - 56K Dialup: $17.95/mo or less at Pop4
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================
From bouncefilter Sun Dec 26 11:42:21 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA15606
for <pgsql-hackers@postgreSQL.org>;
Sun, 26 Dec 1999 11:41:56 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id TAA04262;
Fri, 24 Dec 1999 19:05:46 GMT
Sender: lockhart@hub.org
Message-ID: <3863C40A.487273C6@alumni.caltech.edu>
Date: Fri, 24 Dec 1999 19:05:46 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Vince Vielhaber <vev@michvhf.com>
CC: Tom Lane <tgl@sss.pgh.pa.us>,
Peter Mount <petermount@it.maidstone.gov.uk>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>,
Bruce Momjian <pgman@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
References: <XFMail.991224125217.vev@michvhf.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
OK. I just know some developers added them on their own, so it
certainly is an issue for them.Yes, I notice Thomas has all of the .sgml files set up with
Local-variables settings. I think that adding a pgsql-sgml-mode
along the same lines as I just illustrated would be a much better
way of handling it.
Yeah, probably. So far it hasn't been a problem for the large number
of sgml doc writers (note heavy sarcasm ;)
Umm.. That might've been me. I reformatted all the sgml files last
year and added the missing close tags. I seem to recall having some
problems with saving files and my preferences - too new to xemacs at
the time.
Nope, they've been there from the beginning...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Fri Dec 24 16:29:52 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id QAA26219
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 16:29:19 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Hamster.DoCS.UU.SE (e99re41@Hamster.DoCS.UU.SE [130.238.9.95])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id WAA23111;
Fri, 24 Dec 1999 22:29:11 +0100
Received: from localhost (e99re41@localhost) by Hamster.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id WAA11073;
Fri, 24 Dec 1999 22:29:37 +0100
X-Authentication-Warning: Hamster.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Fri, 24 Dec 1999 22:29:37 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Re: initdb.sh fixed
In-Reply-To: <199912200440.XAA25315@candle.pha.pa.us>
Message-ID: <Pine.GSO.4.02A.9912242228200.11069-100000@Hamster.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sun, 19 Dec 1999, Bruce Momjian wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
We could argue that Postgres is the super-user for the database, it
should be zero userid.Actually, that's quite a good thought --- is there *any* real need
for initdb to extract the UID of the postgres user? What we do need,
I think, is the *name* of the postgres user, which we might perhaps
get with something likewhoami 2>/dev/null || id -u -n 2>/dev/null || echo postgres
We currently have:
EffectiveUser=`id -n -u 2> /dev/null` || EffectiveUser=`whoami 2> /dev/null`
If neither one of these resulted in anything it will ask you to provide a
string with --username. But I figure one must have one of those.
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 24 16:35:52 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id QAA29770
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 16:35:32 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Hamster.DoCS.UU.SE (e99re41@Hamster.DoCS.UU.SE [130.238.9.95])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id WAA23122;
Fri, 24 Dec 1999 22:35:31 +0100
Received: from localhost (e99re41@localhost) by Hamster.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id WAA11077;
Fri, 24 Dec 1999 22:35:57 +0100
X-Authentication-Warning: Hamster.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Fri, 24 Dec 1999 22:35:57 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Keith Parks <emkxp01@mtcc.demon.co.uk>
cc: pgman@candle.pha.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: initdb.sh fixed7
In-Reply-To: <199912202057.UAA07348@mtcc.demon.co.uk>
Message-ID: <Pine.GSO.4.02A.9912242235260.11069-100000@Hamster.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
pg_id converts from username to uid, we need the other way.
On Mon, 20 Dec 1999, Keith Parks wrote:
Bruce Momjian <pgman@candle.pha.pa.us>
Oh, this is bad news. I see what you are saying. In 6.5.*, we had
pg_id, which was used to do this. We still have pg_id, but I assume the
attempt was to remove reliance ont that in the new initdb.sh. Right
Peter?If so, can you suggest a solution under Solaris for getting the user id
value?I wonder if pg_id was the result of a similar portability
discussion/problem some years ago ;-)I'd vote for keeping pg_id, if then we are free'd from all the
portability issues. (getpwent() is portable?)Keith
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 24 16:40:52 1999
Received: from Radha.DoCS.UU.SE (root@Radha.DoCS.UU.SE [130.238.9.99])
by hub.org (8.9.3/8.9.3) with SMTP id QAA30521
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 16:40:25 -0500 (EST)
(envelope-from e99re41@DoCS.UU.SE)
Received: from Hamster.DoCS.UU.SE (e99re41@Hamster.DoCS.UU.SE [130.238.9.95])
by Radha.DoCS.UU.SE (8.6.12/8.6.12) with ESMTP id WAA23139;
Fri, 24 Dec 1999 22:40:24 +0100
Received: from localhost (e99re41@localhost) by Hamster.DoCS.UU.SE
(8.6.12/8.6.12) with SMTP id WAA11081;
Fri, 24 Dec 1999 22:40:51 +0100
X-Authentication-Warning: Hamster.DoCS.UU.SE: e99re41 owned process doing -bs
Date: Fri, 24 Dec 1999 22:40:50 +0100 (MET)
From: Peter Eisentraut <e99re41@DoCS.UU.SE>
Reply-To: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <199912232140.QAA18004@candle.pha.pa.us>
Message-ID: <Pine.GSO.4.02A.9912242239150.11069-100000@Hamster.DoCS.UU.SE>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 23 Dec 1999, Bruce Momjian wrote:
OK I have:
8-space tabs: Tom Lane, Peter, Vince, Massimo
(I'm still for 4 space indent though.)
4-space tabs: Bruce, Andreas
open bracket on if () line -
yes: Massimo, Peter
no: Bruce
I really don't mind this too much. I'm getting used to it.
More votes?
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From bouncefilter Fri Dec 24 17:05:53 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA36362
for <pgsql-hackers@postgreSQL.org>;
Fri, 24 Dec 1999 17:05:40 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
RAA20449;
Fri, 24 Dec 1999 17:03:56 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912242203.RAA20449@candle.pha.pa.us>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <Pine.GSO.4.02A.9912242239150.11069-100000@Hamster.DoCS.UU.SE>
from Peter Eisentraut at "Dec 24, 1999 10:40:50 pm"
To: Peter Eisentraut <peter_e@gmx.net>
Date: Fri, 24 Dec 1999 17:03:56 -0500 (EST)
CC: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Thu, 23 Dec 1999, Bruce Momjian wrote:
OK I have:
8-space tabs: Tom Lane, Peter, Vince, Massimo
(I'm still for 4 space indent though.)
Yes, everyone seems to like the current indent value.
4-space tabs: Bruce, Andreas
open bracket on if () line -
yes: Massimo, Peter
no: BruceI really don't mind this too much. I'm getting used to it.
Let me know if anyone wants their vote changed.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Fri Dec 24 19:21:54 1999
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA57680
for <pgsql-hackers@postgresql.org>;
Fri, 24 Dec 1999 19:21:25 -0500 (EST)
(envelope-from ELOEHR@austin.rr.com)
Received: from austin.rr.com ([24.93.40.248]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Fri, 24 Dec 1999 18:12:50 -0600
Sender: ed
Message-ID: <38640E2D.75136600@austin.rr.com>
Date: Fri, 24 Dec 1999 18:22:05 -0600
From: Ed Loehr <ELOEHR@austin.rr.com>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: DWalker@black-oak.com
CC: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] database replication
References: <OFD38C9424.B391F434-ON85256851.0054F41A@black-oak.COM>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
DWalker@black-oak.com wrote:
6) To handle replication I basically check the local "last
replication time" and compare it against the remote PGR_TIME
fields. If the remote PGR_TIME is greater than the last replication
time then change the local copy of the database, otherwise, change
the remote end of the database. At this point I don't have a way to
know WHICH field changed between the two replicas so either I do ROW
level replication or I check each field. I check PGR_TIME to
determine which field is the most current. Some fine tuning of this
process will have to occur no doubt.
Interesting idea. I can see how this might sync up two databases
somehow. For true replication, however, I would always want every
replicated database to be, at the very least, internally consistent
(i.e., referential integrity), even if it was a little behind on
processing transactions. In this method, its not clear how
consistency is every achieved/guaranteed at any point in time if the
input stream of changes is continuous. If the input stream ceased,
then I can see how this approach might eventually catch up and totally
resync everything, but it looks *very* computationally expensive.
But I might have missed something. How would internal consistency be
maintained?
7) The commandline utility, fired off by something like cron, could
run several times during the day -- command line parameters can be
implemented to say PUSH ALL CHANGES TO SERVER A, or PULL ALL CHANGES
FROM SERVER B.
My two cents is that, while I can see this kind of database syncing as
valuable, this is not the kind of "replication" I had in mind. This
may already possible by simply copying the database. What replication
means to me is a live, continuously streaming sequence of updates from
one database to another where the replicated database is always
internally consistent, available for read-only queries, and never "too
far" out of sync with the source/primary database.
What does replication mean to others?
Cheers,
Ed Loehr
From bouncefilter Fri Dec 24 21:15:13 1999
Received: from localhost (scrappy@localhost)
by hub.org (8.9.3/8.9.3) with ESMTP id VAA79050;
Fri, 24 Dec 1999 21:15:13 -0500 (EST) (envelope-from scrappy@hub.org)
Date: Fri, 24 Dec 1999 21:15:12 -0500 (EST)
From: "Marc G. Fournier" <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Source code format votes
In-Reply-To: <199912241624.LAA12092@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.9912242114330.13180-100000@hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
I'm indifferent on the tabs, but like seeing the open bracket on the if
and else lines ...
if {
} else {
}
Marc G. Fournier scrappy@hub.org
Systems Administrator @ hub.org
scrappy@{postgresql|isc}.org ICQ#7615664
On Fri, 24 Dec 1999, Bruce Momjian wrote:
Current vote totals:
(7) 8-space tabs: Tom Lane, Peter E., Massimo, Jan, Hiroshi, Peter M.,
Michael
(5) 4-space tabs: Bruce, Andreas, Vince, Vadim, D'Arcyopen bracket on if () line -
(5) yes: Massimo, Peter, Vince, Tom Lane, Peter M.
(6) no: Bruce, Vadim, D'Arcy, Jan, Hiroshi, Michael M.-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026************
From bouncefilter Fri Dec 24 22:29:56 1999
Received: from www.wd-g.com ([202.98.99.41])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA91133
for <hackers@postgreSQL.org>; Fri, 24 Dec 1999 22:29:10 -0500 (EST)
(envelope-from nobody@www.wd-g.com)
Received: (from nobody@localhost) by www.wd-g.com (8.9.1/8.9.1) id LAA23293;
Sat, 25 Dec 1999 11:17:58 +0800 (CST) (envelope-from nobody)
Date: Sat, 25 Dec 1999 11:17:58 +0800 (CST)
Message-Id: <199912250317.LAA23293@www.wd-g.com>
To: hackers@postgreSQL.org
Subject: ���������������������������� ������������������������������
From: <aa@bb.net>
Reply-To: <aa@bb.net>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0004_01BEDD00_748EB2C0"
This is a multi-part message in MIME format.
------=_NextPart_000_0004_01BEDD00_748EB2C0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: quoted-printable
=3Chtml=3E=0A
=0A
=3Chead=3E=0A
=3Ctitle=3E=3C=2Ftitle=3E=0A
=3Cstyle=3E=0A
=3C=21--a=7B=20text-decoration=3A=20none=3B=20color=3A=20rgb=28255=2C255=2C254=29=20=7D=0A
a=3Ahover=7B=20color=3A=20rgb=280=2C0=2C0=29=3B=20text-decoration=3A=20underline=20=7D=0A
--=3E=0A
=3C=2Fstyle=3E=0A
=3C=2Fhead=3E=0A
=0A
=3Cbody=20bgcolor=3D=22=237CB4DC=22=20topmargin=3D=220=22=20leftmargin=3D=220=22=3E=0A
=3Cdiv=20align=3D=22center=22=3E=3Ccenter=3E=0A
=0A
=3Ctable=20border=3D=220=22=20cellPadding=3D=224=22=20cellSpacing=3D=220=22=20width=3D=22100=25=22=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=3Cp=20align=3D=22center=22=3E=3C=2Ffont=3E=3C=2Fspan=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=3Cbig=3E=3Cstrong=3E=C7=A7=EC=FB=D6=AE=C4=EA=B4=F3=B7=EE=CB=CD=20=CB=AB=CF=B2=C1=D9=C3=C5=B5=BD=CD=F5=B3=AF=3C=2Fstrong=3E=3C=2Fbig=3E=3C=2Ffont=3E=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Chr=20size=3D=221=22=20color=3D=22=23FFFF00=22=3E=0A
=20=20=20=20=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=26nbsp=3B=26nbsp=3B=20=0A
=20=20=20=20=D4=DA=D5=E2=C7=A7=EC=FB=D6=AE=C4=EA=C0=B4=C1=D9=D6=AE=BC=CA=A3=AC=CD=F5=B3=AF=BC=AF=CD=C5=CD=C6=B3=F6=A1=B0=C7=A7=EC=FB=D6=AE=C4=EA=B4=F3=B7=EE=CB=CD=A3=AC=CB=AB=CF=B2=C1=D9=C3=C5=B5=BD=CD=F5=B3=AF=A1=B1=BB=EE=B6=AF=A3=AC=D2=E2=D3=EB=B9=E3=B4=F3=CD=F8=D3=D1=B9=B2=C7=EC=C7=A7=C4=EA=D6=AE=CF=B2=A1=A3=3C=2Fspan=3E=3C=2Ffont=3E=3Cp=3E=3Cspan=0A
=20=20=20=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=26nbsp=3B=26nbsp=3B=20=3C=2Ffont=3E=3Cfont=20color=3D=22=23FFFF00=22=3E=3Cstrong=3E=D2=BB=CF=B2=A3=BA=3C=2Fstrong=3E=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFFFF=22=3E=B4=D3=BC=B4=C8=D5=C6=F0=D6=C12000=C4=EA2=D4=C26=C8=D5=C1=E3=B5=E3=A3=AC=CE=D2=C3=C7=BD=AB=CE=AA=C4=FA=CC=E1=B9=A9=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=3Cstrong=3E=3Cem=3E=3Cbig=3E800=D4=AA=2F=C1=BD=3C=2Fbig=3E=3C=2Fem=3E=3C=2Fstrong=3E=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFFFF=22=3E=C4=EA=B5=C4=D3=F2=C3=FB=D7=A2=B7=FE=CE=F1=A3=AC=C1=ED=CD=E2=CE=D2=C3=C7=BD=AB=CE=AA=C4=FA=CC=E1=B9=A9=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=3Cem=3E=3Cstrong=3E=3Cbig=3E700=D4=AA=2F=C4=EA=3C=2Fbig=3E=3C=2Fstrong=3E=3C=2Fem=3E=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFFFF=22=3E=B5=C430M=D0=E9=C4=E2=BF=D5=BC=E4=B7=FE=CE=F1=A1=A3=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Fp=3E=0A
=20=20=20=20=3Cp=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=26nbsp=3B=26nbsp=3B=20=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=3Cstrong=3E=B6=FE=CF=B2=A3=BA=3C=2Fstrong=3E=3C=2Ffont=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=B7=B2=CD=A8=B9=FD=CD=F5=B3=AF=BC=AF=CD=C5=D7=A2=B2=E1=B9=FA=BC=CA=B6=A5=BC=B6=D3=F2=C3=FB=D2=BB=B8=F6=BB=F2=CA=C7=D7=E2=D0=E9=C4=E2=BF=D5=BC=E4=D2=BB=C4=EA=B5=C4=C5=F3=D3=D1=A3=AC=BD=AB=BB=F1=B5=C3=D3=C9=CD=F5=B3=AF=BC=AF=CD=C5=B6=C0=C1=A2=BF=AA=B7=A2=B5=C4=3Ca=0A
=20=20=20=20href=3D=22http=3A=2F=2Fwww.wd-g.com=2Fproduct=2Flongtalk=2Findex.html=22=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=B3=A9=CC=B8=28LongTalk=29=3C=2Ffont=3E=3C=2Fa=3E=C8=ED=BC=FE=BC=B0=D7=A2=B2=E1=BA=C5=C2=EB=D2=BB=B8=F6=A1=A3=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Fp=3E=0A
=20=20=20=20=3Cp=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=26nbsp=3B=26nbsp=3B=20=B0=E9=CB=E62000=C4=EA=B5=C4=B5=BD=C0=B4=A3=AC=D4=E7=D2=BB=CC=EC=B2=CE=BC=D3=B1=BE=BB=EE=B6=AF=A3=AC=B6=E0=D2=BB=D6=D8=D3=C5=BB=DD=A1=A3=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Fp=3E=0A
=20=20=20=20=3Cp=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=26nbsp=3B=26nbsp=3B=20=0A
=20=20=20=20=CA=C0=BC=CD=D6=AE=BD=BB=A3=AC=CF=ED=CA=DC=CA=C0=BC=CD=D3=C5=BB=DD=A3=A1=3Ca=20href=3D=22http=3A=2F=2Fwww.wd-g.com=2Fplan=2Fhuodong.html=22=3E=3Cfont=20color=3D=22=23FFFF00=22=3E=D4=F5=C3=B4=D1=F9=A3=AC=D0=C4=B6=AF=C2=F0=A3=BF=BB=B9=B2=BB=BF=EC=BF=EC=D0=D0=B6=AF=A3=A1=A3=A1=A3=A1=C4=E3=D6=BB=D0=E8=CC=EE=D0=B4=BC=FB=B8=F6=B1=ED=B5=A5=BE=CD=BF=C9=D2=D4=C1=CB=A1=A3=3C=2Ffont=3E=3C=2Fa=3E=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Chr=20size=3D=221=22=20color=3D=22=23FFFF00=22=3E=0A
=20=20=20=20=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Ctable=20border=3D=220=22=20cellpadding=3D=220=22=20cellspacing=3D=220=22=20width=3D=22100=25=22=3E=0A
=20=20=20=20=20=20=3Ctr=3E=0A
=20=20=20=20=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Ctable=20border=3D=220=22=20cellPadding=3D=220=22=20cellSpacing=3D=220=22=20width=3D=22100=25=22=3E=0A
=20=20=20=20=20=20=20=20=20=20=3Ctr=3E=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Ctd=20colSpan=3D=222=22=20width=3D=22100=25=22=3E=3Cfont=20color=3D=22=230000FF=22=3E=3Cspan=20style=3D=22FONT-SIZE=3A=209pt=22=3E=3Cfont=0A
=20=20=20=20=20=20=20=20=20=20=20=20lang=3D=22ZH-CN=22=3E=B9=FA=C4=DA=B5=D8=D6=B7=3C=2Ffont=3E=3Cfont=20face=3D=22Arial=22=3E=3Csmall=3E=3A=3C=2Fsmall=3E=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20=20=20=20=20=20=20=20=20lang=3D=22ZH-CN=22=3E=20=D6=D0=B9=FA=B3=C9=B6=BC=3C=2Ffont=3E=B8=DF=D0=C2=C7=F8=B8=DF=C5=EF=B4=F3=B5=C05=BA=C5=B4=B4=D0=C2=D6=D0=D0=C4=D2=BB=C2=A5=28=20610041=29=3Cbr=3E=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Cfont=20lang=3D=22ZH-CN=22=3E=C1=AA=CF=B5=B5=E7=BB=B0=3C=2Ffont=3E=3A=20=3C=2Fspan=3E=3Csmall=3E028-5179008=3B5159761=3B5150525=3C=2Fsmall=3E=3Cspan=0A
=20=20=20=20=20=20=20=20=20=20=20=20style=3D=22FONT-SIZE=3A=209pt=22=3E=20=3C=2Fspan=3E=3C=2Ffont=3E=3C=2Ftd=3E=0A
=20=20=20=20=20=20=20=20=20=20=3C=2Ftr=3E=0A
=20=20=20=20=20=20=20=20=20=20=3Ctr=3E=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Ctd=20width=3D=2250=25=22=3E=3Cfont=20color=3D=22=230000FF=22=3E=3Cspan=20style=3D=22FONT-SIZE=3A=209pt=22=3E=3Cfont=20lang=3D=22ZH-CN=22=3E=B4=AB=D5=E6=3C=2Ffont=3E=3A=20=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Cfont=20face=3D=22Arial=22=3E028-5178108=3C=2Ffont=3E=3Cfont=20lang=3D=22ZH-CN=22=3E=20=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Ffont=3E=3C=2Ftd=3E=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Ctd=20width=3D=2250=25=22=3E=3Cfont=20color=3D=22=230000FF=22=3E=3Cspan=20style=3D=22FONT-SIZE=3A=209pt=22=3E=3Cfont=20lang=3D=22ZH-CN=22=3E=B5=E7=D7=D3=D3=CA=3C=2Ffont=3E=BC=FE=3Cfont=0A
=20=20=20=20=20=20=20=20=20=20=20=20face=3D=22Arial=22=3E=3A=20=3Ca=20href=3D=22mailto=3Afl=40wd-g.com=22=3Efl=40wd-g.com=3C=2Fa=3E=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Ffont=3E=3C=2Ftd=3E=0A
=20=20=20=20=20=20=20=20=20=20=3C=2Ftr=3E=0A
=3C=2FTBODY=3E=0A
=20=20=20=20=20=20=20=20=3C=2Ftable=3E=0A
=20=20=20=20=20=20=20=20=3C=2Ftd=3E=0A
=20=20=20=20=20=20=3C=2Ftr=3E=0A
=20=20=20=20=3C=2Ftable=3E=0A
=20=20=20=20=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=3C=2FTBODY=3E=0A
=3C=2Ftable=3E=0A
=3C=2Fcenter=3E=3C=2Fdiv=3E=0A
=3C=2Fbody=3E=0A
=3C=2Fhtml=3E=0A
------=_NextPart_000_0004_01BEDD00_748EB2C0
Content-Type: text/html; charset="gb2312"
Content-Transfer-Encoding: quoted-printable
=3Chtml=3E=0A
=0A
=3Chead=3E=0A
=3Ctitle=3E=3C=2Ftitle=3E=0A
=3Cstyle=3E=0A
=3C=21--a=7B=20text-decoration=3A=20none=3B=20color=3A=20rgb=28255=2C255=2C254=29=20=7D=0A
a=3Ahover=7B=20color=3A=20rgb=280=2C0=2C0=29=3B=20text-decoration=3A=20underline=20=7D=0A
--=3E=0A
=3C=2Fstyle=3E=0A
=3C=2Fhead=3E=0A
=0A
=3Cbody=20bgcolor=3D=22=237CB4DC=22=20topmargin=3D=220=22=20leftmargin=3D=220=22=3E=0A
=3Cdiv=20align=3D=22center=22=3E=3Ccenter=3E=0A
=0A
=3Ctable=20border=3D=220=22=20cellPadding=3D=224=22=20cellSpacing=3D=220=22=20width=3D=22100=25=22=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=3Cp=20align=3D=22center=22=3E=3C=2Ffont=3E=3C=2Fspan=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=3Cbig=3E=3Cstrong=3E=C7=A7=EC=FB=D6=AE=C4=EA=B4=F3=B7=EE=CB=CD=20=CB=AB=CF=B2=C1=D9=C3=C5=B5=BD=CD=F5=B3=AF=3C=2Fstrong=3E=3C=2Fbig=3E=3C=2Ffont=3E=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Chr=20size=3D=221=22=20color=3D=22=23FFFF00=22=3E=0A
=20=20=20=20=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=26nbsp=3B=26nbsp=3B=20=0A
=20=20=20=20=D4=DA=D5=E2=C7=A7=EC=FB=D6=AE=C4=EA=C0=B4=C1=D9=D6=AE=BC=CA=A3=AC=CD=F5=B3=AF=BC=AF=CD=C5=CD=C6=B3=F6=A1=B0=C7=A7=EC=FB=D6=AE=C4=EA=B4=F3=B7=EE=CB=CD=A3=AC=CB=AB=CF=B2=C1=D9=C3=C5=B5=BD=CD=F5=B3=AF=A1=B1=BB=EE=B6=AF=A3=AC=D2=E2=D3=EB=B9=E3=B4=F3=CD=F8=D3=D1=B9=B2=C7=EC=C7=A7=C4=EA=D6=AE=CF=B2=A1=A3=3C=2Fspan=3E=3C=2Ffont=3E=3Cp=3E=3Cspan=0A
=20=20=20=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=26nbsp=3B=26nbsp=3B=20=3C=2Ffont=3E=3Cfont=20color=3D=22=23FFFF00=22=3E=3Cstrong=3E=D2=BB=CF=B2=A3=BA=3C=2Fstrong=3E=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFFFF=22=3E=B4=D3=BC=B4=C8=D5=C6=F0=D6=C12000=C4=EA2=D4=C26=C8=D5=C1=E3=B5=E3=A3=AC=CE=D2=C3=C7=BD=AB=CE=AA=C4=FA=CC=E1=B9=A9=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=3Cstrong=3E=3Cem=3E=3Cbig=3E800=D4=AA=2F=C1=BD=3C=2Fbig=3E=3C=2Fem=3E=3C=2Fstrong=3E=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFFFF=22=3E=C4=EA=B5=C4=D3=F2=C3=FB=D7=A2=B7=FE=CE=F1=A3=AC=C1=ED=CD=E2=CE=D2=C3=C7=BD=AB=CE=AA=C4=FA=CC=E1=B9=A9=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=3Cem=3E=3Cstrong=3E=3Cbig=3E700=D4=AA=2F=C4=EA=3C=2Fbig=3E=3C=2Fstrong=3E=3C=2Fem=3E=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFFFF=22=3E=B5=C430M=D0=E9=C4=E2=BF=D5=BC=E4=B7=FE=CE=F1=A1=A3=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Fp=3E=0A
=20=20=20=20=3Cp=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=26nbsp=3B=26nbsp=3B=20=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=3Cstrong=3E=B6=FE=CF=B2=A3=BA=3C=2Fstrong=3E=3C=2Ffont=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=B7=B2=CD=A8=B9=FD=CD=F5=B3=AF=BC=AF=CD=C5=D7=A2=B2=E1=B9=FA=BC=CA=B6=A5=BC=B6=D3=F2=C3=FB=D2=BB=B8=F6=BB=F2=CA=C7=D7=E2=D0=E9=C4=E2=BF=D5=BC=E4=D2=BB=C4=EA=B5=C4=C5=F3=D3=D1=A3=AC=BD=AB=BB=F1=B5=C3=D3=C9=CD=F5=B3=AF=BC=AF=CD=C5=B6=C0=C1=A2=BF=AA=B7=A2=B5=C4=3Ca=0A
=20=20=20=20href=3D=22http=3A=2F=2Fwww.wd-g.com=2Fproduct=2Flongtalk=2Findex.html=22=3E=3Cfont=0A
=20=20=20=20color=3D=22=23FFFF00=22=3E=B3=A9=CC=B8=28LongTalk=29=3C=2Ffont=3E=3C=2Fa=3E=C8=ED=BC=FE=BC=B0=D7=A2=B2=E1=BA=C5=C2=EB=D2=BB=B8=F6=A1=A3=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Fp=3E=0A
=20=20=20=20=3Cp=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=26nbsp=3B=26nbsp=3B=20=B0=E9=CB=E62000=C4=EA=B5=C4=B5=BD=C0=B4=A3=AC=D4=E7=D2=BB=CC=EC=B2=CE=BC=D3=B1=BE=BB=EE=B6=AF=A3=AC=B6=E0=D2=BB=D6=D8=D3=C5=BB=DD=A1=A3=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Fp=3E=0A
=20=20=20=20=3Cp=3E=3Cspan=20style=3D=22font-size=3A=209pt=22=3E=3Cfont=20color=3D=22=23FFFFFF=22=3E=26nbsp=3B=26nbsp=3B=20=0A
=20=20=20=20=CA=C0=BC=CD=D6=AE=BD=BB=A3=AC=CF=ED=CA=DC=CA=C0=BC=CD=D3=C5=BB=DD=A3=A1=3Ca=20href=3D=22http=3A=2F=2Fwww.wd-g.com=2Fplan=2Fhuodong.html=22=3E=3Cfont=20color=3D=22=23FFFF00=22=3E=D4=F5=C3=B4=D1=F9=A3=AC=D0=C4=B6=AF=C2=F0=A3=BF=BB=B9=B2=BB=BF=EC=BF=EC=D0=D0=B6=AF=A3=A1=A3=A1=A3=A1=C4=E3=D6=BB=D0=E8=CC=EE=D0=B4=BC=FB=B8=F6=B1=ED=B5=A5=BE=CD=BF=C9=D2=D4=C1=CB=A1=A3=3C=2Ffont=3E=3C=2Fa=3E=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Chr=20size=3D=221=22=20color=3D=22=23FFFF00=22=3E=0A
=20=20=20=20=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=20=20=3Ctr=3E=0A
=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Ctable=20border=3D=220=22=20cellpadding=3D=220=22=20cellspacing=3D=220=22=20width=3D=22100=25=22=3E=0A
=20=20=20=20=20=20=3Ctr=3E=0A
=20=20=20=20=20=20=20=20=3Ctd=20width=3D=22100=25=22=3E=3Ctable=20border=3D=220=22=20cellPadding=3D=220=22=20cellSpacing=3D=220=22=20width=3D=22100=25=22=3E=0A
=20=20=20=20=20=20=20=20=20=20=3Ctr=3E=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Ctd=20colSpan=3D=222=22=20width=3D=22100=25=22=3E=3Cfont=20color=3D=22=230000FF=22=3E=3Cspan=20style=3D=22FONT-SIZE=3A=209pt=22=3E=3Cfont=0A
=20=20=20=20=20=20=20=20=20=20=20=20lang=3D=22ZH-CN=22=3E=B9=FA=C4=DA=B5=D8=D6=B7=3C=2Ffont=3E=3Cfont=20face=3D=22Arial=22=3E=3Csmall=3E=3A=3C=2Fsmall=3E=3C=2Ffont=3E=3Cfont=0A
=20=20=20=20=20=20=20=20=20=20=20=20lang=3D=22ZH-CN=22=3E=20=D6=D0=B9=FA=B3=C9=B6=BC=3C=2Ffont=3E=B8=DF=D0=C2=C7=F8=B8=DF=C5=EF=B4=F3=B5=C05=BA=C5=B4=B4=D0=C2=D6=D0=D0=C4=D2=BB=C2=A5=28=20610041=29=3Cbr=3E=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Cfont=20lang=3D=22ZH-CN=22=3E=C1=AA=CF=B5=B5=E7=BB=B0=3C=2Ffont=3E=3A=20=3C=2Fspan=3E=3Csmall=3E028-5179008=3B5159761=3B5150525=3C=2Fsmall=3E=3Cspan=0A
=20=20=20=20=20=20=20=20=20=20=20=20style=3D=22FONT-SIZE=3A=209pt=22=3E=20=3C=2Fspan=3E=3C=2Ffont=3E=3C=2Ftd=3E=0A
=20=20=20=20=20=20=20=20=20=20=3C=2Ftr=3E=0A
=20=20=20=20=20=20=20=20=20=20=3Ctr=3E=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Ctd=20width=3D=2250=25=22=3E=3Cfont=20color=3D=22=230000FF=22=3E=3Cspan=20style=3D=22FONT-SIZE=3A=209pt=22=3E=3Cfont=20lang=3D=22ZH-CN=22=3E=B4=AB=D5=E6=3C=2Ffont=3E=3A=20=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Cfont=20face=3D=22Arial=22=3E028-5178108=3C=2Ffont=3E=3Cfont=20lang=3D=22ZH-CN=22=3E=20=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Ffont=3E=3C=2Ftd=3E=0A
=20=20=20=20=20=20=20=20=20=20=20=20=3Ctd=20width=3D=2250=25=22=3E=3Cfont=20color=3D=22=230000FF=22=3E=3Cspan=20style=3D=22FONT-SIZE=3A=209pt=22=3E=3Cfont=20lang=3D=22ZH-CN=22=3E=B5=E7=D7=D3=D3=CA=3C=2Ffont=3E=BC=FE=3Cfont=0A
=20=20=20=20=20=20=20=20=20=20=20=20face=3D=22Arial=22=3E=3A=20=3Ca=20href=3D=22mailto=3Afl=40wd-g.com=22=3Efl=40wd-g.com=3C=2Fa=3E=3C=2Ffont=3E=3C=2Fspan=3E=3C=2Ffont=3E=3C=2Ftd=3E=0A
=20=20=20=20=20=20=20=20=20=20=3C=2Ftr=3E=0A
=3C=2FTBODY=3E=0A
=20=20=20=20=20=20=20=20=3C=2Ftable=3E=0A
=20=20=20=20=20=20=20=20=3C=2Ftd=3E=0A
=20=20=20=20=20=20=3C=2Ftr=3E=0A
=20=20=20=20=3C=2Ftable=3E=0A
=20=20=20=20=3C=2Ftd=3E=0A
=20=20=3C=2Ftr=3E=0A
=3C=2FTBODY=3E=0A
=3C=2Ftable=3E=0A
=3C=2Fcenter=3E=3C=2Fdiv=3E=0A
=3C=2Fbody=3E=0A
=3C=2Fhtml=3E=0A
------=_NextPart_000_0004_01BEDD00_748EB2C0--
From bouncefilter Fri Dec 24 22:09:56 1999
Received: from bocs170n.black-oak.COM ([38.149.137.131])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA88957;
Fri, 24 Dec 1999 22:09:11 -0500 (EST)
(envelope-from dwalker@black-oak.com)
Received: from gcx80 ([151.196.99.113])
by bocs170n.black-oak.COM (Lotus Domino Release 5.0.1)
with SMTP id 1999122422080835:6 ; Fri, 24 Dec 1999 22:08:08 -0500
Message-ID: <001b01bf4e9e$647287d0$af63a8c0@walkers.org>
From: "Damond Walker" <dwalker@black-oak.com>
To: <owner-pgsql-hackers@postgreSQL.org>
Cc: <pgsql-hackers@postgreSQL.org>
References: <OFD38C9424.B391F434-ON85256851.0054F41A@black-oak.COM>
<38640E2D.75136600@austin.rr.com>
Subject: Re: [HACKERS] database replication
Date: Fri, 24 Dec 1999 22:07:55 -0800
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-MIMETrack: Itemize by SMTP Server on notes01n/BOCS(Release 5.0.1|July 16,
1999) at 12/24/99 10:08:09 PM,
Serialize by Router on notes01n/BOCS(Release 5.0.1|July 16,
1999) at 12/24/99 10:08:11 PM,
Serialize complete at 12/24/99 10:08:11 PM
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset="iso-8859-1"
Interesting idea. I can see how this might sync up two databases
somehow. For true replication, however, I would always want every
replicated database to be, at the very least, internally consistent
(i.e., referential integrity), even if it was a little behind on
processing transactions. In this method, its not clear how
consistency is every achieved/guaranteed at any point in time if the
input stream of changes is continuous. If the input stream ceased,
then I can see how this approach might eventually catch up and totally
resync everything, but it looks *very* computationally expensive.
What's the typical unit of work for the database? Are we talking about
update transactions which span the entire DB? Or are we talking about
updating maybe 1% or less of the database everyday? I'd think it would be
more towards the latter than the former. So, yes, this process would be
computationally expensive but how many records would actually have to be
sent back and forth?
But I might have missed something. How would internal consistency be
maintained?
Updates that occur at site A will be moved to site B and vice versa.
Consistency would be maintained. The only problem that I can see right off
the bat would be what if site A and site B made changes to a row and then
site C was brought into the picture? Which one wins?
Someone *has* to win when it comes to this type of thing. You really
DON'T want to start merging row changes...
My two cents is that, while I can see this kind of database syncing as
valuable, this is not the kind of "replication" I had in mind. This
may already possible by simply copying the database. What replication
means to me is a live, continuously streaming sequence of updates from
one database to another where the replicated database is always
internally consistent, available for read-only queries, and never "too
far" out of sync with the source/primary database.
Sounds like you're talking about distributed transactions to me. That's
an entirely different subject all-together. What you describe can be done
by copying a database...but as you say, this would only work in a read-only
situation.
Damond
From bouncefilter Sat Dec 25 07:56:02 1999
Received: from cap-ferrat.albourne.com (cap-ferrat.albourne.com
[195.89.178.227]) by hub.org (8.9.3/8.9.3) with ESMTP id HAA90643
for <pgsql-hackers@postgreSQL.org>;
Sat, 25 Dec 1999 07:55:06 -0500 (EST)
(envelope-from a.joubert@albourne.com)
Received: from albourne.com (bishop-rock.albourne.com [195.89.178.230])
by cap-ferrat.albourne.com (8.9.3/8.9.3/Albourne/UKS/2.9/MAPS) with
ESMTP id MAA22088; Sat, 25 Dec 1999 12:52:33 GMT
Sender: a.joubert@albourne.com
Message-ID: <3864BFBA.E5CF7D5C@albourne.com>
Date: Sat, 25 Dec 1999 14:59:38 +0200
From: Adriaan Joubert <a.joubert@albourne.com>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.38 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Index corruption
References: <38626197.4ED6092F@albourne.com> <8235.945996719@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
No, that's a new one AFAIK. I don't suppose you saved the state of your
DB before rebuilding it? I'd like to try to reproduce the problem...
No, sorry. I got increasing desperate as this was a production system and I
was under a bit of pressure to get it back up. A day earlier I had had a
complaint about the number of tuples in the index being incorrect. At the
third attempt I managed to run vacuum over it without the backend crashing
and the it seemed to behave well. Next morning I ran vacuum again and then I
ended up with the endless file-creation loop. Oh yes, to get it to vacuum
I had to delete all my functions (pg_proc) and then reload them. I know that
all my procedures are small enough not to break the 8K limit, as I used to
have trouble with that. I tried the same trick, i.e. dropping and reloading
my functions, but no luck. As most of what they do is to enforce referential
integrity, Jan's foreign key stuff may solve a large part of the problem!
I had the system logging with debug level 3 and there was nothing in the
logs. Did anything get fixed in this area between 6.5.2 and 6.5.3? I.e.
should I upgrade? I'd rather not just at the moment.
Merry Christmas!
Adriaan
From bouncefilter Sat Dec 25 10:34:05 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA17340
for <pgsql-hackers@postgreSQL.org>;
Sat, 25 Dec 1999 10:33:20 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA20667;
Sat, 25 Dec 1999 10:13:33 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912251513.KAA20667@candle.pha.pa.us>
Subject: Re: [HACKERS] Index corruption
In-Reply-To: <3864BFBA.E5CF7D5C@albourne.com> from Adriaan Joubert at "Dec 25,
1999 02:59:38 pm"
To: Adriaan Joubert <a.joubert@albourne.com>
Date: Sat, 25 Dec 1999 10:13:33 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I had the system logging with debug level 3 and there was nothing in the
logs. Did anything get fixed in this area between 6.5.2 and 6.5.3? I.e.
should I upgrade? I'd rather not just at the moment.
No:
Release 6.5.3
This is basically a cleanup release for 6.5.2. We have added a new
pgaccess
that was missing in 6.5.2, and installed an NT-specific fix.
Migration to v6.5.3
A dump/restore is not required for those running 6.5.*.
Detailed Change List
Updated version of pgaccess 0.98
NT-specific patch
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sat Dec 25 17:27:09 1999
Received: from mtiwmhc08.worldnet.att.net (mtiwmhc08.worldnet.att.net
[204.127.131.19]) by hub.org (8.9.3/8.9.3) with ESMTP id RAA86798
for <pgsql-hackers@postgreSQL.org>;
Sat, 25 Dec 1999 17:26:34 -0500 (EST)
(envelope-from pgsql@rkirkpat.net)
Received: from [192.168.3.100] ([12.74.72.219])
by mtiwmhc08.worldnet.att.net (InterMail v03.02.07.07 118-134)
with ESMTP id <19991225222554.VIOL28505@[12.74.72.219]>;
Sat, 25 Dec 1999 22:25:54 +0000
Date: Sat, 25 Dec 1999 15:25:47 -0700 (MST)
From: Ryan Kirkpatrick <pgsql@rkirkpat.net>
X-Sender: rkirkpat@excelsior.rkirkpat.net
To: DWalker@black-oak.com
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] database replication
In-Reply-To: <OFD38C9424.B391F434-ON85256851.0054F41A@black-oak.COM>
Message-ID: <Pine.LNX.4.10.9912251433310.1551-100000@excelsior.rkirkpat.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 24 Dec 1999 DWalker@black-oak.com wrote:
I've been toying with the idea of implementing database replication
for the last few days.
I too have been thinking about this some over the last year or
two, just trying to find a quick and easy way to do it. I am not so
interested in replication, as in synchronization, as in between a desktop
machine and a laptop, so I can keep the databases on each in sync with
each other. For this sort of purpose, both the local and remote databases
would be "idle" at the time of syncing.
2) The replication system will need to add at least one field to each
table in each database that needs to be replicated. This field will be
a date/time stamp which identifies the "last update" of the record.
This field will be called PGR_TIME for lack of a better name.
Because this field will be used from within programs and triggers it
can be longer so as to not mistake it for a user field.
How about a single, seperate table with the fields of 'database',
'tablename', 'oid', 'last_changed', that would store the same data as your
PGR_TIME field. It would be seperated from the actually data tables, and
therefore would be totally transparent to any database interface
applications. The 'oid' field would hold each row's OID, a nice, unique
identification number for the row, while the other fields would tell which
table and database the oid is in. Then this table can be compared with the
this table on a remote machine to quickly find updates and changes, then
each differences can be dealt with in turn.
3) For each table to be replicated the replication system will
programatically add one plpgsql function and trigger to modify the
PGR_TIME field on both UPDATEs and INSERTs. The name of this function
and trigger will be along the lines of
<table_name>_replication_update_trigger and
<table_name>_replication_update_function. The function is a simple
two-line chunk of code to set the field PGR_TIME equal to NOW. The
trigger is called before each insert/update. When looking at the Docs
I see that times are stored in Zulu (GT) time. Because of this I
don't have to worry about time zones and the like. I need direction
on this part (such as "hey dummy, look at page N of file X.").
I like this idea, better than any I have come up with yet. Though,
how are you going to handle DELETEs?
6) To handle replication I basically check the local "last replication
time" and compare it against the remote PGR_TIME fields. If the
remote PGR_TIME is greater than the last replication time then change
the local copy of the database, otherwise, change the remote end of
the database. At this point I don't have a way to know WHICH field
changed between the two replicas so either I do ROW level replication
or I check each field. I check PGR_TIME to determine which field is
the most current. Some fine tuning of this process will have to occur
no doubt.
Yea, this is indeed the sticky part, and would indeed require some
fine-tunning. Basically, the way I see it, is if the two timestamps for a
single row do not match (or even if the row and therefore timestamp is
missing on one side or the other altogether):
local ts > remote ts => Local row is exported to remote.
remote ts > local ts => Remote row is exported to local.
local ts > last sync time && no remote ts =>
Local row is inserted on remote.
local ts < last sync time && no remote ts =>
Local row is deleted.
remote ts > last sync time && no local ts =>
Remote row is inserted on local.
remote ts < last sync time && no local ts =>
Remote row is deleted.
where the synchronization process is running on the local machine. By
exported, I mean the local values are sent to the remote machine, and the
row on that remote machine is updated to the local values. How does this
sound?
7) The commandline utility, fired off by something like cron, could
run several times during the day -- command line parameters can be
implemented to say PUSH ALL CHANGES TO SERVER A, or PULL ALL CHANGES
FROM SERVER B.
Or run manually for my purposes. Also, maybe follow it
with a vacuum run on both sides for all databases, as this is going to
potenitally cause lots of table changes that could stand with a cleanup.
1) How far do I go with this? Do I start manhandling the system catalogs (pg_* tables)?
Initially, I would just stick to user table data... If you have
changes in triggers and other meta-data/executable code, you are going to
want to make syncs of that stuff manually anyway. At least I would want
to.
2) As to #2 and #3 above, I really don't like tools automagically
changing my tables but at this point I don't see a way around it. I
guess this is where the testing comes into play.
Hence the reason for the seperate table with just a row's
identification and last update time. Only modifications to the synced
database is the update trigger, which should be pretty harmless.
3) Security: the replication app will have to have pretty good rights
to the database so it can add the nessecary functions and triggers,
modify table schema, etc.
Just run the sync program as the postgres super user, and there
are no problems. :)
So, any "you're insane and should run home to momma" comments?
No, not at all. Though it probably should be remaned from
replication to synchronization. The former is usually associated with a
continuous stream of updates between the local and remote databases, so
they are almost always in sync, and have a queuing ability if their
connection is loss for span of time as well. Very complex and difficult to
implement, and would require hacking server code. :( Something only Sybase
and Oracle have (as far as I know), and from what I have seen of Sybase's
replication server support (dated by 5yrs) it was a pain to setup and get
running correctly.
The latter, synchronization, is much more managable, and can still
be useful, especially when you have a large database you want in two
places, mainly for read only purposes at one end or the other, but don't
want to waste the time/bandwidth to move and load the entire database each
time it changes on one end or the other. Same idea as mirroring software
for FTP sites, just transfers the changes, and nothing more.
I also like the idea of using Python. I have been using it
recently for some database interfaces (to PostgreSQL of course :), and it
is a very nice language to work with. Some worries about performance of
the program though, as python is only an interpreted lanuage, and I have
yet to really be impressed with the speed of execution of my database
interfaces yet.
Anyway, it sound like a good project, and finally one where I
actually have a clue of what is going on, and the skills to help. So, if
you are interested in pursing this project, I would be more than glad to
help. TTYL.
---------------------------------------------------------------------------
| "For to me to live is Christ, and to die is gain." |
| --- Philippians 1:21 (KJV) |
---------------------------------------------------------------------------
| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |
---------------------------------------------------------------------------
From bouncefilter Sat Dec 25 20:51:11 1999
Received: from news.tht.net (news.hub.org [216.126.91.242])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA33660
for <pgsql-hackers@postgresql.org>;
Sat, 25 Dec 1999 20:51:06 -0500 (EST)
(envelope-from news@news.tht.net)
Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id UAA58958
for pgsql-hackers@postgresql.org; Sat, 25 Dec 1999 20:25:05 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: news.tht.net: news set sender to <news> using -f
From: "Kevin Lam" <kamanl@earthlink.com>
X-Newsgroups: comp.databases.postgresql.hackers
Subject: question about MS Access connect to Postgresql 6.5.2-1
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <o5e94.3459$GF1.189168@newsread1.prod.itd.earthlink.net>
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread1.prod.itd.earthlink.net 946171348 207.217.154.186 (Sat,
25 Dec 1999 17:22:28 PST)
Organization: EarthLink Network, Inc.
X-ELN-Date: Sat Dec 25 17:22:28 1999
X-ELN-Insert-Date: Sat Dec 25 17:22:28 1999
X-Posted-Path-Was: not-for-mail
Date: Sun, 26 Dec 1999 01:22:28 GMT
To: pgsql-hackers@postgresql.org
I'm using access to connect to the PostgreSQL server running on a linux thru
postgresODBC driver.
I can link the table and can read the data in the table but
I can't update it?! I can not add a record. What am I
doing wrong?
The user login has only the create db privilege and without
the superuser privilege.
Please help!
Kevin.
From bouncefilter Sat Dec 25 20:36:11 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA22752
for <pgsql-hackers@postgreSQL.org>;
Sat, 25 Dec 1999 20:36:02 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id UAA14823
for <pgsql-hackers@postgreSQL.org>;
Sat, 25 Dec 1999 20:35:31 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: dubious improvement in new psql
Date: Sat, 25 Dec 1999 20:35:31 -0500
Message-ID: <14820.946172131@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
The new psql automatically tries to reconnect if the backend disconnects
unexpectedly. This feature strikes me as ill-conceived; furthermore
it appears to be buggy.
It's ill-conceived because:
(1) under WAL, following a backend crash the postmaster is going to be
spending a few seconds reinitializing; an immediate reconnect attempt
is almost guaranteed to fail.
(2) if I'm running an SQL script, I think it's extremely foolhardy
to press on with executing the script as though nothing had happened.
A backend crash is not an event to be lightly ignored.
It's buggy because: it doesn't work reliably. While poking at the
backend's problems with oversize btree index entries, I saw psql claim
it had successfully reconnected, and then go into a catatonic state.
It wouldn't give me a new command prompt (not even with ^C), wouldn't
exit with ^D, and had to be killed from another shell window.
This behavior doesn't seem to happen for every crash, but I'm not
really interested in trying to debug it. I think the "feature"
ought to be ripped out.
regards, tom lane
From bouncefilter Sun Dec 26 09:18:19 1999
Received: from bocs170n.black-oak.COM ([38.149.137.131])
by hub.org (8.9.3/8.9.3) with ESMTP id JAA90452
for <pgsql-hackers@postgreSQL.org>;
Sun, 26 Dec 1999 09:17:54 -0500 (EST)
(envelope-from dwalker@black-oak.com)
Received: from vmware98 ([151.196.99.113])
by bocs170n.black-oak.COM (Lotus Domino Release 5.0.1)
with SMTP id 1999122609164808:7 ; Sun, 26 Dec 1999 09:16:48 -0500
Message-ID: <002201bf4fb3$623f0220$b263a8c0@vmware98.walkers.org>
From: "Damond Walker" <dwalker@black-oak.com>
To: "Ryan Kirkpatrick" <pgsql@rkirkpat.net>
Cc: <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] database replication
Date: Sun, 26 Dec 1999 10:10:41 -0500
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-MIMETrack: Itemize by SMTP Server on notes01n/BOCS(Release 5.0.1|July 16,
1999) at 12/26/99 09:16:51 AM,
Serialize by Router on notes01n/BOCS(Release 5.0.1|July 16,
1999) at 12/26/99 09:16:54 AM,
Serialize complete at 12/26/99 09:16:54 AM
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset="iso-8859-1"
I too have been thinking about this some over the last year or
two, just trying to find a quick and easy way to do it. I am not so
interested in replication, as in synchronization, as in between a desktop
machine and a laptop, so I can keep the databases on each in sync with
each other. For this sort of purpose, both the local and remote databases
would be "idle" at the time of syncing.
I don't think it would matter if the databases are idle or not to be
honest with you. At any single point in time when you replicate I'd figure
that the database would be in a consistent state. So, you should be able to
replicate (or sync) a remote database that is in use. After all, you're
getting a snapshot of the database as it stands at 8:45 PM. At 8:46 PM it
may be totally different...but the next time syncing takes place those
changes would appear in your local copy.
The one problem you may run into is if the remote host is running a
large batch process. It's very likely that you will get 50% of their
changes when you replicate...but then again, that's why you can schedule the
event to work around such things.
How about a single, seperate table with the fields of 'database',
'tablename', 'oid', 'last_changed', that would store the same data as your
PGR_TIME field. It would be seperated from the actually data tables, and
therefore would be totally transparent to any database interface
applications. The 'oid' field would hold each row's OID, a nice, unique
identification number for the row, while the other fields would tell which
table and database the oid is in. Then this table can be compared with the
this table on a remote machine to quickly find updates and changes, then
each differences can be dealt with in turn.
The problem with OID's is that they are unique at the local level but if
you try and use them between servers you can run into overlap. Also, if a
database is under heavy use this table could quickly become VERY large. Add
indexes to this table to help performance and you're taking up even more
disk space.
Using the PGR_TIME field with an index will allow us to find rows which
have changed VERY quickly. All we need to do now is somehow programatically
find the primary key for a table so the person setting up replication (or
syncing) doesn't have to have an indepth knowledge of the schema in order to
setup a syncing schedule.
I like this idea, better than any I have come up with yet. Though,
how are you going to handle DELETEs?
Oops...how about defining a trigger for this? With deletion I guess we
would have to move a flag into another table saying we deleted record 'X'
with this primary key from this table.
Yea, this is indeed the sticky part, and would indeed require some
fine-tunning. Basically, the way I see it, is if the two timestamps for a
single row do not match (or even if the row and therefore timestamp is
missing on one side or the other altogether):
local ts > remote ts => Local row is exported to remote.
remote ts > local ts => Remote row is exported to local.
local ts > last sync time && no remote ts =>
Local row is inserted on remote.
local ts < last sync time && no remote ts =>
Local row is deleted.
remote ts > last sync time && no local ts =>
Remote row is inserted on local.
remote ts < last sync time && no local ts =>
Remote row is deleted.
where the synchronization process is running on the local machine. By
exported, I mean the local values are sent to the remote machine, and the
row on that remote machine is updated to the local values. How does this
sound?
The replication part will be the most complex...that much is for
certain...
I've been writing systems in Lotus Notes/Domino for the last year or so
and I've grown quite spoiled with what it can do in regards to replication.
It's not real-time but you have to gear your applications to this type of
thing (it's possible to create documents, fire off email to notify people of
changes and have the email arrive before the replicated documents do).
Replicating large Notes/Domino databases takes quite a while....I don't see
any kind of replication or syncing running in a blink of an eye.
Having said that, a good algo will have to be written to cut down on
network traffic and to keep database conversations down to a minimum. This
will be appreciated by people with low bandwidth connections I'm sure
(dial-ups, fractional T1's, etc).
Or run manually for my purposes. Also, maybe follow it
with a vacuum run on both sides for all databases, as this is going to
potenitally cause lots of table changes that could stand with a cleanup.
What would a vacuum do to a system being used by many people?
No, not at all. Though it probably should be remaned from
replication to synchronization. The former is usually associated with a
continuous stream of updates between the local and remote databases, so
they are almost always in sync, and have a queuing ability if their
connection is loss for span of time as well. Very complex and difficult to
implement, and would require hacking server code. :( Something only Sybase
and Oracle have (as far as I know), and from what I have seen of Sybase's
replication server support (dated by 5yrs) it was a pain to setup and get
running correctly.
It could probably be named either way...but the one thing I really don't
want to do is start hacking server code. The PostgreSQL people have enough
to do without worrying about trying to meld anything I've done to their
server. :)
Besides, I like the idea of having it operate as a stand-alone product.
The only PostgreSQL feature we would require would be triggers and
plpgsql...what was the earliest version of PostgreSQL that supported
plpgsql? Even then I don't see the triggers being that complex to boot.
I also like the idea of using Python. I have been using it
recently for some database interfaces (to PostgreSQL of course :), and it
is a very nice language to work with. Some worries about performance of
the program though, as python is only an interpreted lanuage, and I have
yet to really be impressed with the speed of execution of my database
interfaces yet.
The only thing we'd need for Python is the Python extensions for
PostgreSQL...which in turn requires libpq and that's about it. So, it
should be able to run on any platform supported by Python and libpq. Using
TK for the interface components will require NT people to get additional
software from the 'net. At least it did with older version of Windows
Python. Unix folks should be happy....assuming they have X running on the
machine doing the replication or syncing. Even then I wrote a curses based
Python interface awhile back which allows buttons, progress bars, input
fields, etc (I called it tinter and it's available at
http://iximd.com/~dwalker). It's a simple interface and could probably be
cleaned up a bit but it works. :)
Anyway, it sound like a good project, and finally one where I
actually have a clue of what is going on, and the skills to help. So, if
you are interested in pursing this project, I would be more than glad to
help. TTYL.
That would be a Good Thing. Have webspace somewhere? If I can get
permission from the "powers that be" at the office I could host a website on
our (Domino) webserver.
Damond
From bouncefilter Mon Dec 27 04:24:34 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA34920;
Mon, 27 Dec 1999 04:24:25 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <ZW4G6V2X>; Mon, 27 Dec 1999 11:21:39 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C386@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'pgsql-hackers@postgreSQL.org '" <pgsql-hackers@postgreSQL.org>,
"'pgsql-patches@postgresql.org '" <pgsql-patches@postgreSQL.org>
Subject: Unlimited query length - the final chapter (aka pg_dump)
Date: Sun, 26 Dec 1999 22:29:19 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: multipart/mixed;
boundary="----_=_NextPart_000_01BF504B.C75CE92C"
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01BF504B.C75CE92C
Content-Type: text/plain
Hi, all
I finally got around to schlepping through pg_dump, to finish what I started
about three months (or more) ago. Attached is a gzipped diff file to apply
in the bin/pg_dump directory. This should remove all string length
dependencies, except one, which I'm working on. It has been through some
rudimentary unit testing, but that's about it, so if any of you would give
it a more strenuous run-through, I'd be grateful for the feedback.
Cheers...
MikeA
------_=_NextPart_000_01BF504B.C75CE92C
Content-Type: application/octet-stream;
name="pg_dump.diff.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="pg_dump.diff.gz"
H4sICLJ5ZjgAA3BnX2R1bXAuZGlmZgDsPWt327aSn5VfAeturiVHtkXqnbS9x3UUx1vHdmV5b7tp
14eWKJmJTCkklce23d++M3gRpACKsiXH7anzMAkMgXljAAzBY3/ofn5OZuOr4fx2tnfz5Nv7/zzp
HV6QkTdxn5P9eRjsT6YDZ7I/+BgG02m0PxuHHyb7YTDYv/b8fd7xvkSg8vFJ4EaB5370/DEJ4Ffo
TX1i7dXtJ0NvNCK7A7Ib4K2C9M7OTnxXsDqdzr5l71sWqVaf16zn1UaBPr+7u6sBs5vErj63288b
NWxI/aEN23bFbhF6iw3gbZvA1e4TQv7hjYCBI3J+dPXy8s351WssgwLPdxNlT54BqD+YzIcuKc4+
uJ9n1/PRyA32boq0FVE1cCJnMh0jOzyUDKuHv/s7T46Tohp8bVENjKKy7GZCVnCvoK0KaxALi0qh
2nneaBdYC6q0BhppdbTSsjqNil1tM3kR8hv8K5wfBW44n0SEkB24eoFlnh8VCgU/ms/gfosUBjdO
UCh8mLvBl7dvDn66+vGy2/v56uL4v7u/IjyChLMAnhqVKFCFFEN34g4iIHziO7cuGQXTW0R4MHHC
sIJXgfsp8CIQKz5dKBQ/3biBK0H2pt6QfEvcj+xWQjn+UHl4D+qjLzMXILet7QRQMJ+4tGeouup1
+0/D7WJFoFMWWAPBAHD+o/vZHZSg66nvVwglocwYMSKlLQT6/Xe8LZz/yJh1ETnRPCzBTZlsQQNH
ve7FVf/y/AR+nf1QRtjfqIwEx7lJ5Ob4+Y/dz7PvqRkwvgOag8B1IlepKUk6nNnM9Ydq1epyKL/I
bmmJgJY9ni25PE/fV6S73w3Bg6xBsDrTqlm1Sg3sj5tWCO14A/IRuAR3aKaHyCY3pCb7EvAovTo+
6ZKd0XQeVQhgGUYEzYzsUH5SkqjCbGkUJjZJnTlyZQJdmrjK/chzJ0P2rNIbeFvwYQtWDCy/6J50
D/tkh7zqnb0hT0Pg9eg2Oh6WJIJQMA0G7tWH+TQChjEZ6vm/JnMSXObmtBEuFySPE0ZoNsAV+F1I
8Vuj8Ovm/Ga1vmZXanWp9UA0VyDG8OLx6UW31yfHp/0zoIPkIQRbQTydKApOAQJo+pZEwZwKqlD4
jfl4VVFLRf5YAdoiJcp3YET1BWGX3wBPfHrJSOTlz56xFgu/sV+0V/bEd6RaZv1AT1EAgQftqMLd
VKKUEXT+4wjJwfYrrPmynrTCH5yAuNkyke2m2EdFz20HHtQw+L8OTi67F0SyYGUOUKuiUmwJq3o4
KQIubpTQfsEIvWFsVtL6PhWhawHuKH99Z8tUQTXmDSmEzszbVqPSti1p5ksjGHnv5YkfC32IBI79
0RTbizy4eMECe9HIFTj4F1RV21YTMLGlqq6KyQpxVU6stPyqA78asVsEV/7JxalE5AYE5ESiG5dc
z+F+1/MJxkEhgfDKRygcuSQMrWIt7BsCbT5YQGiFwBiWVfCx6SffDSpwwewTLiB4or9nQUQvi1Q/
CClCmefPUHvwuXkkLgN34Hof2cMhKCu9gHDyll4M3Yl3W+ExN2sF5nYOyII/PAFM4OL6y0dnUiHz
0E0EoNgUjT+hIuC4iEmAQB9kA7Xhl9AbFh8uZG/XQcUasTdcp/DMAW6mGMnXliN5UEFuNGTp2J1K
pybnwGezgNs4wduxG53N3MCJpkFYAjsjO/78FmBCczB+P9+H4CoOUzRv7mpQGzu1KqDbEdp4Z3QL
63aPWYhr+d5oVjrNtuoTQSEi93aXLQkNyVRQQpyIWtIutSTv1s3rAUULzHwAI2Y0cPHe81nJYDp0
K1JNoWDijiJaE3jjm4jD3LKn3TFQzirdkNW9m3p+4vmB49844Q2tnITTIJrO2BPiWhiMeEYYjkDW
ZDzQxlf0gp1GC8TVUb3gHcWVx+f9LbgNez3LbjYrlt2yNxbDHYzH0hc443FmFAfYtBCb2oPEcXkx
0/OtXQNMOw3BN3xqfwfCAX9InMkEJRxIk4DWA6p6oclbcUWJNV8+wlQfbpnqw0UUOH448i31xo5V
GAqhV2cy8mMAHIwZ/LUDUys6NKt1thIuUFZ4EQzq7Al+Yy8O8RJHk8YDwFd0VSCjOspILgutLCOT
i/pbWg/mn2oQdVu1eM70au4PxOSLBTpYEgc59G4zQRnUq72PjA5DuQeXj0Lg7q1WbyExcg5xN2LW
HLIpZBVWJEovsWYDiGy1c3nGEVKY2ylCxwNmYRwFejFx/DEvCcYhvQrciJmN0HBWBsZEqwGOTsLo
TRgM6O9rjANMYzv2bLIbBTHyHdl+Ot9+/hyv6c5GMF2wKU7X+GrihNEVnTF6PjL5AV1jDYf9WquT
yzWmhJTbK/4trs36xnoNLK1elzFI37me8JUp7k5oSexP2G0l9jvM3isEATbuPFX0outJHk/DN/G4
+6zXmkivHM83RO/6/atEtLAy4XrBN6vAiGZiIbFEt023J9tl4oCWe2MfTGi4lzVFXjBYuYMrt0/p
BZtrwYUziBd6YmOFisGNO3gfUpgIpl1jN2A3MJGiKRkLBhrvM3MLZQJuWkhXYo0tF125XdJXpNAg
yTZQ3KrHO2WFYokjhPvZwTaZBkQpuEA+4KY337jf+j+y/T/QyXY8hQ2G0N/1FzJ92Gi73uwgKY14
u+jBSdmwu20jgfGUD8xUjD+IzggcyjVoHt3qKfIavt1CDZqpkAZW1qnQQsv08KKWbQvhD31IaqP2
IVFblAt1dBfIYztAHvmGMFdHPL4zJiTbQXcTz6MeD+GFzVCtFX/DAlNt2Kqp4u4+8+dvvV/3hEOR
daibt7euH12Bc5LqWzAtVAaDxHxNMIf6EM+H2MWLQuKEgHJRdMFDmmBAl+PRqJ6GPJyJYZiRSRBv
DxqjNykQ97MXRqHwxQ2rg+Q2FXO+I7mLu7nc7Zg2PB8pW/RaYcOUrlGrJbSiSC2SPj3YCwYQskIH
Cu68rGiAT6A0g1HPj8qkKBmtyIBFoYLLdqaHL0iXaAufqPOKttEtFoQ/aNioGrVGQjUeGc2JHfF1
UK6XPgYsjWZrwz4BIg3KvLQNrKrxjN3+NIqVOq4r8ZTAncVuwLoGWntj6tCsARNa1UfiKR4ts/Qa
1Koi85oa/7GiKf1pvEeLqktH4z0eCcUP5Ds6dsVqVm1V8momooyvYF770ZnMaRKRDXNX/HfFdF3g
mE7dDLIeBE4qNscn7NVf0Q5+qW6LFpFs7AJrgLTt/9iOU99Svurw7PSi3zs4Pu0n0sCMCYnpJsgz
EkbBxPW5vWOTr7uHP5DS07AMzSFB8klFmlQ1rrD2rWcj/tDKcD4rJdSWZUOByAYT1wmYrESeFNPH
TgPlkBjNvoYcjM5vqTzMjvEOkslo7N4ySRpWlmS0FtO0wFc2bRlrqT+U5dDX2+PTl92frnD96Yfu
zxfgoE8P3nRfHvQPTrqnoGg1xKlYfJF6HBeE3nFhqD8LCya6HzH+OHtOFMn1SC0kzdwVL6oQryJX
CviYgXmR3vU8coljbuTfr7u9LvV2Qw8RvHXAhg5OX7Ii4Q2fhuYWSAzufhYPsCVRrGCEzG8xDTIu
SMIZ2z7rvez2yPc/x60UTYzTeGb1Z8VBiazqlplhiUTJMBq6QQB6Hq8jlp8TLtoSzhnPe8dvDno/
E1CsMhk53sQd7hEChjJxfCfC13hoMHDtDN6DCT2nGdrMxzStGmquXNhSf9aoudkhlPqTsWCmFerf
Gq60/SAabg5CHqee6z02Tg2ardrG5kcR32iPxiOWGjlmG0lYTneXojH+ViJHmZ/IFpIWZgXRWDMr
eDzRcxMzZJqt9lefbD16zj9MFN9sozw6qoZ7V5wH6fVIzNvgVfKFBQQ2wyZAFQ4oa6QlFmzulMmt
M5lMByW6mmljXp73v+50xOtlgMcWP5FpVc4oFvvjWqgtFkNtvFl4PUINbkHsc39gDm+ZWsTRqx/Z
QMGYv9vnRFOvZHwSgRBfpvB0mtRRp4uPm8HZdqWw//ExXKvhLatZsVqNxBrX/g756aefyC65mX4i
0ZS4tx7mtnshedk7Oyf93vHRUbf3L7ZBJ2Yvw2A6u4D5wa3DyRSv+yx6d7UVHObPTuH/F7/4sTuQ
79cYSKKzstQcJ/aJBfa0xm0aZkUwes6jUOCH79RITuM05h/gK71RPJdbmCH3ugf9rkpRsXIXCmSn
IIA+d6NUwpLRmMHxmWqXwnne79Wrs97V9134v1sSQk+/zsYRZlDSMgruJHQNoAev+t1esWzqj70k
FveXlnyyMcLA4+YYQc+eqdzWdfMSRqV+d7Eb3gp7swtZo77ZtdD7WY+whhQEVNIXHliAzonu5TkE
9utAlzWUF9009B8GfRUmRwBX0j04fE16Z/8m3Z+6h5egxue9s8Puy0uI0AGiBDbJGiHCOvLZFg0d
wKVJZPgraUJ/Cbv8RkQUvEA6yZhbynu0EFPvhHzkaNkwcrSaiYWddTuubGefFUY9ahfHYqccjm4J
/RmLSY/eI5pxz3KO5qfu5yfN7T6wy8xAZKn3zHj2YR1pNhHZPjXjWZN7zepuZTeb17A36V/1gWK7
Af62k9zKKuwMnz2D/nbCWJZSmFDJDNMQBsI0kP4tVuTYApgqPq6UogEcu1Um/0JfUiTPSVGRoZwF
zMgzUl8YAJMDZRkdsW55W8wL7rPh0OrUKla7Wk9O4Vfhk1mfJL82xShz13fh2T03BPCtb6tdkxlZ
x/5N6i3IY74HK1NCRcHGslxVHDz/RpfsKRJNXqQK2dalgFbTsfG1Yb6d7PgDvAZjvmVrccvefxS9
YdYr70JuWost6ofME2zbdRBaXb7jdR+hrT9Vl2MDJvewwlu63rYuMW42R7LdskC47VriKDHOJeGO
3uU8qMi74psNiTL+ynsaDopvp8OFp6eRP59M0sU3Tjh0Ry9ymj8WLaQMiuRynjbINLvVAeI7VuJU
Ly3xq50g9KCMMJpUHjbodaIDbOlYViIuyFixNixYa86gEvsvlXhjCqKePXkqAi1lDJHJ3IUig2UM
4TCMDzGIfGcu3qyqiEMNSBTD8Rfn1L2jeO0a01MEBrQq2lNTjIqyXuxDyXRnViZngtqlb72F8/Ey
bdirWLY8oa7aArHZybSu1cW2OEPkBGSecfW3ZLPO67qvfLVm2qm3Qd6NVC6jiiIXRPj23a9KaGna
X9Ia7FDNzEPeqsKJ2T408HyIDP2WPFU3hlJMrJB3ELdaMhA17BAl5uGpjaEVd4biIx3RYJS3V+7L
QKPpLDOeR8PlZHy/Hl7rlbdtA+/b8qVTGkUOvYGrBpH0vpwamHMdYpBnkgDtK4H/kMWOTDFwC6vT
kXu2KyK3ypkGd0ZUx1W7Wq1X7KpVVd8zo4ul8Nch9d1PzheC52eQrS1Wa3zPLJE/IXaQLTGG0AxZ
nqjBXb2dqpM14t0gmtrB3vOkl+/dL/yKv3kl37Dfc26VhthNRSSXzH0PkOSpzEArEqyMeXkJzplP
8zhJ18tesCIeDui4pqAXv7AVV9CXuzA/cbIt86eTeTyP4f1nIAypq6nBzSOgbqNzM7vatIFm5ail
AiHyLDt2kp18MxbLM11lxrxtRN+2HWbNGbB1ZeZkV1uImprVchfUVptVrYamnqOdVsW2qi31qAPt
jpHmdFK2//PzeVds+4h9M7lsJmJd7XYN36xJbNH8sThVEhGp2G5h/cWRagm56ga+M5m4/ji6oVl1
mN2rKaSHyPFr2QA7T46X4ily/JIfLsfv+MlxPNTgWZHIOWCflTiEIIt95nhIHw6th8WavTDJ6JUm
N49VFlrVtuwqyKZWT6h2AU8H7LOMElzewsvvv5x5nKUVaTQwiik8xqd0qXx0hR8IhGpczRLoTbxb
L6JnMHAE+ar3BwbaZ2lmSvv0EUU0TIkkxAyPfh7SYwrxnFmGg3J6b7Ker2JjK/G2j3oqrwSgVRo7
RBSohjAlr4Frs+qJQ4jWxEjDwbS5Gbo2bhoQycFYw3G3Wh4vGqLktF6F6xZwvinXIvEsunOImk4c
fxwmDgDPPB+C222uAUm3oJhjemFYvIYQwl9Y4oOy2SQK5mHkDhcrBuAnRunDJKAGZpgzb+IGMTqI
n2w/VZiEVpLQjH0I5zbyhp+F3Az7Efz48hlGSP547ozj41tY2jcUQzg1kaUy3ZqfAvAgAaLVqIHy
xKcZPKzyGM6aXzL5+xpqVFhUokKGChVWU6GluyKbVabNxuN2DeYgdt1W/dOZ76LeLFcwwa58erU8
aH+XdAIYHF/RrQEinqZFyOW3yfdSLHleLU+2YOMEUuMOeXxv15tAaqOuWtOGSF1tEqDuRa2RaL28
cbZQqyWOjNREu78t7HbQOPbV5elh/5ili5RkKCt7lids6bKj6NzmHZvbvIO5jXyKJ368E0kfPOVD
qoGyx8RqeMHysEV2IQ7vevvuVxFYJwNA/KMGedwNFABhzNmhSQosR0FW8TBeRu8OxBNlGbKk2fc0
LLPoXwTnhpgtMWbFKWr3YHxevjO2G7m+DqZn8Fyy3MzxDIb/kWYbsKlMet3+Ze/0gmBH5OCCBp7k
5OD06PLgqEvvWKojxUAgEDOVHf5GMSEX3f7ZKyLwgQeARVIGubgRnzBXFrjzHoXFV4g0dBl2LmpJ
Iq6vVTtgzcm43mjNK26C/dUMXk8lV8J1mHv2NGLpHIJHAVoR6Zv+S/mGHOK5u2vQN76Ci1jFNQh0
HsQzLOhS5my0VocJRa2pZEGsc/FV1uHp5yDhFMR+W4WhB6MvA8I9yXmE55lngtEj1ZfAgGlFgTdY
BoYbK5kAeAC7tRTC1kEY13jlZxLU87+4be3vkPC9N5NJXHwxH6cOocgvZx8zmnol/p0DsZUPrWu2
ALi3nfpQMOfHWtq1BswDam1LWfze0Np3Co7rSk5ooTU5wWP9yfkA16S82EidyvkA3bbLB0r1bAVY
2zzNWFHrnuliBS4maE9bLeRiqo8FYYLgnDd2IFltgkDemuooM7MqbVr5QAand81NnJi14oMdaSe4
5ns7S3QjvzaxWyzjh8uqC+1jdEhiL6ycqoPF0vEmyjnpzPJ3CAUicx+PPLh1HT9EVgTuNu5AY7sE
bRA3H+mNAicaiMFZUwDPHU0b6ezwr2TpWdECkHrDysEKdmZqMeCskCkdWcDXCb6ldsU403Dl+Bf/
l+ik+6p/0Dvi5zykgsElA3yyc2y4vBA35iFusjbihOgFdb3jo9drIo82vUjfVrYe47edqhLjLabG
cshXFHQruRPC6YlhBUWHZ2/eXPYP+me9FE00Mj2bBYwYjkcl4QbTJEHr5Xj930iF+J5LmhARlCyl
ggMKEk67R4v4kzvgzxDLQ0JAv0OjOBSx0ykipqU0xLBSt7oX/d7xYV/QkdYXeCAHZvzDOCnMaJC2
FCf+LMXmP8+OTw2Y8HFjGSbyKzxpObOAcCk2FEygc3HW61spCa8uYI5SLglnYW/nw95WsbfvjX2Q
wB5buXbB5NzLEMZkthKrPMBP9I2BV8lwODvv9qhN4QwZtyPlalzKYtRU4vv6+LV603ukW6jEx9v8
8Xt9VI5sNU79U1ZfAzazSROZ8BU9MZKK5Ewx9vB7xXfzEuEH42xO4VJYUGEaRcSnsoqRUG26QoCa
+vrg4nX3IjE3p85DXDOjVG7sFTbVa506hilKvtDmw5TFhYy/ZMCySObXC122cgUvxiSEh45RDOgu
RilGjB80HjGgm45IjMiuIfAwoJAOPYwo3DnOMHSsiTSMfT9YVGGS04q4/mliiDul+f214oxN5Rx+
5YCEk5UKS5KlsdNOlnPXmGpCuiBRvu5wJdkftfnFIltJFLlPxlq90anYDau+4T2CELc00gvpCwDp
dXQVQHyXMAOEfdUQ2tEmncR7DI711pZvQ9ECGwoy1k4PxuPUsumKC4f8W5+rLRymQn35YUZhRN8f
XHRpRi/PyU1ujy3xDApGykcfk3FRepKZfCb+ymR6ws6FrZtmauZtDFr6teIF7nBanKgLJJDdxFGf
AY+VPKOmDfoNzHRkyGSYABYfvxRnu6QIYRnGx6fH/cOz05fWQgpsQcAZWpXj1R95RWAbRKCf6ZtE
YKdEYKsisPOIwF6LCOz8IrC1IrBTIrANIrANIrDTw5+R//Izqmn2x55o6VqLBIVWXh2fHpwg7zm3
ibY7PvZSrKSlbbFeyD//SWLZ88Jk3gVzgAyvijh7n5dayiYBTnrrzSaMDvbD7xMywlYBNu6IpYCF
q8sJLsWTkde3xpHlmWFDjvHDuKdFGWCqlc7dUC9JvOOu2H0Gt8UA8isOc1v5B7ol6xd/+jHNSBLO
dDPGtpXGtGx+26vy+888gBlJUvmtGcjyD2AGZmuGMOOUfg1DFZueaAeshao7DVvaSU7DosOY8t0b
GQklG+Yfo5FIJ8ZxBWPNwPv775qBd5EEW0uCvTDyNuwaoqycQb0qylpWG8Ug0V8Uw52I0MvBbgNR
9fadX149ODrq4QJlly0asNWWpOatvtqyfIxYZT9GJmomcC2JVQ7xH0kscOhIYCYeD4c80k2MLEwT
EnV2MvwQdeogn3fLo1FrgLjib8dvZBXtEYh0bUtfG5J9avVHseAsPdBALGrDmlaRmrg51qrGOTzp
I8jExft860X0zE838JzJhYtThtPLk5MXNCz1bmcTb+BFJHQ/zF08247mIrPQfCiUhP6QHTz+6KLb
Oz44IUhPFB/Sq75hKDu6ADl6eFJp8cobXkEHxRc0EmbFGL2L3hP90J54NwIrGiVTI2pVwZG3rPjY
h2zW5J0s8feH/vxM0upTq2EB0/6/vavtbRs5wp/lX7Ew0Ma6ky2J1Bsd9AA3ybUGUreNk7ZoGggy
RduEZFIlKTk+4P57Z/Z1SC4lUZYvjlF/SCSKXO7MzszuzM7OM/DyR8GthbFVueJyoYOzP74vHcPf
ujS1zdobq2Cz9+p97AiDu7VeyRuf+NlyMsfaSSkzpaOLOfukOTB3eDM5WqHr5/Lj0+bOMLo9y7IE
8+9pDmG+ZjF9v7UEvNrMMRVXDRsInl5THMghdZzK5YNpVSoLN9STIFeXWDVd1CFIWRyxqwWXR0xG
XE0SIZtK0wYdEJpRJ3/sfa3Q1C53tT/JstU7N/JVdyp96TJYcdy/II5Vp0p+W2G0W7QhWjTPy5W6
07TLSQGaBi4X+iZKDiLbjtk/zj78+e2Hy3+TigxrtBA7BBwNElJqmbMZ3/MT6xr2VjZx9LtpkzKv
WFuusnP8Xl1MGn0Xxr1Q6YTSWs3iHI9g/6Hk46Guq27q0W+mE0fhIYxuivRW9Rk8nOOufhF50xPx
wzBkB86AqsEc7NfijH5mR35oOrO7xVjcBwK6mWTzusYiCfwwxcLDKNmmmZ9AAAdN9nvW+XoNf+SJ
1J/MMTxLbjZ3bTNCrdIg6U60GG/dPiRiFhk5LWfUzdcg3ZOi2u1TDTW1N/CslHQDjftT0afgxZMp
qL2zL1g9K0dnV+W0zqqjTh+U1cmDPRoclhqDV3vSocHkhmVVkWs+S5YmGlwQrid6ZT4CTd5ZlLBp
cC3Ak4WEoRfZ3NgV9vbdz2ef3n9khT5VNGy6UXi7rJyMt9j8DXbx14+8R0RFyBqxhNUibTiCNDgj
Nw93sV+xqFpqPplQ7OGF+xGJitPVTygQFW+sLRt2E+KgrPTpwpz7OzPh78wK/g4HG4fLVneHui8/
wqPUhan2ordSdzve+exLznXMV34Fh4XA6grxp38FzstqouNZ8NDkm/jFvzKFJcYoim1/dgaU7qpg
BqVE4sFX9P11oevSqa7oyn+i5iFx8zjk/fLubxzsQvqg+TATfVSBYLAjI4NF4TGtUamx4FCWRj+v
SUczUw6BFapVKMUXGB0fwICAZFShlhXxh7BqxWFOjESEy/xMUXascTFuSif+PL2chQtFIRYmOnvz
XibmmsES3BZ22h2C7g3pWvtJdG+r6MEWBvb7V8KNnNjugb1qo/0VdRWzqpV96Og2xWSeQEMrSsxY
lNV+p0VvbVHHHbTXPpNiReXRcFS1CTR7bS5mCOHCSyHrvQwQ53mYZp+7nU6HZOyCgPzAa4zjOubz
+cXbd/8a474RiN5l4Tbc0OKVaniwDvOW+LZHfM0/468cACmLGZYKXCIKZ2AGCDcoeFl0BnIroAxU
ZHk0coGykVe1h1NJGd3NkfRtyiP7xvTaR3bUQfpH1M1Spd8J6ZG+sGaTT21BhtNSOrj5yZIIzqxI
A3jZklYnsQ1ove+R1wUacqDem2nYYjeO0LPphjVFO3amzTpeiKPjeF2Kq8IHm8vFMg2SY1iKh1Ew
5UKS8pryKtWPXzlh7J8Bu+O1HOBH3QQHGLu/nWTsPmD3kyjDzcN5HM/C6AbbV8UU9Uvbxe0yJX+q
mqasV6WhQxBjwOCGSNgQeZ0j3hDoEGNeJaaE2GfgOAXK7q3FLKIVNlkdPBu98rhWicfZNEjwUBra
TYW00TxlksojpapNcMLCeTAFBoMEzCeRwGTj1F9N/BlY8VNO4AnfW4J+J0mc/CVI08lNIPuvcOph
hEcwzDRH6BsPc71dq+chCnm8mO9WIOx2APOtPJfabWXygBM8eTfPLv7TZ2EDv1CemMfI1t0V2LJZ
qcBmcVjjhZ8bVvjOW7KMrPxJD+7SMrj8jmem3Xq+3q9692DW9fok+f7JRu9xivvbj/A3Utq9j7Nd
azH5JYeK9qtyg2CZB4+ugiRjBk0O1gRXQYJwO7DSM5f5YlNaZuPwtJhaZ/MUTukA5ZeZxAlSWZ9q
yUlQIaWQDnrQ2SER0kd3tiSMssdSJIrO2059tzNe0ELxh0gsVj5ONljUUp+kEAhopC9EMLWhL0T7
lDugoz6KypJnyalVJ0e5X9kyyPUaqdDqSpruyxrz3hBnhBGNjO+fxLLNkLQ9FWn20Rz2BanEaTE0
4rklajs1GpYJJgdfw2wcgQ2YPyiVtcXQFg9HsPbf2OnCA456wPh6toBAPZlhtKx1w85b3ld4vwmG
JEGQ6wUNL+gtFW/ktVzwzAtIg3vlZknxoa+aB5YfnTWxu+2HxPZsrdHZJO5bjooKzcDbCxiGG0fI
Lv+eCyNGDz2YLbBS3YSyvufKJ+iIcF7YKwa9glFl2c8/vyY1zdia7fM/+bygs/SoKFXndooQtDqZ
yTmjUutgHFWLmPoF/y5TdIdEGWbJX31ONE+ZAr4rlgH4dHH+90/v8hUAMJBAPjsVjo0A1mtarXBu
bQOzcBSAC+gwQdarlPHFmL/8RYwCu52kYE9gBeOzJMiWScQmsDQ026UFfojjPjINX76zmFhfegaD
xCbznWkFKWpZpzIoypVA01ihGp2CapDzthYyCr0hqf8NfQgCbB4avl4352Q/Ro3WWbl1Rm6tjaun
iWtN3j6Vcrf82pLmanu4XQbtM9Hi/LGNhrbrL1mj9Zg8I73OzaZGu22Tput0Ry3XcfSiUXJxBT7q
gcCQuZSHF3IgMh+Fvl/HYAFwSKuhuUSguddo4AlpJQlh5F89qC93k68rgVboOu4QetNzle3ZV28a
9fpi55QzwL5RZ6nhT8AImD2Khv/gg5OsjyAhoOBUbTLSwyUZPRVUBVmGt5RAfhsmCqFOlYyF+PIT
6BwGDhenfsLx6cZAGgOi1A8KoukujNQlToN+MB1LGvhHToDw8o0Xo3JukNPr0uux/zVAxOpEMoRl
sEYxtICAuupARq3gRZGytUErkIg+iEU/t82ym1g0pFjUgCPD29fAIr8YYakACfv+RMZuWYZdECHP
rQdaJUHa+ALi8h3Yjos35TM669lODkCK1taANVGZkmsL8la01EmGcPZamvALmlOUFY5zb6RJXxPy
hJ9kx/GebTovJJjLrhTaFfwLLUsRVZAmQj5x6fIqe8UXL/yKWLtowbPzQA2DFGxs41qe0ReLjNcN
tTqJs1tcVGUxm8bsLk6CKph2DaoXBV+xcgE7QiFq1hy0yv6aVbzjdVqu2+3vCJ0kLXTFud/9i14d
zCDTtw2m7wWLqQ0XZw/Cuguz9y7StTB/XJiAQdDdTiEJJ0qW8yAH0amm3+3WXua5Md9TDtH+610A
1+3BYtDtO4UEmU1vrTO1V/fAzoeeiz0iABsG7uJPgdgH571jeo88ThiIQsq48y7vbVsnGbVhfTO+
CbIxNgONHMHXJLhPwiw4wUtin0iXvDy7ZKbfGkJUPtDCz/lNMwkmqq4raZGb3qTdi7ekoZNgNVY7
hPpR3GzT92s0UvIQ3YHTIQx9VlSap01r1xJcaR28Urk/4boDWD66Q1Jl+xHDtqMd///oVi42HzvG
5xibOsV0tLs4OvEP/vD4v4MPby7ZNSxOT1l7mSbteQw2v+2v0iSOs/biJv3vvJ0mfhtsLnwb4wK3
rd7fWh3AbJCEwQpngAT+4yehuidu/2AaXl+zY58dJ/jVdBmti/rS6Hqe1+52247DusPT/uDUHTT4
0yjMhbuctjNgTufU8U47HbvR8lo9GXngygBfBzTseB7disp7YXSbq713LnNc+SDJIAEayzRLzqOz
JJk8HFF3ezHJsiCB8RVff5jg0h+bgg/jNPxFRit/ZEQ7WDgdy5lTFInjeilzhXQlFn6pwdhNuAoi
NuEF4zAfccJ4DRsVjcJ0XLyA8mflRM8btPod7QHIaBIhIZnch+BnXcXxPD99HsgChPRmf8GxkCRj
+LVwWjnNoYQXm5S7zv4CdIS/+jW2qiokvWb+QmcNi1pbYTqP78GmwF1N9MzCdBrehJn+jh/4qmT8
qtkUGYo9bwQ0a8d5DzQLdC+eAKIGr2kvAWh+5zUCeXQNb9TXqyZmuOmbMc0mOP1Ov9XvDoquI+2a
bilX30p6k2qLClPHD1XytDwKgVc5HeXL5GZOroQZ58FGHaokjMDrkrFioH7FpagY8qZKO+53u62+
4xZdlm1psQX55WjmOrz2PkrvNg2WiN6ydb4GFZyTv4ppZzOn/gcsUn7lGuUAAA==
------_=_NextPart_000_01BF504B.C75CE92C--
From bouncefilter Mon Dec 27 04:24:32 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA34921
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 04:24:26 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <ZW4G6V2Y>; Mon, 27 Dec 1999 11:21:42 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C387@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: Explain plan output
Date: Sun, 26 Dec 1999 22:43:48 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain
Hi, again,
Merry Christmas to those of you who celebrate it, and if you're reading this
within three days of Christmas, then you're as sorry an excuse for a human
being as I am ;-)
Anyway, the point of this mail is to say that I have altered the explain
code slightly, so that it dumps the results of the explain into a table. I
find that a lot more convenient for two reasons: a) it's persistent, b) it's
accessible, no matter what interface you're using. Poor old Dave Page has
been racking his brain trying to figure out how to get a plan to pgAdmin (if
he hasn't already), and I even proposed supplying a server-side library that
would trap the output, and send that contents back through a stored
procedure, or something. Anyway, with the current way that I have coded it,
in addition to the plan output using elog, it gets dumped into a table, the
rows of which can the be selected. There are a couple of issues that I
would like to resolve.
a) This is a useful format, but are there enough interested people to
warrant continuing?
b) If so, should the output table be a system table?
c) If not, then how does the explain decide what to do if the table doesn't
exist?
d) And if the table does exist, then should it elog the plan?
e) The plan id is output using elog. How would I ensure that this gets back
to any arbitrary client. If I understand right, elogs don't go to ODBC, and
possibly other, clients.
I'm sure there are other things that I will remember, but that's all for
now.
MikeA
From bouncefilter Mon Dec 27 04:24:33 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA34923;
Mon, 27 Dec 1999 04:24:29 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <ZW4G6V2Z>; Mon, 27 Dec 1999 11:21:45 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C388@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'pgsql-hackers@postgreSQL.org '" <pgsql-hackers@postgreSQL.org>,
"'pgsql-patches@postgreSQL.org '" <pgsql-patches@postgreSQL.org>
Subject: Unlimited query length - The final chapter (part II)
Date: Sun, 26 Dec 1999 23:04:34 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: multipart/mixed;
boundary="----_=_NextPart_000_01BF504B.CB0120A2"
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01BF504B.CB0120A2
Content-Type: text/plain
Hi, all,
This is the patch for the final bit. Sorry that it's separate.
Cheers...
MikeA
------_=_NextPart_000_01BF504B.CB0120A2
Content-Type: application/octet-stream;
name="pg_dump.diff.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="pg_dump.diff.gz"
H4sICHiCZjgAA3BnX2R1bXAuZGlmZgDNkltPpDAUx5/xUxxJdqEFDIOTcQDdza6OiQ8mjsZEV82k
QmGJK9PlYjTG7+6h0BkmXrIxPmwDTfvvufXXQykFkc7i+lZsRBvX7GagndQ57PEIvBF4XjAcB54P
A9/31xzHWdqumG0G7iAYDlszujqaPQy2XNfGaQRSAtBwZHmFc5XmrEhL2AFWzTPzaJry6o79qblZ
8NKzIWv+WWdFSNg5R/O8rCD6zQqgVdpFeNNZ+r7mKsK19VbEraYlaHhx+ONsNj2dHJ/PTg5+Ta7C
lXKTLI/vG6lTk3kBphQxvxtCu9yGvL7dr/Oo7BTLIpLfEgTunP8RxNF0ci9+1knCC4kDo0UFZxXv
HZjk06C83i3jEULy/X634LjGOm5UZu1JLYTjqOLbzA2B9qo2xLj+asp3da9ICCWWIUKifB8X0bME
TIqeO2BcGgZRATWNxpYFjXppLNIokZaW1SuoO6WxvLbaMiF4Hvfx/a158WCDbnwp8dNtaOqzlxc1
FTDVE9g4BL4DWuoQgK4v+GuLJxdgwVDJT12ztRzH/Wb7EMePcHtx7V1sNPkStoRJljTfM20Qk5eM
/xGq8y1mFftctM9suCJwNAUAAA==
------_=_NextPart_000_01BF504B.CB0120A2--
From bouncefilter Sun Dec 26 16:22:24 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA73031
for <pgsql-hackers@postgreSQL.org>;
Sun, 26 Dec 1999 16:21:54 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id QAA23241;
Sun, 26 Dec 1999 16:20:49 -0500 (EST)
To: Mateus Cordeiro Inssa <mateus@ifnet.com.br>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-reply-to: <12358.946050770@sss.pgh.pa.us>
References: <14435.24355.627616.355738@Blaublau.home.br>
<12358.946050770@sss.pgh.pa.us>
Comments: In-reply-to Tom Lane <tgl@sss.pgh.pa.us>
message dated "Fri, 24 Dec 1999 10:52:50 -0500"
Date: Sun, 26 Dec 1999 16:20:49 -0500
Message-ID: <23238.946243249@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
I wrote:
Mateus Cordeiro Inssa <mateus@ifnet.com.br> writes:
I got this error vacuuming pg_proc:
ERROR: _bt_endpoint: leftmost page (20) has not leftmost flag
Hmm, I wonder if this could be yet another manifestation of the problems
that btree indexes have with oversized key values. Do you have any
procedures with long definitions? "Long" in this context means over
about 4K.
I spent some more time looking into this, and found out that actually
the safe upper limit for btree index entries is not ~ BLCKSZ/2, but
~ BLCKSZ/3. btree needs to be able to insert two items on every page,
but it *also* keeps an extra item (the "high key") on non-rightmost
pages. So if any item exceeds one-third the available space, you run
a risk of failure depending on what page it ends up on and what else
is on that same page.
It turns out that for an index on a single text column, the maximum
safe text length is 2700 bytes. So the correct check for dangerous
procedure definitions in 6.5.* is
select proname from pg_proc where length(prosrc) > 2700;
I have committed a check for dangerously long index entries into both
current sources and REL6_5 branch. The patch is attached if you want to
add it to your installation right away. Note that this only defends
against oversize new entries; if you've already got oversize index
entries, you still have trouble waiting to happen...
regards, tom lane
*** src/backend/access/nbtree/nbtinsert.c.orig Wed Sep 1 13:54:00 1999
--- src/backend/access/nbtree/nbtinsert.c Sun Dec 26 15:44:15 1999
***************
*** 268,273 ****
--- 268,285 ----
* consistent */
/*
+ * Check whether the item can fit on a btree page at all.
+ * (Eventually, we ought to try to apply TOAST methods if not.)
+ * We actually need to be able to fit three items on every page,
+ * so restrict any one item to 1/3 the per-page available space.
+ * Note that at this point, itemsz doesn't include the ItemId.
+ */
+ if (itemsz > (PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData))
+ elog(ERROR, "btree: index item size %d exceeds maximum %d",
+ itemsz,
+ (PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData));
+
+ /*
* If we have to insert item on the leftmost page which is the first
* page in the chain of duplicates then: 1. if scankey == hikey (i.e.
* - new duplicate item) then insert it here; 2. if scankey < hikey
From bouncefilter Sun Dec 26 20:06:27 1999
Received: from mtiwmhc02.worldnet.att.net (mtiwmhc02.worldnet.att.net
[204.127.131.37]) by hub.org (8.9.3/8.9.3) with ESMTP id UAA14749
for <pgsql-hackers@postgreSQL.org>;
Sun, 26 Dec 1999 20:05:39 -0500 (EST)
(envelope-from rkirkpat@rkirkpat.net)
Received: from [192.168.3.100] ([12.74.72.56])
by mtiwmhc02.worldnet.att.net (InterMail v03.02.07.07 118-134)
with ESMTP id <19991227010506.WJVW1914@[12.74.72.56]>;
Mon, 27 Dec 1999 01:05:06 +0000
Date: Sun, 26 Dec 1999 18:05:02 -0700 (MST)
From: Ryan Kirkpatrick <pgsql@rkirkpat.net>
X-Sender: rkirkpat@excelsior.rkirkpat.net
To: Damond Walker <dwalker@black-oak.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] database replication
In-Reply-To: <002201bf4fb3$623f0220$b263a8c0@vmware98.walkers.org>
Message-ID: <Pine.LNX.4.10.9912261742550.7666-100000@excelsior.rkirkpat.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sun, 26 Dec 1999, Damond Walker wrote:
How about a single, seperate table with the fields of 'database',
'tablename', 'oid', 'last_changed', that would store the same data as your
PGR_TIME field. It would be seperated from the actually data tables, and
...
The problem with OID's is that they are unique at the local level but if
you try and use them between servers you can run into overlap.
Yea, forgot about that point, but became dead obvious once you
mentioned it. Boy, I feel stupid now. :)
Using the PGR_TIME field with an index will allow us to find rows which
have changed VERY quickly. All we need to do now is somehow programatically
find the primary key for a table so the person setting up replication (or
syncing) doesn't have to have an indepth knowledge of the schema in order to
setup a syncing schedule.
Hmm... Yea, maybe look to see which field(s) has a primary, unique
index on it? Then use those field(s) as a primary key. Just require that
any table to be synchronized to have some set of fields that uniquely
identify each row. Either that, or add another field to each table with
our own, cross system consistent, identification system. Don't know which
would be more efficient and easier to work with.
The former could potentially get sticky if it takes a lots of
fields to generate a unique key value, but has the smallest effect on the
table to be synced. The latter could be difficult to keep straight between
systems (local vs. remote), and would require a trigger on inserts to
generate a new, unique id number, that does not exist locally or
remotely (nasty issue there), but would remove the uniqueness
requirement.
Oops...how about defining a trigger for this? With deletion I guess we
would have to move a flag into another table saying we deleted record 'X'
with this primary key from this table.
Or, according to my logic below, if a row is missing on one side
or the other, then just compare the remaining row's timestamp to the last
synchronization time (stored in a seperate table/db elsewhere). The
results of the comparsion and the state of row existences tell one if the
row was inserted or deleted since the last sync, and what should be done
to perform the sync.
Yea, this is indeed the sticky part, and would indeed require some
fine-tunning. Basically, the way I see it, is if the two timestamps for a
single row do not match (or even if the row and therefore timestamp is
missing on one side or the other altogether):
local ts > remote ts => Local row is exported to remote.
remote ts > local ts => Remote row is exported to local.
local ts > last sync time && no remote ts =>
Local row is inserted on remote.
local ts < last sync time && no remote ts =>
Local row is deleted.
remote ts > last sync time && no local ts =>
Remote row is inserted on local.
remote ts < last sync time && no local ts =>
Remote row is deleted.
where the synchronization process is running on the local machine. By
exported, I mean the local values are sent to the remote machine, and the
row on that remote machine is updated to the local values. How does this
sound?
Having said that, a good algo will have to be written to cut down on
network traffic and to keep database conversations down to a minimum. This
will be appreciated by people with low bandwidth connections I'm sure
(dial-ups, fractional T1's, etc).
Of course! In reflection, the assigned identification number I
mentioned above might be the best then, instead of having to transfer the
entire set of key fields back and forth.
What would a vacuum do to a system being used by many people?
Probably lock them out of tables while they are vacuumed... Maybe
not really required in the end, possibly optional?
It could probably be named either way...but the one thing I really don't
want to do is start hacking server code. The PostgreSQL people have enough
to do without worrying about trying to meld anything I've done to their
server. :)
Yea, they probably would appreciate that. They already have enough
on thier plate for 7.x as it is! :)
Besides, I like the idea of having it operate as a stand-alone product.
The only PostgreSQL feature we would require would be triggers and
plpgsql...what was the earliest version of PostgreSQL that supported
plpgsql? Even then I don't see the triggers being that complex to boot.
No, provided that we don't do the identification number idea
(which the more I think about it, probably will not work). As for what
version support plpgsql, I don't know, one of the more hard-core pgsql
hackers can probably tell us that.
The only thing we'd need for Python is the Python extensions for
PostgreSQL...which in turn requires libpq and that's about it. So, it
should be able to run on any platform supported by Python and libpq.
Of course. If it ran on NT as well as Linux/Unix, that would be
even better. :)
Unix folks should be happy....assuming they have X running on the
machine doing the replication or syncing. Even then I wrote a curses
based Python interface awhile back which allows buttons, progress
bars, input fields, etc (I called it tinter and it's available at
http://iximd.com/~dwalker). It's a simple interface and could
probably be cleaned up a bit but it works. :)
Why would we want any type of GUI (X11 or curses) for this sync
program. I imagine just a command line program with a few options (local
machine, remote machine, db name, etc...), and nothing else.
Though I will take a look at your curses interface, as I have been
wanting to make a curses interface to a few db interfaces I have, in a
simple as manner as possible.
That would be a Good Thing. Have webspace somewhere? If I can get
permission from the "powers that be" at the office I could host a website on
our (Domino) webserver.
Yea, I got my own web server (www.rkirkpat.net) with 1GB+ of disk
space available, sitting on a decent speed DSL. Even can setup of a
virtual server if we want (i.e. pgsync.rkirkpat.net :). CVS repository,
email lists, etc... possible with some effort (and time).
So, where should we start? TTYL.
PS. The current pages on my web site are very out of date at the
moment (save for the pgsql information). I hope to have updated ones up
within the week.
---------------------------------------------------------------------------
| "For to me to live is Christ, and to die is gain." |
| --- Philippians 1:21 (KJV) |
---------------------------------------------------------------------------
| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |
---------------------------------------------------------------------------
From bouncefilter Sun Dec 26 21:33:28 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA34476
for <pgsql-hackers@postgresql.org>;
Sun, 26 Dec 1999 21:32:31 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
VAA27313;
Sun, 26 Dec 1999 21:19:48 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912270219.VAA27313@candle.pha.pa.us>
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-Reply-To: <23238.946243249@sss.pgh.pa.us> from Tom Lane at "Dec 26,
1999 04:20:49 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 26 Dec 1999 21:19:48 -0500 (EST)
CC: Mateus Cordeiro Inssa <mateus@ifnet.com.br>, pgsql-hackers@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I spent some more time looking into this, and found out that actually
the safe upper limit for btree index entries is not ~ BLCKSZ/2, but
~ BLCKSZ/3. btree needs to be able to insert two items on every page,
but it *also* keeps an extra item (the "high key") on non-rightmost
pages. So if any item exceeds one-third the available space, you run
a risk of failure depending on what page it ends up on and what else
is on that same page.It turns out that for an index on a single text column, the maximum
safe text length is 2700 bytes. So the correct check for dangerous
procedure definitions in 6.5.* is
This is another argument to try and get long tuples into 7.0.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 26 22:24:28 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA41118
for <pgsql-hackers@postgreSQL.org>;
Sun, 26 Dec 1999 22:24:07 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id WAA25190;
Sun, 26 Dec 1999 22:22:56 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-reply-to: <199912270219.VAA27313@candle.pha.pa.us>
References: <199912270219.VAA27313@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Sun, 26 Dec 1999 21:19:48 -0500"
Date: Sun, 26 Dec 1999 22:22:56 -0500
Message-ID: <25187.946264976@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
It turns out that for an index on a single text column, the maximum
safe text length is 2700 bytes.
This is another argument to try and get long tuples into 7.0.
I think Jan might have enough on his plate already without trying to
TOAST the index code along with the plain-table code. But if he can
get it done, great!
One thing this does bring up is that the maximum safe tuple length is
dependent on the index or table type. The toaster's API had better
be designed accordingly...
regards, tom lane
From bouncefilter Sun Dec 26 22:39:28 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA45223
for <pgsql-hackers@postgreSQL.org>;
Sun, 26 Dec 1999 22:38:46 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
WAA28667;
Sun, 26 Dec 1999 22:36:19 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912270336.WAA28667@candle.pha.pa.us>
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-Reply-To: <25187.946264976@sss.pgh.pa.us> from Tom Lane at "Dec 26,
1999 10:22:56 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun, 26 Dec 1999 22:36:19 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
It turns out that for an index on a single text column, the maximum
safe text length is 2700 bytes.This is another argument to try and get long tuples into 7.0.
I think Jan might have enough on his plate already without trying to
TOAST the index code along with the plain-table code. But if he can
get it done, great!One thing this does bring up is that the maximum safe tuple length is
dependent on the index or table type. The toaster's API had better
be designed accordingly...
In talking to Jan, the index code will make use of the toast entries
automatically. He said the heap_insert will do any toasting, and after
that the tuple already has any toast pointers, and that gets inserted
into the index.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Sun Dec 26 23:16:29 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA51342
for <pgsql-hackers@postgreSQL.org>;
Sun, 26 Dec 1999 23:16:09 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id XAA25246;
Sun, 26 Dec 1999 23:14:25 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-reply-to: <199912270336.WAA28667@candle.pha.pa.us>
References: <199912270336.WAA28667@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Sun, 26 Dec 1999 22:36:19 -0500"
Date: Sun, 26 Dec 1999 23:14:25 -0500
Message-ID: <25243.946268065@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
One thing this does bring up is that the maximum safe tuple length is
dependent on the index or table type. The toaster's API had better
be designed accordingly...
In talking to Jan, the index code will make use of the toast entries
automatically. He said the heap_insert will do any toasting, and after
that the tuple already has any toast pointers, and that gets inserted
into the index.
If that's his plan, then it's broken by design. Toasting a complete
tuple cannot be the basis for toasting index entries related to the
tuple, because (a) the index entries will typically use only some of the
fields appearing in the tuple; (b) index entries have different length
limits than tuples do; (c) indexes might be created after the original
table is. Heck, index *types* might be created after the original table
is. If index toasting is dependent on toasting of the main table, the
only way it can work is to toast every varlena attribute down to a
prechosen maximum length that Jan hopes will satisfy every index type,
now or hereafter --- no matter whether the column in question has or
ever will have an index of any type.
And that'll still crash and burn for multicolumn indexes.
I thought the plan was to toast indexes independently of the main
table, ie, an index would have its own toast-table and its own
storage of oversize attributes --- where the *index* decides what
is oversize, not the main table.
If main tables and indexes point at the same toast-table entries,
I think VACUUM will become rather an interesting problem, too...
although maybe that could be worked around if VACUUM destroys indexes
and rebuilds them from scratch.
regards, tom lane
From bouncefilter Sun Dec 26 23:21:29 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA51791
for <pgsql-hackers@postgreSQL.org>;
Sun, 26 Dec 1999 23:21:05 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id XAA25286;
Sun, 26 Dec 1999 23:19:23 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-reply-to: <25243.946268065@sss.pgh.pa.us>
References: <199912270336.WAA28667@candle.pha.pa.us>
<25243.946268065@sss.pgh.pa.us>
Comments: In-reply-to Tom Lane <tgl@sss.pgh.pa.us>
message dated "Sun, 26 Dec 1999 23:14:25 -0500"
Date: Sun, 26 Dec 1999 23:19:23 -0500
Message-ID: <25283.946268363@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
I wrote:
And that'll still crash and burn for multicolumn indexes.
Not to mention functional indexes, which typically store values that
don't appear in the referenced tuple at all.
Basically, indexes have to have their own toasters. There's no other
way.
regards, tom lane
From bouncefilter Mon Dec 27 00:31:30 1999
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA66310
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 00:30:47 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA00630;
Mon, 27 Dec 1999 00:05:55 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912270505.AAA00630@candle.pha.pa.us>
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-Reply-To: <25243.946268065@sss.pgh.pa.us> from Tom Lane at "Dec 26,
1999 11:14:25 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 27 Dec 1999 00:05:55 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
One thing this does bring up is that the maximum safe tuple length is
dependent on the index or table type. The toaster's API had better
be designed accordingly...In talking to Jan, the index code will make use of the toast entries
automatically. He said the heap_insert will do any toasting, and after
that the tuple already has any toast pointers, and that gets inserted
into the index.If that's his plan, then it's broken by design. Toasting a complete
tuple cannot be the basis for toasting index entries related to the
tuple, because (a) the index entries will typically use only some of the
fields appearing in the tuple; (b) index entries have different length
limits than tuples do; (c) indexes might be created after the original
Yes, I see your point. This could be quite complicated. He is
targeting BLKSZ and indexes are BLKSZ/3. He could toast any single
attribute of size >= BLKSZ/3, but as you mentioned multi-column
indexes would be a problem. I wonder if he could create the TOAST
entries and modify the heap tuple during index creation?
Wow, this clearly is going to be messy. Maybe he is going to have to
have a separate TOAST table for the index. If he got fancy, he could
use the heap TOAST table as needed, and have a secondary index TOAST for
cases the tuple needs further TOASTS for indexes.
It shows we haven't thought through all this yet.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 27 01:51:31 1999
Received: from news.tht.net (news.hub.org [216.126.91.242])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA78496
for <pgsql-hackers@postgresql.org>;
Mon, 27 Dec 1999 01:51:11 -0500 (EST)
(envelope-from news@news.tht.net)
Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id BAA01317
for pgsql-hackers@postgresql.org; Mon, 27 Dec 1999 01:34:51 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: news.tht.net: news set sender to <news> using -f
From: "Dmitry" <somebody@home.net>
X-Newsgroups: comp.databases.postgresql.hackers
References: <o5e94.3459$GF1.189168@newsread1.prod.itd.earthlink.net>
Subject: Re: question about MS Access connect to Postgresql 6.5.2-1
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <dMD94.30940$kX4.128640@news.rdc2.mi.home.com>
Date: Mon, 27 Dec 1999 06:34:49 GMT
X-Complaints-To: abuse@home.net
X-Trace: news.rdc2.mi.home.com 946276489 24.13.50.66 (Sun,
26 Dec 1999 22:34:49 PST)
Organization: @Home Network
To: pgsql-hackers@postgresql.org
There are is a Read-Only option in postgresODBC driver properties... checked
by default :-]
I have seen it in Advanced Options form of Connection dialog during creation
of new data source
in MS Query.
I hope it will help you a little bit.
Dmitry
"Kevin Lam" <kamanl@earthlink.com> wrote in message
news:o5e94.3459$GF1.189168@newsread1.prod.itd.earthlink.net...
I'm using access to connect to the PostgreSQL server running on a linux
thru
postgresODBC driver.
I can link the table and can read the data in the table but
I can't update it?! I can not add a record. What am I
doing wrong?The user login has only the create db privilege and without
the superuser privilege.Please help!
Kevin.
From bouncefilter Mon Dec 27 02:49:31 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA32185
for <pgsql-hackers@postgresql.org>;
Mon, 27 Dec 1999 02:49:22 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id QAA29125
for <pgsql-hackers@postgresql.org>;
Mon, 27 Dec 1999 16:49:20 +0900 (JST)
Received: from localhost (IDENT:t-ishii@localhost [127.0.0.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id QAA23506
for <pgsql-hackers@postgresql.org>; Mon, 27 Dec 1999 16:49:19 +0900
To: pgsql-hackers@postgresql.org
Subject: ecpg enhance patch
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991227164919G.t-ishii@sra.co.jp>
Date: Mon, 27 Dec 1999 16:49:19 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 44
Here is a patch that would enhance the efficiency in that skip strings
which have been already checked. The patch was made by Kazuko
Nakagawa. Michael, can you comment on this?
*** ecpglib.c.orig Wed Dec 22 13:13:21 1999
--- ecpglib.c Wed Dec 22 13:37:32 1999
***************
*** 398,403 ****
--- 398,404 ----
PGresult *results;
PGnotify *notify;
struct variable *var;
+ int hostvarl = 0;
copiedquery = ecpg_strdup(stmt->command, stmt->lineno);
***************
*** 569,575 ****
return false;
strcpy(newcopy, copiedquery);
! if ((p = next_insert(newcopy)) == NULL)
{
/*
--- 570,576 ----
return false;
strcpy(newcopy, copiedquery);
! if ((p = next_insert(newcopy+hostvarl)) == NULL)
{
/*
***************
*** 582,587 ****
--- 583,589 ----
else
{
strcpy(p, tobeinserted);
+ hostvarl = strlen(newcopy);
/*
* The strange thing in the second argument is the rest of the
From bouncefilter Mon Dec 27 04:06:32 1999
Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA33281
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 04:06:26 -0500 (EST) (envelope-from hannu@tm.ee)
Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP
id B98A1B2B0; Mon, 27 Dec 1999 11:10:00 +0200 (EET)
Sender: hannu@hu.tm.ee
Message-ID: <38672CE8.3356DE4F@tm.ee>
Date: Mon, 27 Dec 1999 11:10:00 +0200
From: Hannu Krosing <hannu@tm.ee>
Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?=
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13-7mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Ryan Kirkpatrick <pgsql@rkirkpat.net>
Cc: Damond Walker <dwalker@black-oak.com>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] database replication
References: <Pine.LNX.4.10.9912261742550.7666-100000@excelsior.rkirkpat.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Ryan Kirkpatrick wrote:
On Sun, 26 Dec 1999, Damond Walker wrote:
How about a single, seperate table with the fields of 'database',
'tablename', 'oid', 'last_changed', that would store the same data as your
PGR_TIME field. It would be seperated from the actually data tables, and...
The problem with OID's is that they are unique at the local level but if
you try and use them between servers you can run into overlap.
The same is unfortunately true of any local primary key in a replicated
system.
Mariposa solved this by making the oid 8-byte, of which first four are the
site id
and remaining four are the oid as we have it now.
This has the added benefit of being able to determine which site created the
record.
Oops...how about defining a trigger for this? With deletion I guess we
would have to move a flag into another table saying we deleted record 'X'
with this primary key from this table.Or, according to my logic below, if a row is missing on one side
or the other, then just compare the remaining row's timestamp to the last
synchronization time (stored in a seperate table/db elsewhere). The
results of the comparsion and the state of row existences tell one if the
row was inserted or deleted since the last sync, and what should be done
to perform the sync.
It's very difficult to find a _missing_ row quickly. It will allways be
somewhat
expensive.
Perhaps the easiest way would be to re-introduce time-travel. then a deleted
row
would just be an ordinary row with its valid_to timestamp set to past.
probably a set of (valid_from,valid_to,site_id,local_row_id) would be
sufficient to
pinpoint the record both in time and space.
Being able to do it would require some improvement in postgres inheritance.
At least rules, triggers, indexes, constraints and defaults should be
inheriteable.
No, provided that we don't do the identification number idea
(which the more I think about it, probably will not work). As for what
version support plpgsql, I don't know, one of the more hard-core pgsql
hackers can probably tell us that.
Ask Jan Wiek, he did it :)
The only thing we'd need for Python is the Python extensions for
PostgreSQL...which in turn requires libpq and that's about it. So, it
should be able to run on any platform supported by Python and libpq.Of course. If it ran on NT as well as Linux/Unix, that would be
even better. :)
NT kas both Python and libpq but unfortunately no PyGreSQL. If someone takes
the time to make it compile it would be appreciated :)
If you feel you like pure python protocol hacking, I can dig up my python
module that was able to do simple queries for version 6.2
------------------
Hannu
From bouncefilter Mon Dec 27 04:43:33 1999
Received: from gandalf.telecom.at (gandalf.telecom.at [194.118.26.84])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA40453
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 04:42:30 -0500 (EST)
(envelope-from ZeugswetterA@wien.spardat.at)
Received: from sdexcgtw01.f000.d0188.sd.spardat.at
(sdexcgtw01.f000.d0188.sd.spardat.at [172.18.1.16])
by gandalf.telecom.at (xxx/xxx) with ESMTP id KAA05114;
Mon, 27 Dec 1999 10:40:57 +0100
Received: by sdexcgtw01.f000.d0188.sd.spardat.at with Internet Mail Service
(5.5.2448.0) id <Y93Q9G59>; Mon, 27 Dec 1999 10:40:57 +0100
Message-ID:
<219F68D65015D011A8E000006F8590C603FDC1E0@sdexcsrv1.f000.d0188.sd.spardat.at>
From: Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
To: "'Bruce Momjian'" <pgman@candle.pha.pa.us>
Cc: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: AW: [HACKERS] Error "vacuum pg_proc"
Date: Mon, 27 Dec 1999 10:40:51 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
It turns out that for an index on a single text column, the maximum
safe text length is 2700 bytes. So the correct check for dangerous
procedure definitions in 6.5.* isThis is another argument to try and get long tuples into 7.0.
The limit of 2700 is btree specific, and imho a more than actually
reasonable limit for a btree key.
Anybody wanting an index on a larger key would usually be
better off with different indexing methods, like a functional
btree, hash, or text index.
Andreas
From bouncefilter Mon Dec 27 06:35:34 1999
Received: from netrinsics.com ([202.106.4.234])
by hub.org (8.9.3/8.9.3) with ESMTP id GAA65564
for <pgsql-hackers@hub.org>; Mon, 27 Dec 1999 06:35:18 -0500 (EST)
(envelope-from robinson@netrinsics.com)
Received: (from robinson@localhost) by netrinsics.com (8.9.3/8.9.3) id
TAA10184
for pgsql-hackers@hub.org; Mon, 27 Dec 1999 19:35:52 +0800 (CST)
(envelope-from robinson)
Date: Mon, 27 Dec 1999 19:35:52 +0800 (CST)
From: Michael Robinson <robinson@netrinsics.com>
Message-Id: <199912271135.TAA10184@netrinsics.com>
To: pgsql-hackers@hub.org
Subject: Re: [HACKERS] database replication
Before anyone starts implementing any database replication, I'd strongly
suggest doing some research, first:
(I'd even more strongly suggest implementing database replication in a
production environment, first, but that might be unduly burdensome.)
-Michael Robinson
From bouncefilter Mon Dec 27 07:55:34 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id HAA79418
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 07:55:15 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id NAA07346
for <pgsql-hackers@postgreSQL.org>; Mon, 27 Dec 1999 13:40:50 +0100
Date: Mon, 27 Dec 1999 13:40:49 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: memory dilemma
Message-ID: <Pine.LNX.3.96.991227124802.6398D-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
I have dilemma with PG's memory. I'am finishing with to_char()
implementation and I try use internal cache buffer in this routines.
This cache is used if a to_char() format-picture (which going to the
internal to_char parser) is equal as previous and to_char's parser is
skiped. It is very good, because speed rise (20%).
A problem is how implement this cache:
via palloc - It is standard in PG, but it is problem, because
memory contents is not persisten across transactions. And
I don't know how check when memory is free (lose) and a routine
must reallocs memory again (if transaction finish PG memory
management not zeroizing (reset) memory and any "if( buffer )"
still affects as good memory).
via malloc - (Now used). It is good, because buffer is persistent.
This variant is (example) use in regexp utils in PG now.
But is it nice?
via a static buffer - but how long? Terrible. Or set any default
size for this buffer, and if format-picture will bigger - use
pallocated memory and not use cache buffer. (It is my favourite
variant.)
not use cache - hmm.. but I like fast routines (my current
to_char() implementation is faster (20-50%) than current
date_part()).
Any idea? Please.
Karel
PS. IMHO - add to PostgreSQL any *across transactions persistent*
memory managemet?
----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------
From bouncefilter Mon Dec 27 08:22:35 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA85442
for <pgsql-hackers@postgresql.org>;
Mon, 27 Dec 1999 08:21:54 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <ZW4G6VN0>; Mon, 27 Dec 1999 15:19:09 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C38A@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'pgsql-hackers@postgresql.org'" <pgsql-hackers@postgresql.org>
Subject: pg_dump update
Date: Mon, 27 Dec 1999 15:12:02 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain
I have posted another patch for pg_dump to the patches list. There was a
potential problem with the pqexpbuffer which I have removed as far as
possible (the bug, not pqexpbuffer).
MikeA
From bouncefilter Mon Dec 27 08:09:35 1999
Received: from vulcan.ifnet.com.br (vulcan.ifnet.com.br [200.203.210.18])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA83895
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 08:09:05 -0500 (EST)
(envelope-from mateus@ifnet.com.br)
Received: from ifnet.com.br (IDENT:root@async-17.56k-ppp-gw-01.ifnet.com.br
[200.203.210.144])
by vulcan.ifnet.com.br (8.9.3/8.9.3) with ESMTP id LAA22321;
Mon, 27 Dec 1999 11:13:03 -0200
Received: (from mateus@localhost) by ifnet.com.br (8.9.3/8.9.3) id LAA00786;
Mon, 27 Dec 1999 11:15:44 -0200
From: Mateus Cordeiro Inssa <mateus@ifnet.com.br>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14439.26239.748676.823316@Blaublau.home.br>
Date: Mon, 27 Dec 1999 11:15:43 -0200 (EDT)
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mateus Cordeiro Inssa <mateus@ifnet.com.br>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Error "vacuum pg_proc"
In-Reply-To: <12358.946050770@sss.pgh.pa.us>
References: <14435.24355.627616.355738@Blaublau.home.br>
<12358.946050770@sss.pgh.pa.us>
X-Mailer: VM 6.71 under 21.1 (patch 4) "Arches" XEmacs Lucid
X-Face: "|YUb*(O#,z=WN#Ez3~WeW{ZQ2w<Y/?6t>t-lKh/"d:#gq~!Bl&q+_,z+|KAB1C'oqyF_;
P O=40^mm!nklMDs:aXGjL4C1EcM\yMJsA8:F[9
Tom Lane writes:
Mateus Cordeiro Inssa <mateus@ifnet.com.br> writes:
I got this error vacuuming pg_proc:
ERROR: _bt_endpoint: leftmost page (20) has not leftmost flagHmm, I wonder if this could be yet another manifestation of the problems
that btree indexes have with oversized key values. Do you have any
procedures with long definitions? "Long" in this context means over
about 4K. If you're not sure, try
select proname from pg_proc where length(prosrc) > 4000;
Yes, I have some functions from 3k to 5k.
If you do, try breaking them up into smaller procedures. You might have
to dump and rebuild the database to get rid of the corruption in
pg_proc's index, though.
Ok.
The prosrc index is actually completely unnecessary, so we've removed
it for 7.0. Work is in progress to fix the tuple-size problem as well,
but that will probably take longer.
Oh, I would ask why there was this index. I had problems with it
since version 6.4.
I'd like to suggest the creation of a new command: ALTER FUNCTION. I
use pltcl to program in the server, so, no need for checking the
function code. The problems with pg_proc always occurred to me when
changing functions: DROP/CREATE. This command would do just an update on
prosrc field (that doesn't have index anymore).
[]'s
Mateus Cordeiro Inssa
---------------------
Linux User: 76186 Kernel: 2.3.34
ICQ (Licq): 15243895
---------------------
mateus@ifnet.com.br
mateus@cwb.fnn.net
Mon Dec 27 11:15:41 EDT 1999
.
From bouncefilter Mon Dec 27 08:41:35 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA90701
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 08:40:59 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id OAA07780;
Mon, 27 Dec 1999 14:26:31 +0100
Date: Mon, 27 Dec 1999 14:26:31 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Don Baccus <dhogaza@pacifier.com>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] memory dilemma
In-Reply-To: <3.0.1.32.19991209031733.00ecfd20@mail.pacifier.com>
Message-ID: <Pine.LNX.3.96.991227140248.7354A-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 9 Dec 1999, Don Baccus wrote:
At 01:40 PM 12/27/99 +0100, Karel Zak - Zakkr wrote:
not use cache - hmm.. but I like fast routines (my current
to_char() implementation is faster (20-50%) than current
date_part()).While fast routines are nice indeed, isn't it true in practice
that to_char() times will be swamped by the amount of time to
parse, plan, and execute a query in most cases?
Sorry, but it is not good argument. If any routine (in the query path)
spend time is not interesting write (other) fast routine? No, we must
try rewrite this slowly part to faster version.
*Very* simpl test over 10000 rows:
$ time psql test -c "select date_part('second', d)
from dtest;" -o /dev/null
real 0m0.504s
user 0m0.100s
sys 0m0.000s
$ time psql test -c "select to_char(d, 'SI') from
dtest;" -o /dev/null
real 0m0.288s
user 0m0.100s
sys 0m0.000s
Trivial cases like "select to_char('now'::datetime,...)" can't in
general be cached anyway, since 'now' is always changing...
No, you not understend me. I want cached 'format-picture':
run 10000 x
select to_char(datetime, 'HH24:MI:SI FMMonth YYYY');
yes, 'datetime' can always changing, but 'HH24:MI:SI FMMonth YYYY' not,
and this format-picture must be always parsed. It is terrible always call
to_char() parser, if I can use cache for it.
Your caching code needs to guarantee that it can't leak memory
in any circumstance. In environments where database servers
run 24/7 that's far more important than minor increases in
speed.
Yes, I agree - robus SQL is more importent, but always say "speed is not
interesting, we can robus only" is way to robus-snail-SQL.
I want nice-robus-fast-SQL :-)
Karel
From bouncefilter Mon Dec 27 08:29:35 1999
Received: from redbox.venux.net (redbox.venux.net [216.47.238.10])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA86153
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 08:29:17 -0500 (EST)
(envelope-from matthew@venux.net)
Received: from thunder (net4842.hcv.com [216.93.48.42])
by redbox.venux.net (Postfix) with SMTP id 9B1DC2E20B
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 08:23:00 -0500 (EST)
Message-Id: <4.1.19991227082404.009fb6a0@mail.venux.net>
X-Sender: mhagerty@mail.venux.net
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Mon, 27 Dec 1999 08:29:05 -0500
To: pgsql-hackers@postgreSQL.org
From: Matthew Hagerty <matthew@venux.net>
Subject: Logfile rotation
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Greetings,
Does pg open its logfile every time it writes or does it open the file and
hold it open as long as the postmaster is running? Do I have to stop the
postmaster to rotate the logfile out or can I just move or delete it at any
time and pg will create a new logfile the next time it writes?
Thank you,
Matthew
From bouncefilter Mon Dec 27 09:37:36 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA01674
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 09:36:51 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <ZW4G6V3C>; Mon, 27 Dec 1999 16:34:05 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C38B@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'Don Baccus '" <dhogaza@pacifier.com>, "'Karel Zak - Zakkr '"
<zakkr@zf.jcu.cz>, "'pgsql-hackers '" <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] memory dilemma
Date: Mon, 27 Dec 1999 16:23:43 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="windows-1252"
not use cache - hmm.. but I like fast routines (my current
to_char() implementation is faster (20-50%) than current
date_part()).While fast routines are nice indeed, isn't it true in practice
that to_char() times will be swamped by the amount of time to
parse, plan, and execute a query in most cases?
Although not in PG (yet...) we draw reports that contain sometimes hundreds
of thousands, sometimes (often) millions of rows, and each row has at least
two to_char calls. Any speed improvement is significant.
Assuming an improvement of 0.22s per 10000 rows, over 5 million rows, that's
nearly four minutes. That's quite a lot on a report that normally takes
about ten or fifteen minutes to run. Of course, the servers we run on are
probably a lot more powerful that the one that Karl ran his test on, so the
improvement is likely to be less, but still significant.
MikeA
From bouncefilter Mon Dec 27 10:37:39 1999
Received: from mail.ngi.de ([195.243.0.227])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA13096
for <pgsql-hackers@postgresql.org>;
Mon, 27 Dec 1999 10:36:50 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: from p3E9D3E7A.dip0.t-ipconnect.de
(root@p3E9D3E7A.dip0.t-ipconnect.de [62.157.62.122])
by mail.ngi.de (8.9.3/8.9.3) with ESMTP id QAA02184
for <pgsql-hackers@postgresql.org>;
Mon, 27 Dec 1999 16:38:30 +0100 (CET)
(envelope-from michael@fam-meskes.de)
Received: (from michael@localhost)
by tanja.fam-meskes.de (8.9.3/8.9.0/Debian/GNU) id PAA01077
for pgsql-hackers@postgresql.org; Mon, 27 Dec 1999 15:52:24 +0100
Date: Mon, 27 Dec 1999 15:52:24 +0100
From: Michael Meskes <meskes@postgreSQL.org>
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] ecpg enhance patch
Message-ID: <19991227155224.A1068@fam-meskes.de>
Mail-Followup-To: pgsql-hackers@postgresql.org
References: <19991227164919G.t-ishii@sra.co.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0i
In-Reply-To: <19991227164919G.t-ishii@sra.co.jp>;
from t-ishii@sra.co.jp on Mon, Dec 27, 1999 at 04:49:19PM +0900
On Mon, Dec 27, 1999 at 04:49:19PM +0900, Tatsuo Ishii wrote:
Here is a patch that would enhance the efficiency in that skip strings
which have been already checked. The patch was made by Kazuko
Nakagawa. Michael, can you comment on this?
The problem is that the current system allows insertions of placeholders
which are later replaced by values. After applying this patch this will no
longer work. But with some changes we might get almost the same result.
After the p = next_insert(...) p-newcopy characters are already clean. This
should be used. I just noticed that there is a ugly hack in there anyway,
namely the string length calculation via substraction of two pointers. I
wonder if this works with multibyte strings.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Mon Dec 27 10:37:36 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA13091
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 10:36:45 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA26061;
Mon, 27 Dec 1999 10:35:37 -0500 (EST)
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] memory dilemma
In-reply-to: <Pine.LNX.3.96.991227124802.6398D-100000@ara.zf.jcu.cz>
References: <Pine.LNX.3.96.991227124802.6398D-100000@ara.zf.jcu.cz>
Comments: In-reply-to Karel Zak - Zakkr <zakkr@zf.jcu.cz>
message dated "Mon, 27 Dec 1999 13:40:49 +0100"
Date: Mon, 27 Dec 1999 10:35:37 -0500
Message-ID: <26058.946308937@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Karel Zak - Zakkr <zakkr@zf.jcu.cz> writes:
not use cache - hmm.. but I like fast routines (my current
to_char() implementation is faster (20-50%) than current
date_part()).
I like that one. Anything else is a potential memory leak, and I really
find it hard to believe that the speed of to_char() itself is going to
be a critical factor in a real-world application. You have client-to-
backend communication, parsing, planning, I/O, etc that are all going
to swamp out the cost of a single function.
regards, tom lane
From bouncefilter Mon Dec 27 10:43:37 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA13785;
Mon, 27 Dec 1999 10:42:57 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA15520;
Mon, 27 Dec 1999 10:42:30 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912271542.KAA15520@candle.pha.pa.us>
Subject: Re: [HACKERS] Unlimited query length - the final chapter (aka
pg_dump)
In-Reply-To: <1BF7C7482189D211B03F00805F8527F748C386@S-NATH-EXCH2> from
"Ansley, Michael" at "Dec 26, 1999 10:29:19 pm"
To: "Ansley, Michael" <Michael.Ansley@intec.co.za>
Date: Mon, 27 Dec 1999 10:42:30 -0500 (EST)
CC: "'pgsql-hackers@postgreSQL.org '" <pgsql-hackers@postgreSQL.org>,
"'pgsql-patches@postgresql.org '" <pgsql-patches@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Applied.
Hi, all
I finally got around to schlepping through pg_dump, to finish what I started
about three months (or more) ago. Attached is a gzipped diff file to apply
in the bin/pg_dump directory. This should remove all string length
dependencies, except one, which I'm working on. It has been through some
rudimentary unit testing, but that's about it, so if any of you would give
it a more strenuous run-through, I'd be grateful for the feedback.Cheers...
MikeA
[Attachment, skipping...]
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 27 10:45:39 1999
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA14165;
Mon, 27 Dec 1999 10:45:14 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
KAA15787;
Mon, 27 Dec 1999 10:44:59 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <199912271544.KAA15787@candle.pha.pa.us>
Subject: Re: [PATCHES] Unlimited query length - The final chapter (part II)
In-Reply-To: <1BF7C7482189D211B03F00805F8527F748C388@S-NATH-EXCH2> from
"Ansley, Michael" at "Dec 26, 1999 11:04:34 pm"
To: "Ansley, Michael" <Michael.Ansley@intec.co.za>
Date: Mon, 27 Dec 1999 10:44:59 -0500 (EST)
CC: "'pgsql-hackers@postgreSQL.org '" <pgsql-hackers@postgresql.org>,
"'pgsql-patches@postgreSQL.org '" <pgsql-patches@postgresql.org>
X-Mailer: ELM [version 2.4ME+ PL65 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Applied.
Hi, all,
This is the patch for the final bit. Sorry that it's separate.
Cheers...
MikeA
[Attachment, skipping...]
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Mon Dec 27 10:52:36 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA15322
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 10:51:54 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA26152;
Mon, 27 Dec 1999 10:51:05 -0500 (EST)
To: "Ansley, Michael" <Michael.Ansley@intec.co.za>
cc: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Explain plan output
In-reply-to: <1BF7C7482189D211B03F00805F8527F748C387@S-NATH-EXCH2>
References: <1BF7C7482189D211B03F00805F8527F748C387@S-NATH-EXCH2>
Comments: In-reply-to "Ansley, Michael" <Michael.Ansley@intec.co.za>
message dated "Sun, 26 Dec 1999 22:43:48 +0200"
Date: Mon, 27 Dec 1999 10:51:05 -0500
Message-ID: <26149.946309865@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Ansley, Michael" <Michael.Ansley@intec.co.za> writes:
Anyway, the point of this mail is to say that I have altered the explain
code slightly, so that it dumps the results of the explain into a
table.
What do you mean by that, exactly? You can't expect to fit long explain
outputs into a single table row, so I suppose it's one row per line.
How are the rows identified? What's the expected declaration of the
table?
I find that a lot more convenient
It strikes me as a lot less convenient for the sorts of things I use
explain for. But I wouldn't object if it were an optional feature:
EXPLAIN [ VERBOSE ] [ INTO <table> ] <query>
which would also solve your problem of figuring out which table to write
to.
e) The plan id is output using elog. How would I ensure that this gets back
to any arbitrary client. If I understand right, elogs don't go to ODBC, and
possibly other, clients.
What's a "plan id", and is it actually necessary?
regards, tom lane
From bouncefilter Mon Dec 27 11:11:37 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA21919
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 11:11:03 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA26289;
Mon, 27 Dec 1999 11:09:26 -0500 (EST)
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
cc: Don Baccus <dhogaza@pacifier.com>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] memory dilemma
In-reply-to: <Pine.LNX.3.96.991227140248.7354A-100000@ara.zf.jcu.cz>
References: <Pine.LNX.3.96.991227140248.7354A-100000@ara.zf.jcu.cz>
Comments: In-reply-to Karel Zak - Zakkr <zakkr@zf.jcu.cz>
message dated "Mon, 27 Dec 1999 14:26:31 +0100"
Date: Mon, 27 Dec 1999 11:09:26 -0500
Message-ID: <26286.946310966@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Karel Zak - Zakkr <zakkr@zf.jcu.cz> writes:
*Very* simpl test over 10000 rows:
$ time psql test -c "select date_part('second', d)
from dtest;" -o /dev/null
real 0m0.504s
user 0m0.100s
sys 0m0.000s
$ time psql test -c "select to_char(d, 'SI') from
dtest;" -o /dev/null
real 0m0.288s
user 0m0.100s
sys 0m0.000s
That isn't necessarily an impressive demonstration --- what is the data
type of your "d" column? Four of the six variants of date_part() are
implemented as SQL functions, which naturally adds a lot of overhead...
regards, tom lane
From bouncefilter Mon Dec 27 11:15:38 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA22398
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 11:14:49 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA26320;
Mon, 27 Dec 1999 11:14:09 -0500 (EST)
To: Matthew Hagerty <matthew@venux.net>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Logfile rotation
In-reply-to: <4.1.19991227082404.009fb6a0@mail.venux.net>
References: <4.1.19991227082404.009fb6a0@mail.venux.net>
Comments: In-reply-to Matthew Hagerty <matthew@venux.net>
message dated "Mon, 27 Dec 1999 08:29:05 -0500"
Date: Mon, 27 Dec 1999 11:14:09 -0500
Message-ID: <26316.946311249@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Matthew Hagerty <matthew@venux.net> writes:
Does pg open its logfile every time it writes or does it open the file and
hold it open as long as the postmaster is running?
If you do the usual
postmaster >logfile 2>&1
then the logfile is actually opened by the shell before the postmaster
ever starts; the postmaster has no way to close and re-open it. So,
no, you can't rotate the logfile transparently in that scenario.
I believe there's a compile-time option to use syslog instead, which
probably works better for this (assuming you have syslog).
regards, tom lane
From bouncefilter Mon Dec 27 12:37:39 1999
Received: from s-nath-exch1.nath-gpbry.co.za (mail.newaftech.com
[209.212.104.161]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA45031
for <pgsql-hackers@postgreSQL.org>;
Mon, 27 Dec 1999 12:36:50 -0500 (EST)
(envelope-from Michael.Ansley@intec.co.za)
Received: by S-NATH-EXCH1 with Internet Mail Service (5.5.2448.0)
id <ZW4G6V3R>; Mon, 27 Dec 1999 19:34:06 +0200
Message-ID: <1BF7C7482189D211B03F00805F8527F748C38E@S-NATH-EXCH2>
From: "Ansley, Michael" <Michael.Ansley@intec.co.za>
To: "'Tom Lane '" <tgl@sss.pgh.pa.us>
Cc: "''pgsql-hackers@postgreSQL.org' '" <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] Explain plan output
Date: Mon, 27 Dec 1999 19:20:14 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"
Anyway, the point of this mail is to say that I have altered the
explain
code slightly, so that it dumps the results of the explain into a
table.What do you mean by that, exactly? You can't expect to fit long explain
outputs into a single table row, so I suppose it's one row per line.
How are the rows identified? What's the expected declaration of the
table?
CREATE SEQUENCE explain_plan_seq;
CREATE TABLE explain_plan (
id INT4,
explain_line CHARACTER VARYING(255),
level INT4,
plan_order INT4
);
This is pretty close to the way that Oracle implements it. That's where I
got the idea from. Just had to add a little SPI, and voila...
I find that a lot more convenient
It strikes me as a lot less convenient for the sorts of things I use
explain for.
When ODBC is the only way in, then it's pretty inconvenient ;-) If you have
access to psql, then it's fine, but for certain (perhaps most) other
interfaces, it's not so cool. And when there is separation of duties (i.e.:
the dba is not the same person as the developer), and the developers are
using traditional win32 tools, the table is a lot more accessible.
Generally, in the environments that I've worked in, the developers only use
things like psql if they happen to be a db designer as well. Frequently,
once the database has been designed and created, the developers only have
ODBC access. Any change requests go through the dba.
But I wouldn't object if it were an optional feature:
EXPLAIN [ VERBOSE ] [ INTO <table> ] <query>
which would also solve your problem of figuring out which table to write
to.
Yes I suppose that's probably the correct way to do it. I was hoping not to
have to modify the language. However, what to do if the columns are
incorrect, or the table doesn't exist? Just generate an elog? Also, what
about the sequence. I suppose that I can just elog ANY error generated.
e) The plan id is output using elog. How would I ensure that this
gets back
to any arbitrary client. If I understand right, elogs don't go to
ODBC, and
possibly other, clients.
What's a "plan id", and is it actually necessary?
The plan id is the unique number assigned to the plan, so that you can
identify it. There will potentially be others in the table, so you need to
be able to identify the one that you have just generated. So, yes, it is
necessary.
This is what an output looks like (you might need to widen your window if it
wraps):
template1=# select * from explain_plan where id = 10;
id | explain_line
| level | plan_order
----+-----------------------------------------------------------------------
----+-------+------------
10 | Hash Join (cost=327.99 rows=228 width=36)
| 1 | 1
10 | -> Seq Scan on test1 (cost=162.17 rows=4096 width=16)
| 2 | 2
10 | -> Hash (cost=15.38 rows=228 width=20)
| 2 | 3
10 | -> Index Scan using pk1_test2 on test2 (cost=15.38 rows=228
width=20) | 3 | 4
(4 rows)
I will look at changing the EXPLAIN syntax...
MikeA
From bouncefilter Mon Dec 27 13:27:38 1999
Received: from gtv.ca (h139-142-238-17.cg.fiberone.net [139.142.238.17])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA53170
for <pgsql-hackers@hub.org>; Mon, 27 Dec 1999 13:26:40 -0500 (EST)
(envelope-from aaron@genisys.ca)
Received: from stilborne (24.67.90.252.ab.wave.home.com [24.67.90.252])
by gtv.ca (8.9.3/8.8.7) with SMTP id MAA01200
for <pgsql-hackers@hub.org>; Mon, 27 Dec 1999 12:36:39 -0700
From: "Aaron J. Seigo" <aaron@gtv.ca>
To: pgsql-hackers@hub.org
Subject: Re: [HACKERS] database replication
Date: Mon, 27 Dec 1999 11:23:19 -0700
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <199912271135.TAA10184@netrinsics.com>
In-Reply-To: <199912271135.TAA10184@netrinsics.com>
MIME-Version: 1.0
Message-Id: <99122711245600.07929@stilborne>
Content-Transfer-Encoding: 8bit
hi..
Before anyone starts implementing any database replication, I'd strongly
suggest doing some research, first:
good idea, but perhaps sybase isn't the best study case.. here's some extremely
detailed online coverage of Oracle 8i's replication, from the oracle online
library:
http://bach.towson.edu/oracledocs/DOC/server803/A54651_01/toc.htm
--
Aaron J. Seigo
Sys Admin
From bouncefilter Mon Dec 27 21:14:09 1999
Received: from localhost (scrappy@localhost)
by hub.org (8.9.3/8.9.3) with ESMTP id VAA51235;
Mon, 27 Dec 1999 21:14:09 -0500 (EST) (envelope-from scrappy@hub.org)
Date: Mon, 27 Dec 1999 21:14:08 -0500 (EST)
From: "Marc G. Fournier" <scrappy@hub.org>
To: pgsql-hackers@postgresql.org
cc: berend@pobox.com
Subject: RE: What database i can use? (fwd)
Message-ID: <Pine.BSF.4.21.9912272113430.50426-100000@hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
For those working on INNER/OUTER Joins...any comments? :)
Marc G. Fournier scrappy@hub.org
Systems Administrator @ hub.org
scrappy@{postgresql|isc}.org ICQ#7615664
---------- Forwarded message ----------
Date: Mon, 27 Dec 1999 10:36:52 +0100
From: Berend de Boer <berend@pobox.com>
To: 'Marc G. Fournier' <scrappy@hub.org>
Cc: freebsd-database@FreeBSD.ORG
Subject: RE: What database i can use?
JOIN statement? I take it that this is different then:
SELECT a.field1, b.field2 from table1 a, table2 b where a.key = b.key
ANSI92 supports the far better readable JOIN statement:
select a.field1, b.field2
from table1 a
join table2 b on
a.key = b.key
Left outer joins are now easy to:
select a.field1, b.field2
from table1 a
left outer join table2 b on
a.key = b.key
It generally parses and optimizes faster too. For MS SQL Server I've seen
improvements of up to 75% percent: execution time was the same, but the plan
was calculated much faster.
Groetjes,
Berend. (-:
From bouncefilter Mon Dec 27 21:35:44 1999
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA56517;
Mon, 27 Dec 1999 21:35:35 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id LAA14995;
Tue, 28 Dec 1999 11:35:33 +0900 (JST)
Received: from localhost (IDENT:t-ishii@localhost [127.0.0.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id LAA31781;
Tue, 28 Dec 1999 11:35:33 +0900
To: meskes@postgreSQL.org
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] ecpg enhance patch
In-Reply-To: Your message of "Mon, 27 Dec 1999 15:52:24 +0100"
<19991227155224.A1068@fam-meskes.de>
References: <19991227155224.A1068@fam-meskes.de>
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <19991228113532N.t-ishii@sra.co.jp>
Date: Tue, 28 Dec 1999 11:35:32 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 20
On Mon, Dec 27, 1999 at 04:49:19PM +0900, Tatsuo Ishii wrote:
Here is a patch that would enhance the efficiency in that skip strings
which have been already checked. The patch was made by Kazuko
Nakagawa. Michael, can you comment on this?The problem is that the current system allows insertions of placeholders
which are later replaced by values. After applying this patch this will no
longer work. But with some changes we might get almost the same result.After the p = next_insert(...) p-newcopy characters are already clean. This
should be used. I just noticed that there is a ugly hack in there anyway,
namely the string length calculation via substraction of two pointers. I
Thank you for your comment. I'll foward it to the author of the patch.
wonder if this works with multibyte strings.
Should be no problem.
--
Tatsuo Ishii
From bouncefilter Tue Dec 28 01:29:46 1999
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA06389
for <pgsql-hackers@postgreSQL.org>;
Tue, 28 Dec 1999 01:28:58 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id GAA16058;
Tue, 28 Dec 1999 06:37:39 GMT
Sender: lockhart@hub.org
Message-ID: <38685AB3.5B4E39DC@alumni.caltech.edu>
Date: Tue, 28 Dec 1999 06:37:39 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "Marc G. Fournier" <scrappy@hub.org>
CC: pgsql-hackers@postgreSQL.org, berend@pobox.com
Subject: Re: [HACKERS] RE: What database i can use? (fwd)
References: <Pine.BSF.4.21.9912272113430.50426-100000@hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
For those working on INNER/OUTER Joins...any comments? :)
JOIN statement? I take it that this is different then:
SELECT a.field1, b.field2 from table1 a, table2 b where a.key = b.keyANSI92 supports the far better readable JOIN statement:
select a.field1, b.field2
from table1 a
join table2 b on
a.key = b.key
Don't know why one would consider this better or more readable;
depends on your past lives I guess...
SQL92 outer joins use this syntax, but other DBs (claiming SQL92
compliance, btw; they usually only meet the lowest defined level of
compliance) use a different syntax with no ill effects. We are
implementing the SQL92 syntax.
It generally parses and optimizes faster too. For MS SQL Server I've seen
improvements of up to 75% percent: execution time was the same, but the plan
was calculated much faster.
I would guess that any speedup would be an indication of a bad
optimizer, which apparently skips work when given the "join syntax".
If the statements are equivalent, then one would hope that the
parser/optimizer would consider the same set of plans to satisfy it.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Tue Dec 28 02:25:47 1999
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA16491
for <pgsql-hackers@postgreSQL.org>;
Tue, 28 Dec 1999 02:24:54 -0500 (EST) (envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id QAA04440 for <pgsql-hackers@postgreSQL.org>;
Tue, 28 Dec 1999 16:24:51 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "pgsql-hackers" <pgsql-hackers@postgreSQL.org>
Subject: can't link libpq.so(inet_aton() not found)
Date: Tue, 28 Dec 1999 16:30:06 +0900
Message-ID: <000a01bf5105$5cfaf460$2801007e@cadzone.tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Importance: Normal
Hi all,
It seems fe-connect.c was changed to call inet_aton() recently.
I can't make executables linking libpq.so because my environ-
ment(i386-pc-solaris2.5.1, compiled by gcc 2.7.2.3) doesn't have
inet_aton().
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Tue Dec 28 05:46:49 1999
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA59451
for <pgsql-hackers@postgreSQL.org>;
Tue, 28 Dec 1999 05:46:29 -0500 (EST) (envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id LAA13290;
Tue, 28 Dec 1999 11:28:22 +0100
Date: Tue, 28 Dec 1999 11:28:22 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Tom Lane <tgl@sss.pgh.pa.us>
cc: Don Baccus <dhogaza@pacifier.com>,
pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] memory dilemma
In-Reply-To: <26286.946310966@sss.pgh.pa.us>
Message-ID: <Pine.LNX.3.96.991228102949.12706B-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Mon, 27 Dec 1999, Tom Lane wrote:
That isn't necessarily an impressive demonstration --- what is the data
type of your "d" column? Four of the six variants of date_part() are
implemented as SQL functions, which naturally adds a lot of overhead...
Sorry. I better describe problem now.
The test-table 'tab':
CRAETE TABLE tab (d datetime);
The 'tab' contain _random_ datetime values (generate via my program
rand_datetime - it is in PG's contrib/dateformat/test). In this table
is 10000 rows.
Test:
time psql test -c "select d from tab;" -o /dev/null
real 0m0.530s
user 0m0.060s
sys 0m0.020s
time psql test -c "select date_part('second', d) from tab;" -o /dev/null
real 0m0.494s
user 0m0.060s
sys 0m0.030s
time psql test -c "select to_char(d, 'SS') from tab;" -o /dev/null
real 0m0.368s
user 0m0.080s
sys 0m0.000s
(to_char() is a little slowly now (than in previous test), because I rewrite
any parts)
This comparison is *not* show cache effect. This test show (probably) better
searching and datetime part extraction in to_char().
Cache has effect for long and complicated 'format-picture' in to_char().
With cache (Cache has implement via malloc/free.) :
~~~~~~~~~~
time psql test -c "select to_char(d, 'HH12:MI:SS YYYY FMMonth Day') from
tab;" -o /dev/null
real 0m0.545s
user 0m0.060s
sys 0m0.010s
Without cache:
~~~~~~~~~~~~~
time psql test -c "select to_char(d, 'HH12:MI:SS YYYY FMMonth Day') from
tab;" -o /dev/null
real 0m0.638s
user 0m0.060s
sys 0m0.010s
Hmm.. my internal to_char() parser is very fast (0.100s for 10000
calls only) :-))
Thank for all suggestion. I finaly use in to_char() cache via static buffer,
and if format-picture will bigger than this buffer, to_char will work as
without cache. This solution eliminate memory leak - this solution is used
in current datetime routines. It is good compromise.
I plan in future make small changes in datetime routines. The to_char is
probably fastly, because it use better search algorithm (has a simple index
for scanned array). The date_part() will fast too :-)
-
A last (PG's novice) question - how problem appear if PG is compilate with
(gcc) -O3 optimalization? Or why is not used in PG 'inline' function
declaration?
Karel
From bouncefilter Tue Dec 28 08:45:51 1999
Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de
[53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id IAA95671
for <pgsql-hackers@postgreSQL.org>;
Tue, 28 Dec 1999 08:45:03 -0500 (EST) (envelope-from wieck@debis.com)
Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-hackers@postgreSQL.org
id m122wmv-0003kGC; Tue, 28 Dec 99 14:35 MET
Message-Id: <m122wmv-0003kGC@orion.SAPserv.Hamburg.dsh.de>
From: wieck@debis.com (Jan Wieck)
Subject: LZTEXT is removed
To: pgsql-hackers@postgreSQL.org (PostgreSQL HACKERS)
Date: Tue, 28 Dec 1999 14:35:45 +0100 (MET)
Reply-To: wieck@debis.com (Jan Wieck)
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text
As discussed, I've removed the LZTEXT datatype again.
No additional news on TOAST yet.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
From bouncefilter Tue Dec 28 10:20:52 1999
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA13146
for <pgsql-hackers@postgreSQL.org>;
Tue, 28 Dec 1999 10:19:55 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA28372;
Tue, 28 Dec 1999 10:19:18 -0500 (EST)
To: "Hiroshi Inoue" <Inoue@tpf.co.jp>
cc: "pgsql-hackers" <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] can't link libpq.so(inet_aton() not found)
In-reply-to: <000a01bf5105$5cfaf460$2801007e@cadzone.tpf.co.jp>
References: <000a01bf5105$5cfaf460$2801007e@cadzone.tpf.co.jp>
Comments: In-reply-to "Hiroshi Inoue" <Inoue@tpf.co.jp>
message dated "Tue, 28 Dec 1999 16:30:06 +0900"
Date: Tue, 28 Dec 1999 10:19:18 -0500
Message-ID: <28369.946394358@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
It seems fe-connect.c was changed to call inet_aton() recently.
I can't make executables linking libpq.so because my environ-
ment(i386-pc-solaris2.5.1, compiled by gcc 2.7.2.3) doesn't have
inet_aton().
Hmm. We could make libpq dependent on the substitute inet_aton
that's in backend/ports. But since this is only needed for a very
optional feature (and one I don't much care for ;-)), my inclination
is to just #ifdef it out, and not support pghostaddr on machines
without inet_aton.
regards, tom lane
I have just applied a user patch to fix this reported problem.
Vadim Mikheev <vadim@krs.ru> writes:
Yes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):Yes. Looks like the low-order bits of a CIDR address are garbage,
but network_cmp() compares them as though all bits are significant.
So, indeed, it may think two different instances of '1.2.3/24'
are not equal.The regular inet comparison functions at least *try* to mask out
garbage bits, but I think they get it wrong too --- they should be
taking the smaller of ip_bits(a1) and ip_bits(a2) as the number of
bits to compare. They don't. Thus, for example,regression=> select '1.2.5/16'::cidr < '1.2.3/24'::cidr;
?column?
--------
f
(1 row)which looks wrong to me.
In short, it's a bug in the inet data types, not a generic problem
with unique indexes.regards, tom lane
************
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Mar 7 18:08:23 2000
Received: from thelab.hub.org (nat195.52.mpoweredpc.net [142.177.195.52])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA11748;
Tue, 7 Mar 2000 18:07:54 -0500 (EST) (envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id TAA18413;
Tue, 7 Mar 2000 19:06:30 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Tue, 7 Mar 2000 19:06:24 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Michael Meskes <meskes@postgreSQL.org>,
PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] library policy question
In-Reply-To: <38C53509.EAE64BDE@alumni.caltech.edu>
Message-ID: <Pine.BSF.4.21.0003071906140.591-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 7 Mar 2000, Thomas Lockhart wrote:
7.0 would be a good time to do that if we were gonna do it. Comments?
Yup.
Ditto ...
Bruce Momjian <pgman@candle.pha.pa.us> writes:
I have just applied a user patch to fix this reported problem.
If you had read the followup, you would have seen that I have doubts
about this patch, and in fact Ryan acknowledges that it probably doesn't
do the right thing for INET. I think there is more work to do here.
regards, tom lane
Bruce Momjian <pgman@candle.pha.pa.us> writes:
I have just applied a user patch to fix this reported problem.
If you had read the followup, you would have seen that I have doubts
about this patch, and in fact Ryan acknowledges that it probably doesn't
do the right thing for INET. I think there is more work to do here.
Reversed out.
"I never met a patch I didn't like." :-)
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Mar 7 20:50:25 2000
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA59136
for <pgsql-hackers@postgreSQL.org>; Tue, 7 Mar 2000 20:49:36 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA07482;
Tue, 7 Mar 2000 20:48:51 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003080148.UAA07482@candle.pha.pa.us>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <23144.952476917@sss.pgh.pa.us> from Tom Lane at "Mar 7,
2000 07:55:17 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 7 Mar 2000 20:48:51 -0500 (EST)
CC: Peter Eisentraut <peter_e@gmx.net>, Tatsuo Ishii <t-ishii@sra.co.jp>,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
I tried it and the ABORT worked, so I have no idea now what is happening
here.Is the table file still there after the ABORT? If not, it won't work
for long...
Oh, well.
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Mar 7 20:51:25 2000
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA59566
for <pgsql-hackers@postgreSQL.org>; Tue, 7 Mar 2000 20:51:13 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA07499;
Tue, 7 Mar 2000 20:50:07 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003080150.UAA07499@candle.pha.pa.us>
Subject: Re: [HACKERS] xlog.c.patch for cygwin port.
In-Reply-To: <23176.952477276@sss.pgh.pa.us> from Tom Lane at "Mar 7,
2000 08:01:16 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 7 Mar 2000 20:50:07 -0500 (EST)
CC: yutaka tanida <yutaka@marin.or.jp>,
Alexei Zakharov <A.S.Zakharov@inp.nsk.su>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
This looks interesting. We could remove some of our ifwin cruft.
I have been thinking for quite some time that most of the CYGWIN32
ifdefs represent very poor programming. Instead of zillions of#ifndef __CYGWIN32__
fd = open(filename, O_RDONLY, 0666);
#else
fd = open(filename, O_RDONLY | O_BINARY, 0666);
#endifwe should have in one include file something like
Do we ever assign a function pointer for open() anywhere. If so, the
define will not work without some kind of wrapper, right?
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Mar 7 20:54:25 2000
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA60182
for <pgsql-hackers@postgreSQL.org>; Tue, 7 Mar 2000 20:53:24 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
UAA08198;
Tue, 7 Mar 2000 20:51:34 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003080151.UAA08198@candle.pha.pa.us>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <23210.952478033@sss.pgh.pa.us> from Tom Lane at "Mar 7,
2000 08:13:53 pm"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 7 Mar 2000 20:51:34 -0500 (EST)
CC: Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
BTW, we are not *that* far from being able to roll back a DROP TABLE.
The only thing that's really needed is for everyone to take a deep
breath and let go of the notion that table files ought to be named
after the tables. If we named table files after the OIDs of their
tables, then rollback-able DROP or RENAME TABLE would be pretty
straightforward. If you don't recall why this is, consult the
pghackers archives...The oid will be appended to the base file name.
If we do it that way, then RENAME TABLE will be kinda complicated...
not impossible, but is it worth it?
100% worth it. Ingres doesn't use table names in the file name, and
administration is a mess.
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Tue Mar 7 21:49:25 2000
Received: from sprucegrove.com ([204.171.100.41])
by hub.org (8.9.3/8.9.3) with ESMTP id VAA75810
for <pgsql-hackers@postgresql.org>; Tue, 7 Mar 2000 21:48:57 -0500 (EST)
(envelope-from jay@sprucegrove.com)
Received: (from jay@localhost) by sprucegrove.com (8.9.3/8.8.8) id VAA29840
for pgsql-hackers@postgresql.org; Tue, 7 Mar 2000 21:48:28 -0500 (EST)
From: "D. Jay Newman" <jay@sprucegrove.com>
Message-Id: <200003080248.VAA29840@sprucegrove.com>
Subject: Re: [HACKERS] xlog.c.patch for cygwin port.
In-Reply-To: <200003080150.UAA07499@candle.pha.pa.us> from Bruce Momjian at
"Mar 7, 2000 08:50:07 pm"
To: pgsql-hackers@postgresql.org
Date: Tue, 7 Mar 2000 21:48:28 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian <pgman@candle.pha.pa.us> writes:
This looks interesting. We could remove some of our ifwin cruft.
I have been thinking for quite some time that most of the CYGWIN32
ifdefs represent very poor programming. Instead of zillions of#ifndef __CYGWIN32__
fd = open(filename, O_RDONLY, 0666);
#else
fd = open(filename, O_RDONLY | O_BINARY, 0666);
#endifwe should have in one include file something like
Do we ever assign a function pointer for open() anywhere. If so, the
define will not work without some kind of wrapper, right?
Since the only difference seems to be "O_RDONLY" vs "O_RDONLY | O_BINARY",
why not do the #define on that?
At least in this case it works.
--
D. Jay Newman ! For the pleasure and the profit it derives
jay@sprucegrove.com ! I arrange things, like furniture, and
http://www.sprucegrove.com/~jay/ ! daffodils, and ...lives. -- Hello Dolly
From bouncefilter Tue Mar 7 22:18:26 2000
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA82582
for <pgsql-hackers@postgreSQL.org>; Tue, 7 Mar 2000 22:18:03 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from lorc.wgcr.org ([207.144.235.83])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with SMTP id WAA15922;
Tue, 7 Mar 2000 22:14:41 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: Little to None
To: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Date: Tue, 7 Mar 2000 21:57:36 -0500
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
Cc: Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
References: <200003080017.TAA04546@candle.pha.pa.us>
<23210.952478033@sss.pgh.pa.us>
In-Reply-To: <23210.952478033@sss.pgh.pa.us>
MIME-Version: 1.0
Message-Id: <00030722102200.00601@lorc.wgcr.org>
Content-Transfer-Encoding: 8bit
On Tue, 07 Mar 2000, Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
BTW, we are not *that* far from being able to roll back a DROP TABLE.
The only thing that's really needed is for everyone to take a deep
breath and let go of the notion that table files ought to be named
after the tables. If we named table files after the OIDs of their
tables, then rollback-able DROP or RENAME TABLE would be pretty
straightforward. If you don't recall why this is, consult the
pghackers archives...
The oid will be appended to the base file name.
If we do it that way, then RENAME TABLE will be kinda complicated...
not impossible, but is it worth it?
You know, I really hate to disagree with Bruce, but, Tom, you have a point.
IMHO, the benefits of having tables named by OID are going to be numerous --
the schema idea included. Of course, Bruce's concerns are good concerns as
well. What to do......
Why not do this:
Let the tables be named by OID, and only OID. Then, for admins' convenience,
put in a flat file that is updated periodically, similarly to pg_pwd being a
flat text dump of pg_shadow. Since there's going to have to be a system
table mapping table names to OID's anyway, a flat dump of said system table
should be similarly done as pg_pwd. Call it pg_realnames or something. Have
it have two columns: OID, and pathname (relative to PGDATA) of table.
This would help admins who might want to restore single tables -- as long as
they have a snapshot of pg_realnames at the same time each table is dumped,
then a restore of pg_realnames into a temp dir, then the actual table can be
restored in by its OID (of course, its OID might have changed in the interim,
but you would simply restore it on top of the OID that that table now maps to).
Besides, the OID for the table itself is not likely to change often.
Bruce, would this allay some of your (entirely valid) concerns? (I read the
thread about this the first time around, when Vadim said the tbale names
_would_ go to OID's.)
Just my two cents.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Tue Mar 7 22:03:26 2000
Received: from sraigw.sra.co.jp (sraigw.sra.co.jp [202.32.10.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA79018
for <pgsql-hackers@postgreSQL.org>; Tue, 7 Mar 2000 22:03:16 -0500 (EST)
(envelope-from t-ishii@sra.co.jp)
Received: from sranhk.sra.co.jp (sranhk [133.137.36.134])
by sraigw.sra.co.jp (8.8.7/3.7W-sraigw) with ESMTP id MAA26481;
Wed, 8 Mar 2000 12:03:11 +0900 (JST)
Received: from localhost (IDENT:t-ishii@localhost [127.0.0.1])
by sranhk.sra.co.jp (8.9.3/3.7W-srambox) with ESMTP id MAA23251;
Wed, 8 Mar 2000 12:03:11 +0900
To: jay@sprucegrove.com
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] xlog.c.patch for cygwin port.
In-Reply-To: Your message of "Tue, 7 Mar 2000 21:48:28 -0500 (EST)"
<200003080248.VAA29840@sprucegrove.com>
References: <200003080248.VAA29840@sprucegrove.com>
X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20000308120311P.t-ishii@sra.co.jp>
Date: Wed, 08 Mar 2000 12:03:11 +0900
From: Tatsuo Ishii <t-ishii@sra.co.jp>
X-Dispatcher: imput version 980905(IM100)
Lines: 25
Bruce Momjian <pgman@candle.pha.pa.us> writes:
This looks interesting. We could remove some of our ifwin cruft.
I have been thinking for quite some time that most of the CYGWIN32
ifdefs represent very poor programming. Instead of zillions of#ifndef __CYGWIN32__
fd = open(filename, O_RDONLY, 0666);
#else
fd = open(filename, O_RDONLY | O_BINARY, 0666);
#endifwe should have in one include file something like
Do we ever assign a function pointer for open() anywhere. If so, the
define will not work without some kind of wrapper, right?Since the only difference seems to be "O_RDONLY" vs "O_RDONLY | O_BINARY",
why not do the #define on that?At least in this case it works.
BTW, why do we call open() directory here? Why not VFD interface?
--
Tatsuo Ishii
From bouncefilter Tue Mar 7 23:56:27 2000
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA13176
for <pgsql-hackers@postgreSQL.org>; Tue, 7 Mar 2000 23:56:21 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
XAA13565;
Tue, 7 Mar 2000 23:53:53 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003080453.XAA13565@candle.pha.pa.us>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <00030722102200.00601@lorc.wgcr.org> from Lamar Owen at "Mar 7,
2000 09:57:36 pm"
To: Lamar Owen <lamar.owen@wgcr.org>
Date: Tue, 7 Mar 2000 23:53:53 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, Mike Mascari <mascarm@mascari.com>,
Peter Eisentraut <peter_e@gmx.net>, Tatsuo Ishii <t-ishii@sra.co.jp>,
pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
If we do it that way, then RENAME TABLE will be kinda complicated...
not impossible, but is it worth it?You know, I really hate to disagree with Bruce, but, Tom, you have a point.
IMHO, the benefits of having tables named by OID are going to be numerous --
the schema idea included. Of course, Bruce's concerns are good concerns as
well. What to do......Why not do this:
Let the tables be named by OID, and only OID. Then, for admins' convenience,
put in a flat file that is updated periodically, similarly to pg_pwd being a
flat text dump of pg_shadow. Since there's going to have to be a system
table mapping table names to OID's anyway, a flat dump of said system table
should be similarly done as pg_pwd. Call it pg_realnames or something. Have
it have two columns: OID, and pathname (relative to PGDATA) of table.This would help admins who might want to restore single tables -- as long as
they have a snapshot of pg_realnames at the same time each table is dumped,
then a restore of pg_realnames into a temp dir, then the actual table can be
restored in by its OID (of course, its OID might have changed in the interim,
but you would simply restore it on top of the OID that that table now maps to).Besides, the OID for the table itself is not likely to change often.
Bruce, would this allay some of your (entirely valid) concerns? (I read the
thread about this the first time around, when Vadim said the tbale names
_would_ go to OID's.)
I will fight this to my death. :-)
I have cursed Ingres every time I needed to look at the Ingres data
directory to find out which tables match which files. Even a lookup
file is a pain. Right now, I can do ls -l to see which tables are
taking disk space.
Considering the number of times administrators have to do this, it is a
pain. It is only lazy database internals programmers that would advance
an oid-only file name concept. FYI, Informix SE uses this the
tablename_oid concept in their implementation.
Keeping that flat file in sync with the database will be a royal pain.
Imagine the concurrency problems keeping it up to date.
Guess everyone knows where I stand on this one.
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Mar 8 00:08:27 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA16460
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 00:07:37 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA23796;
Wed, 8 Mar 2000 00:07:31 -0500 (EST)
To: JB <jimbag@kw.igs.net>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] 'LIKE' enhancement suggestion
In-reply-to: <38C5ABB3.28314EB7@kw.igs.net>
References: <38C59900.2A4469C8@kw.igs.net> <22975.952475530@sss.pgh.pa.us>
<38C5ABB3.28314EB7@kw.igs.net>
Comments: In-reply-to JB <jimbag@kw.igs.net>
message dated "Tue, 07 Mar 2000 20:24:03 -0500"
Date: Wed, 08 Mar 2000 00:07:30 -0500
Message-ID: <23792.952492050@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
JB <jimbag@kw.igs.net> writes:
My apologies for chewing up bandwidth.
Not at all! Just because I don't understand it does not mean
you haven't found an effect worth looking into ;-)
I'm running 6.5.2 on RH6.1, 128mb ram, 27gb, P350.
OK, cool. We've had a couple of weird-looking questions that turned
out to be from people running ancient releases, so "what version" is
something we all routinely ask now.
---[snip]---
#!/bin/sh
psql -c "EXPLAIN SELECT * FROM info WHERE substring(stname from 1 for 4)
= 'MAIN';"
time psql -c "SELECT * FROM info WHERE substring(stname from 1 for 4) =
'MAIN';"
psql -c "EXPLAIN SELECT * FROM info WHERE stname LIKE 'MAIN%';"
time psql -c "SELECT * FROM info WHERE stname LIKE 'MAIN%';"
---[snip]---
outputs...
Seq Scan on info (cost=3829.93 rows=15454 width=420)
0.01user 0.01system 0:00.72elapsed 2%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (198major+25minor)pagefaults 0swaps
Index Scan using nx_info1 on info (cost=1531.12 rows=30 width=420)
0.01user 0.01system 0:00.64elapsed 3%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (198major+25minor)pagefaults 0swaps
Obviously the numbers don't support me. I'm quite confused.
"time psql" doesn't really tell you anything much, since the CPU
numbers it cites only cover the psql front end, not the backend
database server. You can put some faith in the "elapsed time"
values, but only if your machine is otherwise idle. In this case
you have readings 0.72 and 0.64, which are IMHO too close to call;
you'd need to make a longer-running test case to have much confidence
in the results.
But you said before that you saw 20 sec vs. 2 sec, which is surely
a significant difference (barring major load variations from other
programs on your machine); can you duplicate that?
I was told that the engine didn't use indexes with 'LIKE' by someone
equally informed as I, and thus the 'substring' change.
Postgres does use an index for "foo LIKE 'bar%'" if it can. 6.5
is not very bright about this when you have USE_LOCALE enabled,
but 7.0 is smarter.
There must be something with the bigger system that I need to
look into (mem usage, etc).
It's worth looking into. Feel free to contact me off-list if you
want to probe further.
regards, tom lane
From bouncefilter Wed Mar 8 00:20:27 2000
Received: from thelab.hub.org (nat195.52.mpoweredpc.net [142.177.195.52])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA19118
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 00:19:33 -0500 (EST)
(envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id BAA18086;
Wed, 8 Mar 2000 01:19:25 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Wed, 8 Mar 2000 01:19:24 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: JB <jimbag@kw.igs.net>
cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] 'LIKE' enhancement suggestion
In-Reply-To: <38C5ABB3.28314EB7@kw.igs.net>
Message-ID: <Pine.BSF.4.21.0003080118180.591-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 7 Mar 2000, JB wrote:
Obviously the numbers don't support me. I'm quite confused. I was told
that the engine didn't use indexes with 'LIKE' by someone equally
informed as I
Bruce made mods at least a release, if not more, back that allowed
a LIKE to use an index *if and only if* the only "varying" part was the
tail end ...
From bouncefilter Wed Mar 8 00:21:27 2000
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA19383
for <hackers@postgresql.org>; Wed, 8 Mar 2000 00:20:56 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id FAA25224;
Wed, 8 Mar 2000 05:29:33 GMT
Sender: lockhart@hub.org
Message-ID: <38C5E53D.AE6F7076@alumni.caltech.edu>
Date: Wed, 08 Mar 2000 05:29:33 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
CC: Postgres Hackers List <hackers@postgresql.org>
Subject: Re: [HACKERS] CREATE VIEW fix
References: <38C52AEB.87DF5035@alumni.caltech.edu>
<20000307134154.D21828@rice.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
CREATE VIEW (a, b, c) AS SELECT ...
Hmm, couldn't you just rewrite the SELECT d, e, f ... part to use the
AS syntax? I was thinking that both:
CREATE VIEW (a, b, c) AS SELECT d, e, f ...
CREATE VIEW AS SELECT d AS a, e AS b, f AS c ...
should result in the same VIEW being created. But, hey, don't let me
knock already written code!
Not at all. Next time I'll let you write it, since this is how I
implemented it :)
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Mar 8 00:43:27 2000
Received: from thelab.hub.org (nat195.52.mpoweredpc.net [142.177.195.52])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA23840
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 00:43:09 -0500 (EST)
(envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id BAA49904;
Wed, 8 Mar 2000 01:42:06 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Wed, 8 Mar 2000 01:42:06 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, yutaka tanida <yutaka@marin.or.jp>,
Alexei Zakharov <A.S.Zakharov@inp.nsk.su>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] xlog.c.patch for cygwin port.
In-Reply-To: <200003080150.UAA07499@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.0003080141310.591-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 7 Mar 2000, Bruce Momjian wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
This looks interesting. We could remove some of our ifwin cruft.
I have been thinking for quite some time that most of the CYGWIN32
ifdefs represent very poor programming. Instead of zillions of#ifndef __CYGWIN32__
fd = open(filename, O_RDONLY, 0666);
#else
fd = open(filename, O_RDONLY | O_BINARY, 0666);
#endifwe should have in one include file something like
Do we ever assign a function pointer for open() anywhere. If so, the
define will not work without some kind of wrapper, right?
Okay, I'm lost ... if we "#define OPEN_FLAGS .." and not the open itself,
why would we need some kind of wrapper?
From bouncefilter Wed Mar 8 00:40:27 2000
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA23103
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 00:39:47 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id FAA25248;
Wed, 8 Mar 2000 05:45:05 GMT
Sender: lockhart@hub.org
Message-ID: <38C5E8E1.B5565314@alumni.caltech.edu>
Date: Wed, 08 Mar 2000 05:45:05 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter_e@gmx.net>,
pgsql-hackers@postgreSQL.org
Subject: Re: BIT/BIT VARYING names (was Re: [HACKERS] Beta for 4:30AST)
References: <200003080130.UAA06414@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Presumably we would include a function taking the conversion the other
direction too...Not sure it is really needed. We already to the translation in gram.y.
Right. And we should expose that routine as mentioned. Otherwise it is
just hidden behavior.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Mar 8 00:51:27 2000
Received: from thelab.hub.org (nat195.52.mpoweredpc.net [142.177.195.52])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA25643
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 00:50:36 -0500 (EST)
(envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id BAA59829;
Wed, 8 Mar 2000 01:49:58 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Wed, 8 Mar 2000 01:49:58 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Lamar Owen <lamar.owen@wgcr.org>
cc: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>,
Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <00030722102200.00601@lorc.wgcr.org>
Message-ID: <Pine.BSF.4.21.0003080148180.591-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 7 Mar 2000, Lamar Owen wrote:
Let the tables be named by OID, and only OID. Then, for admins' convenience,
put in a flat file that is updated periodically, similarly to pg_pwd being a
flat text dump of pg_shadow. Since there's going to have to be a system
table mapping table names to OID's anyway, a flat dump of said system table
should be similarly done as pg_pwd. Call it pg_realnames or something. Have
it have two columns: OID, and pathname (relative to PGDATA) of table.
This I would be against ... I personally hate the whole pg_hba.conf,
pg_pwd, etc 'flatfiles' ...
But, could there not be some way of 'extracting extended data' from the
backend? ie. some sort of \d command that would provide you with
tablename+path+disk size+??
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Wed Mar 8 00:51:28 2000
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA25751
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 00:51:14 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA15242;
Wed, 8 Mar 2000 00:50:15 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003080550.AAA15242@candle.pha.pa.us>
Subject: Re: [HACKERS] xlog.c.patch for cygwin port.
In-Reply-To: <Pine.BSF.4.21.0003080141310.591-100000@thelab.hub.org> from The
Hermit Hacker at "Mar 8, 2000 01:42:06 am"
To: The Hermit Hacker <scrappy@hub.org>
Date: Wed, 8 Mar 2000 00:50:15 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, yutaka tanida <yutaka@marin.or.jp>,
Alexei Zakharov <A.S.Zakharov@inp.nsk.su>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=UNKNOWN-8BIT
Content-Transfer-Encoding: 8bit
On Tue, 7 Mar 2000, Bruce Momjian wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
This looks interesting. We could remove some of our ifwin cruft.
I have been thinking for quite some time that most of the CYGWIN32
ifdefs represent very poor programming. Instead of zillions of#ifndef __CYGWIN32__
fd = open(filename, O_RDONLY, 0666);
#else
fd = open(filename, O_RDONLY | O_BINARY, 0666);
#endifwe should have in one include file something like
Do we ever assign a function pointer for open() anywhere. If so, the
define will not work without some kind of wrapper, right?Okay, I'm lost ... if we "#define OPEN_FLAGS .." and not the open itself,
why would we need some kind of wrapper?
No, the original person was refining open(). I���think defining the flags
is much better.
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Mar 8 00:56:27 2000
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA27022
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 00:56:14 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
AAA15390;
Wed, 8 Mar 2000 00:54:37 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003080554.AAA15390@candle.pha.pa.us>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <38C5EB5F.CFCA1617@alumni.caltech.edu> from Thomas Lockhart at
"Mar 8, 2000 05:55:43 am"
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Date: Wed, 8 Mar 2000 00:54:37 -0500 (EST)
CC: Lamar Owen <lamar.owen@wgcr.org>, Tom Lane <tgl@sss.pgh.pa.us>,
Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
I will fight this to my death. :-)
I have cursed Ingres every time I needed to look at the Ingres data
directory to find out which tables match which files. Even a lookup
file is a pain. Right now, I can do ls -l to see which tables are
taking disk space.I had Ingres also, and found their scheme to be a royal pain. But that
was really only because they had such a *bad* schema that I'd have to
poke around forever to reconstruct a query which would give me file
names and table names. And then I'd have to print that and compare
that to the directories which were buried way down in a directory
tree.But with Postgres, we can write a utility to do this for us, so I
think that it isn't so much of an issue. In fact, perhaps we could
have a backend function which could do this, so we could query the
sizes directly.
Does not work if the table was accidentally deleted. Also requires the
backend to be running.
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Mar 8 00:48:27 2000
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA24913
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 00:48:14 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id FAA25270;
Wed, 8 Mar 2000 05:55:44 GMT
Sender: lockhart@hub.org
Message-ID: <38C5EB5F.CFCA1617@alumni.caltech.edu>
Date: Wed, 08 Mar 2000 05:55:43 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: Lamar Owen <lamar.owen@wgcr.org>, Tom Lane <tgl@sss.pgh.pa.us>,
Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
References: <200003080453.XAA13565@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I will fight this to my death. :-)
I have cursed Ingres every time I needed to look at the Ingres data
directory to find out which tables match which files. Even a lookup
file is a pain. Right now, I can do ls -l to see which tables are
taking disk space.
I had Ingres also, and found their scheme to be a royal pain. But that
was really only because they had such a *bad* schema that I'd have to
poke around forever to reconstruct a query which would give me file
names and table names. And then I'd have to print that and compare
that to the directories which were buried way down in a directory
tree.
But with Postgres, we can write a utility to do this for us, so I
think that it isn't so much of an issue. In fact, perhaps we could
have a backend function which could do this, so we could query the
sizes directly.
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Mar 8 01:07:28 2000
Received: from acheron.rime.com.au (root@albatr.lnk.telstra.net
[139.130.54.222]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA30386
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 01:07:11 -0500 (EST)
(envelope-from pjw@rhyme.com.au)
Received: from oberon (Oberon.rime.com.au [203.8.195.100])
by acheron.rime.com.au (8.9.3/8.9.3) with SMTP id RAA15216;
Wed, 8 Mar 2000 17:04:23 +1100
Message-Id: <3.0.5.32.20000308170505.0096b210@mail.rhyme.com.au>
X-Sender: pjw@mail.rhyme.com.au
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Wed, 08 Mar 2000 17:05:05 +1100
To: Lamar Owen <lamar.owen@wgcr.org>, Tom Lane <tgl@sss.pgh.pa.us>,
Bruce Momjian <pgman@candle.pha.pa.us>
From: Philip Warner <pjw@rhyme.com.au>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Cc: Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
In-Reply-To: <00030722102200.00601@lorc.wgcr.org>
References: <23210.952478033@sss.pgh.pa.us>
<200003080017.TAA04546@candle.pha.pa.us>
<23210.952478033@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 21:57 7/03/00 -0500, Lamar Owen wrote:
Let the tables be named by OID, and only OID. Then, for admins' convenience,
put in a flat file that is updated periodically, similarly to pg_pwd being a
flat text dump of pg_shadow. Since there's going to have to be a system
table mapping table names to OID's anyway, a flat dump of said system table
should be similarly done as pg_pwd. Call it pg_realnames or something. Have
it have two columns: OID, and pathname (relative to PGDATA) of table.
For the ignorant, are you able to explain why naming files
'<table_name>_<IOD>' is not acceptable? This seems to satisfy both
requirements (and seemed to be the conclusion of the previous discussion).
I presume I have missed something, and assume there is a good reason for
the '<IOD>' naming convention, so if that is the final choice, would it be
hard to have a file header containing details about the table/index/thing
the the file contains and it's OID. In this way, a future pd_dumpfile
command can tell us what our backed up file '1FA12347.dat' is supposed to
contain?
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: +61-03-5367 7422 | _________ \
Fax: +61-03-5367 7430 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
From bouncefilter Wed Mar 8 01:08:29 2000
Received: from thelab.hub.org (nat195.52.mpoweredpc.net [142.177.195.52])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA30582
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 01:07:50 -0500 (EST)
(envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.1) with ESMTP id CAA84630;
Wed, 8 Mar 2000 02:07:28 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Wed, 8 Mar 2000 02:07:28 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Tom Lane <tgl@sss.pgh.pa.us>, yutaka tanida <yutaka@marin.or.jp>,
Alexei Zakharov <A.S.Zakharov@inp.nsk.su>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] xlog.c.patch for cygwin port.
In-Reply-To: <200003080550.AAA15242@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.0003080206330.591-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
Content-Transfer-Encoding: 8BIT
On Wed, 8 Mar 2000, Bruce Momjian wrote:
On Tue, 7 Mar 2000, Bruce Momjian wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
This looks interesting. We could remove some of our ifwin cruft.
I have been thinking for quite some time that most of the CYGWIN32
ifdefs represent very poor programming. Instead of zillions of#ifndef __CYGWIN32__
fd = open(filename, O_RDONLY, 0666);
#else
fd = open(filename, O_RDONLY | O_BINARY, 0666);
#endifwe should have in one include file something like
Do we ever assign a function pointer for open() anywhere. If so, the
define will not work without some kind of wrapper, right?Okay, I'm lost ... if we "#define OPEN_FLAGS .." and not the open itself,
why would we need some kind of wrapper?No, the original person was refining open(). I���think defining the flags
is much better.
Ah, okay, knew I was missing something :)
From bouncefilter Wed Mar 8 01:28:28 2000
Received: from mailo.vtcif.telstra.com.au (mailo.vtcif.telstra.com.au
[202.12.144.17]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA35393
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 01:28:06 -0500 (EST)
(envelope-from chrisb@nimrod.itg.telstra.com.au)
Received: (from uucp@localhost) by mailo.vtcif.telstra.com.au (8.8.2/8.6.9) id
RAA16964 for <pgsql-hackers@postgreSQL.org>;
Wed, 8 Mar 2000 17:27:23 +1100 (EST)
Received: from maili.vtcif.telstra.com.au(202.12.142.17)
via SMTP by mailo.vtcif.telstra.com.au, id smtpd1sJgc_;
Wed Mar 8 17:26:50 2000
Received: (from uucp@localhost) by maili.vtcif.telstra.com.au (8.8.2/8.6.9) id
RAA17481 for <pgsql-hackers@postgreSQL.org>;
Wed, 8 Mar 2000 17:26:48 +1100 (EST)
Received: from localhost(127.0.0.1), claiming to be "mail.cdn.telstra.com.au"
via SMTP by localhost, id smtpd0UORg0; Wed Mar 8 17:26:31 2000
Received: from lunitari.nimrod.itg.telecom.com.au
(lunitari.nimrod.itg.telecom.com.au [192.53.254.48]) by
mail.cdn.telstra.com.au (8.8.2/8.6.9) with ESMTP id RAA07601
for <pgsql-hackers@postgreSQL.org>;
Wed, 8 Mar 2000 17:26:27 +1100 (EST)
Received: from nimrod.itg.telecom.com.au (majere [192.53.254.45])
by lunitari.nimrod.itg.telecom.com.au (8.9.1/8.9.3) with ESMTP id
RAA07327
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 17:25:36 +1100 (EST)
Sender: chrisb@nimrod.itg.telstra.com.au
Message-ID: <38C5F21E.340E956F@nimrod.itg.telecom.com.au>
Date: Wed, 08 Mar 2000 17:24:30 +1100
From: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>
Reply-To: chris@bitmead.com
Organization: IBM Global Services
X-Mailer: Mozilla 4.6 [en] (X11; I; SunOS 5.6 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
References: <200003080453.XAA13565@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
I will fight this to my death. :-)
I have cursed Ingres every time I needed to look at the Ingres data
directory to find out which tables match which files. Even a lookup
file is a pain. Right now, I can do ls -l to see which tables are
taking disk space.
Assuming a script "tableoid", is..
ls -l `tableoid foobar`
or
tableoid | xargs ls -l
so bad?
From bouncefilter Wed Mar 8 02:02:28 2000
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA43483
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 02:01:39 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
BAA16675;
Wed, 8 Mar 2000 01:41:15 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003080641.BAA16675@candle.pha.pa.us>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <38C5F21E.340E956F@nimrod.itg.telecom.com.au> from Chris Bitmead
at "Mar 8, 2000 05:24:30 pm"
To: chris@bitmead.com
Date: Wed, 8 Mar 2000 01:41:15 -0500 (EST)
CC: pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Bruce Momjian wrote:
I will fight this to my death. :-)
I have cursed Ingres every time I needed to look at the Ingres data
directory to find out which tables match which files. Even a lookup
file is a pain. Right now, I can do ls -l to see which tables are
taking disk space.Assuming a script "tableoid", is..
ls -l `tableoid foobar`
or
tableoid | xargs ls -l
Give me a reason we don't put the table name in the file name?
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Mar 8 01:56:28 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id BAA41812
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 01:55:37 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id BAA24309;
Wed, 8 Mar 2000 01:54:52 -0500 (EST)
To: Philip Warner <pjw@rhyme.com.au>
cc: Lamar Owen <lamar.owen@wgcr.org>, Bruce Momjian <pgman@candle.pha.pa.us>,
Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-reply-to: <3.0.5.32.20000308170505.0096b210@mail.rhyme.com.au>
References: <23210.952478033@sss.pgh.pa.us>
<200003080017.TAA04546@candle.pha.pa.us>
<23210.952478033@sss.pgh.pa.us>
<3.0.5.32.20000308170505.0096b210@mail.rhyme.com.au>
Comments: In-reply-to Philip Warner <pjw@rhyme.com.au>
message dated "Wed, 08 Mar 2000 17:05:05 +1100"
Date: Wed, 08 Mar 2000 01:54:52 -0500
Message-ID: <24306.952498492@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Philip Warner <pjw@rhyme.com.au> writes:
For the ignorant, are you able to explain why naming files
'<table_name>_<IOD>' is not acceptable? This seems to satisfy both
requirements (and seemed to be the conclusion of the previous discussion).
Well, it's pretty simple: consider what has to happen to make RENAME
TABLE be rollback-able.
You clearly have to update the pg_class tuple whose relname field
contains the table name. That's no problem, because the normal
tuple commit mechanics will take care of making that tuple update
visible or not.
But, in the current implementation, renaming a table also requires
renaming the physical files that hold the table's data --- and last
I checked, Unix filesystems don't know anything about Postgres
transactions. Our current code renames the files instantly when
the table rename command is done, and there isn't any code for
undoing that rename. Thus, aborting the xact afterwards fails, because
the pg_class entries revert to their pre-xact values, but the physical
files don't revert to their prior names.
If we change the implementation so that the files are named after
the (fixed, never-changed-after-creation) table OID, then RENAME
TABLE is no problem: it affects *nothing* except the relname field
of the table's pg_class row, and either that row update is committed
or it ain't.
But if the physical file names contain the logical table name, we
have to be prepared to rename those files in sync with the transaction
commit that makes the pg_class update valid. Quite aside from any
implementation effort involved, the critical point is this: it is
*not possible* to ensure that that collection of changes is atomic.
At best, we can make the window for failure small.
Bruce seems to be willing to accept a window of failure for RENAME
TABLE in order to make database admin easier. That is very possibly
the right tradeoff --- but it is *not* an open-and-shut decision.
We need to talk about it.
regards, tom lane
From bouncefilter Wed Mar 8 02:34:29 2000
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id CAA50947
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 02:34:03 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
CAA17536;
Wed, 8 Mar 2000 02:06:00 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003080706.CAA17536@candle.pha.pa.us>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <24306.952498492@sss.pgh.pa.us> from Tom Lane at "Mar 8,
2000 01:54:52 am"
To: Tom Lane <tgl@sss.pgh.pa.us>
Date: Wed, 8 Mar 2000 02:06:00 -0500 (EST)
CC: Philip Warner <pjw@rhyme.com.au>, Lamar Owen <lamar.owen@wgcr.org>,
Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
If we change the implementation so that the files are named after
the (fixed, never-changed-after-creation) table OID, then RENAME
TABLE is no problem: it affects *nothing* except the relname field
of the table's pg_class row, and either that row update is committed
or it ain't.But if the physical file names contain the logical table name, we
have to be prepared to rename those files in sync with the transaction
commit that makes the pg_class update valid. Quite aside from any
implementation effort involved, the critical point is this: it is
*not possible* to ensure that that collection of changes is atomic.
At best, we can make the window for failure small.Bruce seems to be willing to accept a window of failure for RENAME
TABLE in order to make database admin easier. That is very possibly
the right tradeoff --- but it is *not* an open-and-shut decision.
We need to talk about it.
How about creating a hard link during RENAME, and you can just remove
the old link on commit or remove the new link on transaction rollback?
We can register this in the at_exit processing too if you think it is
necessary to clean it up on a backend crash that never gets to an abort,
though I think abort is always called.
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Mar 8 02:24:29 2000
Received: from acheron.rime.com.au (root@albatr.lnk.telstra.net
[139.130.54.222]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA48396
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 02:23:51 -0500 (EST)
(envelope-from pjw@rhyme.com.au)
Received: from oberon (Oberon.rime.com.au [203.8.195.100])
by acheron.rime.com.au (8.9.3/8.9.3) with SMTP id SAA15807;
Wed, 8 Mar 2000 18:09:21 +1100
Message-Id: <3.0.5.32.20000308181004.01fc3680@mail.rhyme.com.au>
X-Sender: pjw@mail.rhyme.com.au
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Wed, 08 Mar 2000 18:10:04 +1100
To: Tom Lane <tgl@sss.pgh.pa.us>
From: Philip Warner <pjw@rhyme.com.au>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Cc: Lamar Owen <lamar.owen@wgcr.org>, Bruce Momjian <pgman@candle.pha.pa.us>,
Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
In-Reply-To: <24306.952498492@sss.pgh.pa.us>
References: <3.0.5.32.20000308170505.0096b210@mail.rhyme.com.au>
<23210.952478033@sss.pgh.pa.us>
<200003080017.TAA04546@candle.pha.pa.us>
<23210.952478033@sss.pgh.pa.us>
<3.0.5.32.20000308170505.0096b210@mail.rhyme.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
At 01:54 8/03/00 -0500, Tom Lane wrote:
Philip Warner <pjw@rhyme.com.au> writes:
For the ignorant, are you able to explain why naming files
'<table_name>_<IOD>' is not acceptable? This seems to satisfy both
requirements (and seemed to be the conclusion of the previous discussion).Well, it's pretty simple: consider what has to happen to make RENAME
TABLE be rollback-able.
...etc
Sorry for the stupid question. I was confusing the previous discussions
over 'DROP COLUMN' with this one, without actually engaging my brain.
Your response was admirably patient.
FWIW, without a 'storage area' or 'table space' concept, I agree that table
names based on OID's are TWTG.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: +61-03-5367 7422 | _________ \
Fax: +61-03-5367 7430 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
From bouncefilter Wed Mar 8 13:29:41 2000
Received: from feivel.fam-meskes.de (p3E9C2DC7.dip0.t-ipconnect.de
[62.156.45.199]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA96848
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 10:43:13 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: by feivel.fam-meskes.de (Postfix, from userid 1000)
id C6A4D2BC0C; Wed, 8 Mar 2000 08:21:13 +0100 (CET)
Date: Wed, 8 Mar 2000 08:21:12 +0100
From: Michael Meskes <meskes@postgreSQL.org>
To: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] pSQL auth
Message-ID: <20000308082112.A4571@fam-meskes.de>
Mail-Followup-To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
References: <006901bf8812$02f59120$0a0aa8c0@pierino>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0.1i
In-Reply-To: <006901bf8812$02f59120$0a0aa8c0@pierino>;
from jsilva@siauto.it on Tue, Mar 07, 2000 at 09:45:44AM +0100
Sender: michael@fam-meskes.de
On Tue, Mar 07, 2000 at 09:45:44AM +0100, Jacopo Silva wrote:
I am an enthusiastic user of PostgreSQL, and I feel that with little effort
we could add pam authentication functionality. What do you think?
"Pluggable Authentication Modules" are well supported on many architectures,
eg. Linux or BSD or Solaris, users could authenticate in tens of ways.
The db administrator's will have choice of thousands of authentication
methods, e.g. Kerberos, standard Unix UID (/etc/passwd), SMB, NT Domain,
etc. etc.
This sounds very interesting IMO.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Wed Mar 8 03:15:29 2000
Received: from corvette.mascari.com (dhcp26136016.columbus.rr.com
[24.26.136.16]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA61701
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 03:15:02 -0500 (EST)
(envelope-from mascarm@mascari.com)
Received: from mascari.com (ferrari.mascari.com [192.168.2.1])
by corvette.mascari.com (8.9.3/8.9.3) with ESMTP id DAA28455;
Wed, 8 Mar 2000 03:08:32 -0500
Message-ID: <38C60A51.43B7BF5@mascari.com>
Date: Wed, 08 Mar 2000 03:07:45 -0500
From: Mike Mascari <mascarm@mascari.com>
X-Mailer: Mozilla 4.7 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Bruce Momjian <pgman@candle.pha.pa.us>
CC: Tom Lane <tgl@sss.pgh.pa.us>, Philip Warner <pjw@rhyme.com.au>,
Lamar Owen <lamar.owen@wgcr.org>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
References: <200003080706.CAA17536@candle.pha.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Can I throw one more question out there on this subject?
There's something that I view as inconsistent behavior with
respect to DDL statements and MVCC and was wondering if this
would have any impact on the discussion (the following is with
6.5.3):
Session #1:
emptoris=> begin;
BEGIN
emptoris=> select * from test;
value
-----
1
(1 row)
Session #2:
emptoris=> begin;
BEGIN
emptoris=> select * from test;
value
-----
1
(1 row)
Session #1:
emptoris=> drop table test;
DROP
Session #2:
emptoris=> select * from test;
ERROR: mdopen: couldn't open test: No such file or directory
Now it would seem to me that if DROP TABLE is going to be
ROLLBACK-able, then Session #2, in a MVCC environment should
never see:
ERROR: mdopen: couldn't open test: No such file or directory
but it does, because the "effect" of the drop table is an action
that is seen by all sessions, as though it were "committed". So I
am now wondering, are there any
Multi-Versioning/Multi-Generational RDBMS that support
ROLLBACK-able DDL statements in transactions...
Just curious,
Mike Mascari
From bouncefilter Wed Mar 8 03:33:29 2000
Received: from acheron.rime.com.au (root@albatr.lnk.telstra.net
[139.130.54.222]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA76761
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 03:32:33 -0500 (EST)
(envelope-from pjw@rhyme.com.au)
Received: from oberon (Oberon.rime.com.au [203.8.195.100])
by acheron.rime.com.au (8.9.3/8.9.3) with SMTP id TAA16505;
Wed, 8 Mar 2000 19:25:36 +1100
Message-Id: <3.0.5.32.20000308192619.01fbb240@mail.rhyme.com.au>
X-Sender: pjw@mail.rhyme.com.au
X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32)
Date: Wed, 08 Mar 2000 19:26:19 +1100
To: Mike Mascari <mascarm@mascari.com>, Bruce Momjian <pgman@candle.pha.pa.us>
From: Philip Warner <pjw@rhyme.com.au>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Lamar Owen <lamar.owen@wgcr.org>,
Peter Eisentraut <peter_e@gmx.net>, Tatsuo Ishii <t-ishii@sra.co.jp>,
pgsql-hackers@postgreSQL.org
In-Reply-To: <38C60A51.43B7BF5@mascari.com>
References: <200003080706.CAA17536@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
but it does, because the "effect" of the drop table is an action
that is seen by all sessions, as though it were "committed". So I
am now wondering, are there any
Multi-Versioning/Multi-Generational RDBMS that support
ROLLBACK-able DDL statements in transactions...
Dec/Rdb for one. They do, however, make their lives easier by 'locking the
metadata' when a user does a select. This means the 'drop table' would hang
until the first user commits. I think it even hangs until the first user
exits - basically if they have referenced tha table, you can't touch it
until they exit. But they do allow rollback on all DDL statements.
They do not allow rollback on 'managment' functions like moving storage
areas (where one or more tables are stored) across disks, doing vacuum-like
functions etc.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 008 659 498) | /(@) ______---_
Tel: +61-03-5367 7422 | _________ \
Fax: +61-03-5367 7430 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
From bouncefilter Wed Mar 8 03:32:29 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA76741
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 03:32:04 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id DAA24516;
Wed, 8 Mar 2000 03:31:40 -0500 (EST)
To: Mike Mascari <mascarm@mascari.com>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-reply-to: <38C60A51.43B7BF5@mascari.com>
References: <200003080706.CAA17536@candle.pha.pa.us>
<38C60A51.43B7BF5@mascari.com>
Comments: In-reply-to Mike Mascari <mascarm@mascari.com>
message dated "Wed, 08 Mar 2000 03:07:45 -0500"
Date: Wed, 08 Mar 2000 03:31:40 -0500
Message-ID: <24513.952504300@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Mike Mascari <mascarm@mascari.com> writes:
Now it would seem to me that if DROP TABLE is going to be
ROLLBACK-able, then Session #2, in a MVCC environment should
never see:
ERROR: mdopen: couldn't open test: No such file or directory
Check. We didn't say this worked yet ;-)
regards, tom lane
From bouncefilter Wed Mar 8 03:42:29 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA78604
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 03:41:58 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id DAA24577;
Wed, 8 Mar 2000 03:41:17 -0500 (EST)
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-reply-to: <200003080706.CAA17536@candle.pha.pa.us>
References: <200003080706.CAA17536@candle.pha.pa.us>
Comments: In-reply-to Bruce Momjian <pgman@candle.pha.pa.us>
message dated "Wed, 08 Mar 2000 02:06:00 -0500"
Date: Wed, 08 Mar 2000 03:41:17 -0500
Message-ID: <24574.952504877@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Bruce seems to be willing to accept a window of failure for RENAME
TABLE in order to make database admin easier. That is very possibly
the right tradeoff --- but it is *not* an open-and-shut decision.
We need to talk about it.
How about creating a hard link during RENAME, and you can just remove
the old link on commit or remove the new link on transaction rollback?
Still non-atomic as far as I can see...
regards, tom lane
From bouncefilter Wed Mar 8 04:36:30 2000
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA87672
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 04:36:06 -0500 (EST)
(envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id SAA00001; Wed, 08 Mar 2000 18:33:49 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Mike Mascari" <mascarm@mascari.com>,
"Bruce Momjian" <pgman@candle.pha.pa.us>
Cc: "Tom Lane" <tgl@sss.pgh.pa.us>, "Philip Warner" <pjw@rhyme.com.au>,
"Lamar Owen" <lamar.owen@wgcr.org>, "Peter Eisentraut" <peter_e@gmx.net>,
"Tatsuo Ishii" <t-ishii@sra.co.jp>, <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] DROP TABLE inside a transaction block
Date: Wed, 8 Mar 2000 18:40:20 +0900
Message-ID: <000a01bf88e2$5193f260$2801007e@tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <38C60A51.43B7BF5@mascari.com>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Mike MascariCan I throw one more question out there on this subject?
There's something that I view as inconsistent behavior with
respect to DDL statements and MVCC and was wondering if this
would have any impact on the discussion (the following is with
6.5.3):Session #1:
emptoris=> begin;
BEGIN
emptoris=> select * from test;
value
-----
1
(1 row)Session #2:
emptoris=> begin;
BEGIN
emptoris=> select * from test;
value
-----
1
(1 row)Session #1:
emptoris=> drop table test;
DROPSession #2:
emptoris=> select * from test;
ERROR: mdopen: couldn't open test: No such file or directoryNow it would seem to me that if DROP TABLE is going to be
ROLLBACK-able, then Session #2, in a MVCC environment should
never see:ERROR: mdopen: couldn't open test: No such file or directory
but it does, because the "effect" of the drop table is an action
that is seen by all sessions, as though it were "committed".
The inconsistency is due the current implementation of DROP
TABLE which immediately unlinks the base relation file phisically.
Though the definition(i.e pg_class tuple) of test relation still exits
(logically),the base relation file doesn't exist.
PostgreSQL has a standard mechanism of transaction control
for tuples but there's no such mechanism for relation files.
Currently even a single DDL command outside transaction
doesn't have atomicity. I have really disliked this feature(? bug)
for a long time.
Flexible mapping from a relation to the relation file name is
needed in order to enable transaction control for relation files.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Wed Mar 8 05:09:30 2000
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34])
by hub.org (8.9.3/8.9.3) with ESMTP id FAA94533
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 05:08:30 -0500 (EST)
(envelope-from Inoue@tpf.co.jp)
Received: from cadzone ([126.0.1.40] (may be forged))
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
id TAA00032; Wed, 08 Mar 2000 19:06:12 +0900
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Tom Lane" <tgl@sss.pgh.pa.us>, "Philip Warner" <pjw@rhyme.com.au>
Cc: "Lamar Owen" <lamar.owen@wgcr.org>,
"Bruce Momjian" <pgman@candle.pha.pa.us>,
"Mike Mascari" <mascarm@mascari.com>, "Peter Eisentraut" <peter_e@gmx.net>,
"Tatsuo Ishii" <t-ishii@sra.co.jp>, <pgsql-hackers@postgreSQL.org>
Subject: RE: [HACKERS] DROP TABLE inside a transaction block
Date: Wed, 8 Mar 2000 19:12:43 +0900
Message-ID: <000b01bf88e6$d7ac1d60$2801007e@tpf.co.jp>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <24306.952498492@sss.pgh.pa.us>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
-----Original Message-----
From: owner-pgsql-hackers@postgreSQL.org
[mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Tom LanePhilip Warner <pjw@rhyme.com.au> writes:
For the ignorant, are you able to explain why naming files
'<table_name>_<IOD>' is not acceptable? This seems to satisfy both
requirements (and seemed to be the conclusion of the previousdiscussion).
Well, it's pretty simple: consider what has to happen to make RENAME
TABLE be rollback-able.
Is it necessary to get the relation path name from the relation name/oid etc
each time ?
Is it bad to keep the relation path name in pg_class(or another relation) ?
If a new vessel is needed for copy(etc)ing existent tuples we have to
allocate
another unique path name otherwise we can use already allocated file name.
And is it good to dicide the unique path name from oid/relname etc ?
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp
From bouncefilter Wed Mar 8 13:47:23 2000
Received: from smtprtp.ntcom.nortel.net (smtprtp.ntcom.nortel.net
[137.118.22.15]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA61234
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 08:04:06 -0500 (EST)
(envelope-from mhh@nortelnetworks.com)
Received: from zrtpd004.us.nortel.com (actually zrtpd004)
by smtprtp.ntcom.nortel.net; Wed, 8 Mar 2000 08:02:34 -0500
Received: from zrtpd003.us.nortel.com ([47.140.224.137])
by zrtpd004.us.nortel.com
with SMTP (Microsoft Exchange Internet Mail Service Version
5.5.2650.21) id G2B0LS5W; Wed, 8 Mar 2000 08:02:34 -0500
Received: from americasm01.nt.com (hrtpp28d.us.nortel.com [47.190.110.250])
by zrtpd003.us.nortel.com
with SMTP (Microsoft Exchange Internet Mail Service Version
5.5.2650.21) id FXSMFGNJ; Wed, 8 Mar 2000 08:02:33 -0500
Message-ID: <38C65010.82B109FF@americasm01.nt.com>
Date: Wed, 08 Mar 2000 08:05:20 -0500
X-Sybari-Space: 00000000 00000000 00000000
From: "Mark Hollomon" <mhh@nortelnetworks.com>
Reply-To: "Mark Hollomon" <mhh@nortelnetworks.com>
Organization: Nortel Networks
X-Mailer: Mozilla 4.04 [en] (Win95; U)
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
References: <23210.952478033@sss.pgh.pa.us>
<200003080017.TAA04546@candle.pha.pa.us>
<23210.952478033@sss.pgh.pa.us>
<3.0.5.32.20000308170505.0096b210@mail.rhyme.com.au>
<24306.952498492@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
If we change the implementation so that the files are named after
the (fixed, never-changed-after-creation) table OID, then RENAME
TABLE is no problem: it affects *nothing* except the relname field
of the table's pg_class row, and either that row update is committed
or it ain't.But if the physical file names contain the logical table name, we
have to be prepared to rename those files in sync with the transaction
commit that makes the pg_class update valid. Quite aside from any
implementation effort involved, the critical point is this: it is
*not possible* to ensure that that collection of changes is atomic.
At best, we can make the window for failure small.
How about using hard-links? The transaction that created the change
would see the new link along with the new tuple. other transactions
would see the old directory and the old tuple. rollback drops the new
tuple and the new directory entry. Commit does the obvious.
Does WinNT have something similar to a hard link?
--
Mark Hollomon
mhh@nortelnetworks.com
ESN 451-9008 (302)454-9008
From bouncefilter Wed Mar 8 13:46:12 2000
Received: from durham3-171.dsl.gtei.net (postfix@durham3-171.dsl.gtei.net
[4.3.3.171]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA22104
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 09:04:44 -0500 (EST)
(envelope-from mdorman@debian.org)
Received: from kate.private.net (kate.private.net [192.168.1.2])
by durham3-171.dsl.gtei.net (Postfix) with ESMTP id 8E8042B0AA
for <pgsql-hackers@postgresql.org>;
Wed, 8 Mar 2000 09:04:32 -0500 (EST)
Received: by kate.private.net (Postfix, from userid 1000)
id 03FD157E31; Wed, 8 Mar 2000 09:04:27 -0500 (EST)
To: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
References: <00030722102200.00601@lorc.wgcr.org>
<200003080453.XAA13565@candle.pha.pa.us>
Sender: pgsql-hackers@news.ironicdesign.com
From: Michael Alan Dorman <mdorman@debian.org>
Date: 08 Mar 2000 09:04:27 -0500
In-Reply-To: pgman@candle.pha.pa.us's message of "7 Mar 2000 23:04:34 -0600"
Message-ID: <87hfehzhg4.fsf@kate.private.net>
Lines: 37
User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
pgman@candle.pha.pa.us (Bruce Momjian) writes:
I have cursed Ingres every time I needed to look at the Ingres data
directory to find out which tables match which files. Even a lookup
file is a pain. Right now, I can do ls -l to see which tables are
taking disk space.Considering the number of times administrators have to do this, it is a
pain. It is only lazy database internals programmers that would advance
an oid-only file name concept. FYI, Informix SE uses this the
tablename_oid concept in their implementation.Keeping that flat file in sync with the database will be a royal pain.
Imagine the concurrency problems keeping it up to date.
I'm just a lurker here, and not familiar with postgres internals, so
this suggestion could easily be so ignorant that it's simply not worth
it to even respond.
Caveats aside, it occurs to me that a possible compromise might be to
name tables files by OID, but put them in directories that are named
for the tables themselves.
Bruce has to use du -s rather than ls -l, but he can still achieve the
same end (measuring space used by particular tables), while allowing
the tables to be named by OID, which means that we could get the
benefits that accrue from that.
This actually occured to me when the whole "tablespace" discussion
came up a couple of months ago---by using a different directory for
each table, it would suddenly become very easy to split up a database
across spindles with what would seem to be at least adequate control.
Again, I am sufficiently ignorant of postgres internals---I just read
the list, I haven't really looked at the code---that this is probably
utterly untenable.
Mike.
From bouncefilter Wed Mar 8 13:46:27 2000
Received: from localhost (IDENT:root@hectic-1.jpl.nasa.gov [128.149.68.203])
by hub.org (8.9.3/8.9.3) with ESMTP id IAA16762;
Wed, 8 Mar 2000 08:58:02 -0500 (EST)
(envelope-from lockhart@alumni.caltech.edu)
Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1])
by localhost (8.8.7/8.8.7) with ESMTP id OAA25925;
Wed, 8 Mar 2000 14:06:35 GMT
Sender: lockhart@hub.org
Message-ID: <38C65E6B.8A85B123@alumni.caltech.edu>
Date: Wed, 08 Mar 2000 14:06:35 +0000
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Michael Meskes <meskes@postgreSQL.org>
CC: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] library policy question
References: <20000307155745.A1251@fam-meskes.de>
<20377.952446844@sss.pgh.pa.us>
<20000307202510.A1211@fam-meskes.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
And what shall I do with sqlca? Make every program define it in its own
space?
My vague recollection is that embedded SQL doesn't multithread very
well for exactly this reason. You may be stuck with a global variable
for that case...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California
From bouncefilter Wed Mar 8 13:29:53 2000
Received: from feivel.fam-meskes.de (p3E9C2DC7.dip0.t-ipconnect.de
[62.156.45.199]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA96851
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 10:43:14 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: by feivel.fam-meskes.de (Postfix, from userid 1000)
id AF4B72BC0F; Wed, 8 Mar 2000 16:30:10 +0100 (CET)
Date: Wed, 8 Mar 2000 16:30:10 +0100
From: Michael Meskes <meskes@postgreSQL.org>
To: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] library policy question
Message-ID: <20000308163010.A512@fam-meskes.de>
Mail-Followup-To: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
References: <20000307155745.A1251@fam-meskes.de>
<20377.952446844@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0.1i
In-Reply-To: <20377.952446844@sss.pgh.pa.us>;
from tgl@sss.pgh.pa.us on Tue, Mar 07, 2000 at 11:34:04AM -0500
Sender: michael@fam-meskes.de
On Tue, Mar 07, 2000 at 11:34:04AM -0500, Tom Lane wrote:
What exactly is our policy towards global variables in libraries?
Avoid them.
Maybe I've got a brain lock for the moment but what do I do to the list of
connections I have to handle? Since it is used in several functions I cannot
see how to program this without a global variable albeit a static one. What
I need is a mapping of the SQL conenction name to the PGconn structure.
I also wonder if multiple threads should be allowed access to the same
structure, i.e. if one thread opens a new connection should the other one be
allowed to access this too?
BTW libpgeasy does not seem to be able to be used in multi-threading
environments either. Is this library still supported?
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Wed Mar 8 13:28:38 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA09086
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 11:16:01 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA25461;
Wed, 8 Mar 2000 11:15:56 -0500 (EST)
To: "Hiroshi Inoue" <Inoue@tpf.co.jp>
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-reply-to: <000b01bf88e6$d7ac1d60$2801007e@tpf.co.jp>
References: <000b01bf88e6$d7ac1d60$2801007e@tpf.co.jp>
Comments: In-reply-to "Hiroshi Inoue" <Inoue@tpf.co.jp>
message dated "Wed, 08 Mar 2000 19:12:43 +0900"
Date: Wed, 08 Mar 2000 11:15:56 -0500
Message-ID: <25458.952532156@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
Is it necessary to get the relation path name from the relation name/oid etc
each time ?
Is it bad to keep the relation path name in pg_class(or another relation) ?
Hmm, we could maybe do that for user relations, but it obviously would
not work for pg_class itself. I'm a little worried about trying to do
it for the other critical system relations, too. We'd want to keep the
relation's pathname in its relcache entry, so any system relation that
is read while setting up a relcache entry has to have a fixed path that
can be determined without a relcache entry.
Perhaps it would be good enough to say that all system relations live in
the database's primary directory, and only user relations have pathnames
specified in their pg_class entries. Renaming a system table would be
a Really Bad Idea anyway ;-)
regards, tom lane
From bouncefilter Wed Mar 8 13:28:58 2000
Received: from www.actarg.com (root@[209.180.91.25])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA09929;
Wed, 8 Mar 2000 11:19:56 -0500 (EST) (envelope-from kyle@actarg.com)
Received: from actarg.com (root@tao.actarg.com [192.168.2.1])
by www.actarg.com (8.8.7/8.8.7) with ESMTP id JAA31517;
Wed, 8 Mar 2000 09:20:01 -0700
Received: from actarg.com (kyle@chi.actarg.com [192.168.2.16])
by actarg.com (8.8.7/8.8.7) with ESMTP id JAA22676;
Wed, 8 Mar 2000 09:17:07 -0700
Sender: kyle@actarg.com
Message-ID: <38C67E39.DA7EE8A5@actarg.com>
Date: Wed, 08 Mar 2000 09:22:17 -0700
From: Kyle Bateman <kyle@actarg.com>
Organization: Action Target Inc
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: pgsql-sql@postgreSQL.org, pgsql-hackers@postgreSQL.org
Subject: Re: Casts in 7.0 vs 6.5 (was Re: [SQL] 7.0beta bug (or feature)?)
References: <38C0022D.B30A7536@actarg.com> <22705.952473593@sss.pgh.pa.us>
Content-Type: multipart/mixed; boundary="------------162D10C4F2EDC56708CB7589"
This is a multi-part message in MIME format.
--------------162D10C4F2EDC56708CB7589
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
I am not sure whether this should be regarded as a bug or a feature.
On the one hand you could argue that ambiguous casts are a bad thing,
but on the other hand, if text(foo) works, why shouldn't foo::text work?One thing to realize while considering whether to change this is that if
we generalize the behavior of casts, we may also affect the behavior of
implicit casts, such as the one applied to convert supplied data in an
INSERT or UPDATE to the target column type. This could result in loss
of error detection capability. Currently, both 6.5 and 7.0 do this:regression=# create table foo(f1 text);
CREATE
regression=# insert into foo values('now'::date);
ERROR: Attribute 'f1' is of type 'text' but expression is of type 'date'
You will need to rewrite or cast the expressionbut if we allow datevalue::text to work, then (barring still more
pushups in the code) the above will be accepted. Should it be?Comments anyone?
What if you could to a "set AutoCasting=yes" just as you might set the
datestyle variable. Then the DBA could decide whether type mismatches
should be quitely translated or reported?
--------------162D10C4F2EDC56708CB7589
Content-Type: text/x-vcard; charset=us-ascii;
name="kyle.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Kyle Bateman
Content-Disposition: attachment;
filename="kyle.vcf"
begin:vcard
n:Bateman;Kyle
tel;fax:801-377-8096
tel;work:801-377-8033x101
x-mozilla-html:FALSE
url:www.actiontarget.com
org:Action Target Inc
adr:;;PO Box 636;Provo;UT;84603;US
version:2.1
email;internet:kyle@actiontarget.com
title:President
x-mozilla-cpt:;-15520
fn:Kyle Bateman
end:vcard
--------------162D10C4F2EDC56708CB7589--
From bouncefilter Wed Mar 8 13:28:36 2000
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA11377
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 11:26:16 -0500 (EST)
(envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id RAA03344
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 17:26:14 +0100
Date: Wed, 8 Mar 2000 17:26:14 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: regex (from TODO)
Message-ID: <Pine.LNX.3.96.1000308165759.14462D-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In the PostgreSQL TODO is "Get faster regex() code from Henry Spencer..".
I look at current available regex used (a example) in apache, php, .etc. But
if I look at changes (via diff) between PostgreSQL's regex and more new
regex in PHP4 it is very same. A differentions are that in new regex code
are all values marks as 'register' and this new regex not support MULTIBYTE.
It is without any relevant changes (or 'register' is really fastly?).
What means TODO?
The PG's regex use malloc -- why not MemoryContext?
Karel
From bouncefilter Wed Mar 8 13:39:11 2000
Received: from ara.zf.jcu.cz (zakkr@ara.zf.jcu.cz [160.217.161.4])
by hub.org (8.9.3/8.9.3) with ESMTP id LAA12977
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 11:33:42 -0500 (EST)
(envelope-from zakkr@zf.jcu.cz)
Received: from localhost (zakkr@localhost)
by ara.zf.jcu.cz (8.9.3/8.9.3/Debian/GNU) with SMTP id RAA03725
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 17:33:40 +0100
Date: Wed, 8 Mar 2000 17:33:39 +0100 (CET)
From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: [HACKERS] SPI and qCache and bug?
In-Reply-To: <Pine.LNX.3.96.1000302170814.3304F-100000@ara.zf.jcu.cz>
Message-ID: <Pine.LNX.3.96.1000308173104.14462F-100000@ara.zf.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Still quiet for this question? Hmm.. (not interesting?)
On Thu, 2 Mar 2000, Karel Zak - Zakkr wrote:
Hi,
query cache hacking continue ...
I just implement my (context-per-plan) query cache (qCache) to SPI.
Changed:
SPI_saveplan() - save plan to qcache instead to never
unallocated TopMemoryContext.New:
SPI_saveplan_by_key() - save plan to qcache under specifited hash
key. This is needful if user define key oneself or if key must be
binary (non-string) - example Jan use any struct as hash key in RI's
triggers.)SPI_execp_by_key() - same as SPI_execp(), but as arg is hash key
only, (again, it is needful for (example) RI).
- you not need pointer to plan, you can use key onlySPI_freeplan() - remove plan from qcache and destroy all
memory associate with plan. It is end of the TopMemoryContext
feeding :-)Comments?
A question: I look at the current PG's SPI and (IMHO) is here a little
performance bug. Very often is used SPI_prepare() and SPI_saveplan()
together and without any relevant code between these routines. But see:SPI_prepare() - call 2x copyObject() and copy data to procedure
context- well, if you need pquery plans in this context it is OK, but
SPI_saveplan() - call 2x copyObject() and copy (same) data to
TopMemoryContext (or in future to qCache)SPI_execp() - call 2x copyObject() and copy data back to current
context- hmm, it copy twice all data, but without any efect.
IMHO is solution any SPI_prepare_and_save() and copy data only to
TopMemoryContext (or to qCache), we not need data in procedure context
(as it copy SPI_prepare), because SPI_execp() copy it to wanted context
itself.The SPI performance will interesting if RI will in real life...
Karel
From bouncefilter Wed Mar 8 13:33:20 2000
Received: from pille.addcom.de (qmailr@h-62.96.128.34.host.de.colt.net
[62.96.128.34]) by hub.org (8.9.3/8.9.3) with SMTP id MAA19266
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 12:00:22 -0500 (EST)
(envelope-from michael@fam-meskes.de)
Received: (qmail 19187 invoked from network); 8 Mar 2000 17:00:41 -0000
Received: from h-62.96.150.28.host.de.colt.net (HELO feivel.fam-meskes.de)
(62.96.150.28)
by pille.addcom.de with SMTP; 8 Mar 2000 17:00:41 -0000
Received: by feivel.fam-meskes.de (Postfix, from userid 1000)
id 27A092BC41; Wed, 8 Mar 2000 17:40:34 +0100 (CET)
Date: Wed, 8 Mar 2000 17:40:34 +0100
From: Michael Meskes <meskes@postgreSQL.org>
To: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] library policy question
Message-ID: <20000308174034.A1802@fam-meskes.de>
Mail-Followup-To: PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
References: <20000307155745.A1251@fam-meskes.de>
<20377.952446844@sss.pgh.pa.us>
<20000307202510.A1211@fam-meskes.de>
<38C65E6B.8A85B123@alumni.caltech.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0.1i
In-Reply-To: <38C65E6B.8A85B123@alumni.caltech.edu>;
from lockhart@alumni.caltech.edu on Wed, Mar 08, 2000 at
02:06:35PM +0000
Sender: michael@fam-meskes.de
On Wed, Mar 08, 2000 at 02:06:35PM +0000, Thomas Lockhart wrote:
My vague recollection is that embedded SQL doesn't multithread very
well for exactly this reason. You may be stuck with a global variable
for that case...
I was afraid you'd say that. So I can use lots of global vars since libecpg
does not multithread anyway. :-)
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De | Use PostgreSQL!
From bouncefilter Wed Mar 8 13:27:29 2000
Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net
[194.217.242.41]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA17548
for <hackers@postgresql.org>; Wed, 8 Mar 2000 11:53:13 -0500 (EST)
(envelope-from emkxp01@mtcc.demon.co.uk)
Received: from mtcc.demon.co.uk ([158.152.183.103])
by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1)
id 12Sjhr-000EbU-0C
for hackers@postgreSQL.org; Wed, 8 Mar 2000 16:53:08 +0000
Received: from mtcc by mtcc.demon.co.uk (8.9.1b+Sun/SMI-SVR4)
id QAA12281; Wed, 8 Mar 2000 16:52:25 GMT
Message-Id: <200003081652.QAA12281@mtcc.demon.co.uk>
Date: Wed, 8 Mar 2000 16:52:25 +0000 (GMT)
From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Reply-To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: Regression test failure (runcheck)
To: hackers@postgreSQL.org
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: rgb1FoQGk0eT5/Dy2nJPWg==
X-Mailer: dtmail 1.3.0 CDE Version 1.3 SunOS 5.7 sun4m sparc
Hi,
The regression test script runcheck.sh doesn't seem able to
handle the blank line on the end of the resultmap file.
Here's a patch to remove it!!
Keith.
*** src/test/regress/resultmap.orig Wed Mar 8 16:48:28 2000
--- src/test/regress/resultmap Wed Mar 8 16:48:38 2000
***************
*** 25,28 ****
horology/sparc-sun-solaris=horology-solaris-1947
abstime/sparc-sun-solaris=abstime-solaris-1947
tinterval/sparc-sun-solaris=tinterval-solaris-1947
-
--- 25,27 ----
From bouncefilter Wed Mar 8 13:39:34 2000
Received: from clio.trends.ca (root@clio.trends.ca [209.47.148.2])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA26850
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 12:37:50 -0500 (EST)
(envelope-from eloehr@austin.rr.com)
Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54])
by clio.trends.ca (8.9.3+Sun/8.9.3) with ESMTP id MAA15489
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 12:16:30 -0500 (EST)
Received: from austin.rr.com ([24.93.58.117]) by mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Wed, 8 Mar 2000 11:17:16 -0600
Sender: ed@clio.trends.ca
Message-ID: <38C68B96.909FF724@austin.rr.com>
Date: Wed, 08 Mar 2000 11:19:18 -0600
From: Ed Loehr <eloehr@austin.rr.com>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: pghackers <pgsql-hackers@postgreSQL.org>
Subject: [HACKERS] Transaction abortions & recovery handling
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Using perl DBI, I would like to catch a backend error and, if the
pgsql error string matches a particular regex (/ExecInitIndexScan:
both left and right op's are rel-vars/), vacuum on the fly and
immediately resubmit the query within the same transaction.
[Vacuuming has sometimes worked as a temporary fix to the problem.]
The immediate problem seems to be that once the backend fails on a
query within a transaction, the client is not permitted to do any more
queries within that transaction, giving this msg:
NOTICE: (transaction aborted): queries ignored until END
Any suggestions on how I might handle this?
Regards,
Ed Loehr
From bouncefilter Wed Mar 8 13:59:24 2000
Received: from henry.newn.cam.ac.uk (henry.newn.cam.ac.uk [131.111.204.130])
by hub.org (8.9.3/8.9.3) with ESMTP id NAA52619
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 13:58:37 -0500 (EST)
(envelope-from prlw1@newn.cam.ac.uk)
Received: from [131.111.204.180] (helo=quartz.newn.cam.ac.uk)
by henry.newn.cam.ac.uk with esmtp (Exim 2.12 #1)
id 12SlfP-0007ZY-00; Wed, 8 Mar 2000 18:58:43 +0000
Received: from prlw1 by quartz.newn.cam.ac.uk with local (Exim 2.12 #1)
id 12SlfA-0007YR-00; Wed, 8 Mar 2000 18:58:28 +0000
Date: Wed, 8 Mar 2000 18:58:28 +0000
From: Patrick Welche <prlw1@newn.cam.ac.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] alter_table.sql
Message-ID: <20000308185828.A29001@quartz.newn.cam.ac.uk>
Reply-To: prlw1@cam.ac.uk
References: <20000307145227.H9329@quartz.newn.cam.ac.uk>
<20333.952445948@sss.pgh.pa.us>
<20000307164031.L9329@quartz.newn.cam.ac.uk>
<20484.952448489@sss.pgh.pa.us>
<20000307172215.M9329@quartz.newn.cam.ac.uk>
<20877.952457372@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.1.1i
In-Reply-To: <20877.952457372@sss.pgh.pa.us>;
from tgl@sss.pgh.pa.us on Tue, Mar 07, 2000 at 02:29:32PM -0500
On Tue, Mar 07, 2000 at 02:29:32PM -0500, Tom Lane wrote:
Hmm. Since there have been examples of vacuum analyze <tablename> in
the numeric regress test since 6.5, I'd think we'd have heard about it
if there were any widespread problem ;-). Perhaps it is a platform
issue, but I suspect you will find there are additional constraints that
explain why no one but you is seeing it. Please do dig into it ... or,
if you do not have time, you could consider giving one of the other
developers a login on your machine and that person could check it out.
Story so far: I have a table called "found". vacuum() in src/backend/commands/vacuum.c
gets called with vacrel="found". During vc_init() at line 177, vacrel is cleared (="").
More tomorrow...
Cheers,
Patrick
From bouncefilter Wed Mar 8 14:30:25 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA72006
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 14:30:01 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id OAA26436;
Wed, 8 Mar 2000 14:29:36 -0500 (EST)
To: prlw1@cam.ac.uk
cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] alter_table.sql
In-reply-to: <20000308185828.A29001@quartz.newn.cam.ac.uk>
References: <20000307145227.H9329@quartz.newn.cam.ac.uk>
<20333.952445948@sss.pgh.pa.us>
<20000307164031.L9329@quartz.newn.cam.ac.uk>
<20484.952448489@sss.pgh.pa.us>
<20000307172215.M9329@quartz.newn.cam.ac.uk>
<20877.952457372@sss.pgh.pa.us>
<20000308185828.A29001@quartz.newn.cam.ac.uk>
Comments: In-reply-to Patrick Welche <prlw1@newn.cam.ac.uk>
message dated "Wed, 08 Mar 2000 18:58:28 +0000"
Date: Wed, 08 Mar 2000 14:29:36 -0500
Message-ID: <26433.952543776@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Patrick Welche <prlw1@newn.cam.ac.uk> writes:
Story so far: I have a table called "found". vacuum() in
src/backend/commands/vacuum.c gets called with vacrel="found". During
vc_init() at line 177, vacrel is cleared (="").
What the ???
Somebody broke this code badly since I last looked at it. The vacuum
initialization sequence has been rearranged so that it does not work:
there is a CommitTransactionCommand call that occurs before the vacuum
parameters have been copied into safe-across-transactions storage.
We are reading already-freed memory at line 186.
Will fix ASAP.
BTW, this also demonstrates that the CLOBBER_FREED_MEMORY testing hack
I put into aset.c needs more work; it ought to clobber implicitly-freed
memory as well as explicitly pfree'd blocks. Had I done that I would
probably have seen a regression test failure from this bug. Will add
some more clobbering code and see what else breaks ;-)
regards, tom lane
From bouncefilter Wed Mar 8 14:36:24 2000
Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA04220
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 14:36:16 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
OAA04523;
Wed, 8 Mar 2000 14:33:44 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003081933.OAA04523@candle.pha.pa.us>
Subject: Re: [HACKERS] regex (from TODO)
In-Reply-To: <Pine.LNX.3.96.1000308165759.14462D-100000@ara.zf.jcu.cz> from
Karel Zak - Zakkr at "Mar 8, 2000 05:26:14 pm"
To: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
Date: Wed, 8 Mar 2000 14:33:44 -0500 (EST)
CC: pgsql-hackers <pgsql-hackers@postgreSQL.org>
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
In the PostgreSQL TODO is "Get faster regex() code from Henry Spencer..".
I look at current available regex used (a example) in apache, php, .etc. But
if I look at changes (via diff) between PostgreSQL's regex and more new
regex in PHP4 it is very same. A differentions are that in new regex code
are all values marks as 'register' and this new regex not support MULTIBYTE.
It is without any relevant changes (or 'register' is really fastly?).What means TODO?
The PG's regex use malloc -- why not MemoryContext?
Henry has new code that is faster, and he has put it only in TCL so far.
I am waiting for a library version of it that we can include.
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Mar 8 14:38:24 2000
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA11835
for <hackers@postgreSQL.org>; Wed, 8 Mar 2000 14:37:46 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
OAA04690;
Wed, 8 Mar 2000 14:35:01 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003081935.OAA04690@candle.pha.pa.us>
Subject: Re: [HACKERS] Regression test failure (runcheck)
In-Reply-To: <200003081652.QAA12281@mtcc.demon.co.uk> from Keith Parks at "Mar
8, 2000 04:52:25 pm"
To: Keith Parks <emkxp01@mtcc.demon.co.uk>
Date: Wed, 8 Mar 2000 14:35:01 -0500 (EST)
CC: hackers@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Applied.
Hi,
The regression test script runcheck.sh doesn't seem able to
handle the blank line on the end of the resultmap file.Here's a patch to remove it!!
Keith.
*** src/test/regress/resultmap.orig Wed Mar 8 16:48:28 2000 --- src/test/regress/resultmap Wed Mar 8 16:48:38 2000 *************** *** 25,28 **** horology/sparc-sun-solaris=horology-solaris-1947 abstime/sparc-sun-solaris=abstime-solaris-1947 tinterval/sparc-sun-solaris=tinterval-solaris-1947 - --- 25,27 ----************
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Mar 8 14:50:24 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA38368;
Wed, 8 Mar 2000 14:50:15 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id OAA26522;
Wed, 8 Mar 2000 14:49:32 -0500 (EST)
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
cc: Michael Meskes <meskes@postgreSQL.org>,
PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] library policy question
In-reply-to: <38C65E6B.8A85B123@alumni.caltech.edu>
References: <20000307155745.A1251@fam-meskes.de>
<20377.952446844@sss.pgh.pa.us>
<20000307202510.A1211@fam-meskes.de>
<38C65E6B.8A85B123@alumni.caltech.edu>
Comments: In-reply-to Thomas Lockhart <lockhart@alumni.caltech.edu>
message dated "Wed, 08 Mar 2000 14:06:35 +0000"
Date: Wed, 08 Mar 2000 14:49:32 -0500
Message-ID: <26519.952544972@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
And what shall I do with sqlca? Make every program define it in its own
space?
My vague recollection is that embedded SQL doesn't multithread very
well for exactly this reason. You may be stuck with a global variable
for that case...
Aside from the unthreadable API, ecpg has another potential threading
problem: it depends on a lexer and parser that might or might not be
thread-safe, depending on what they were generated with.
I'd advise just labeling ecpg "not threadable" :-(. Not much point in
breaking existing apps by changing the API, when you still won't be able
to guarantee thread safeness...
regards, tom lane
From bouncefilter Wed Mar 8 14:55:24 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id OAA44776
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 14:54:42 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id OAA26546;
Wed, 8 Mar 2000 14:54:23 -0500 (EST)
To: Ed Loehr <eloehr@austin.rr.com>
cc: pghackers <pgsql-hackers@postgreSQL.org>
Subject: Re: [HACKERS] Transaction abortions & recovery handling
In-reply-to: <38C68B96.909FF724@austin.rr.com>
References: <38C68B96.909FF724@austin.rr.com>
Comments: In-reply-to Ed Loehr <eloehr@austin.rr.com>
message dated "Wed, 08 Mar 2000 11:19:18 -0600"
Date: Wed, 08 Mar 2000 14:54:23 -0500
Message-ID: <26543.952545263@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Ed Loehr <eloehr@austin.rr.com> writes:
Any suggestions on how I might handle this?
Er ... run 7.0beta ? Probably a cleaner answer than hacking up your
app to implement an incomplete workaround for that 6.5 bug.
Year before last, I moved my company's production applications onto
a pre-alpha 6.4 snapshot, because we were getting killed by a bad bug
in 6.3.*. It made me pretty nervous, but guess what: we didn't have
any problems.
regards, tom lane
From bouncefilter Wed Mar 8 15:15:25 2000
Received: from thelab.hub.org (nat195.52.mpoweredpc.net [142.177.195.52])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA53000
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 15:14:32 -0500 (EST)
(envelope-from scrappy@hub.org)
Received: from localhost (scrappy@localhost)
by thelab.hub.org (8.9.3/8.9.3) with ESMTP id QAA37632;
Wed, 8 Mar 2000 16:12:38 -0400 (AST) (envelope-from scrappy@hub.org)
X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs
Date: Wed, 8 Mar 2000 16:12:38 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
To: Bruce Momjian <pgman@candle.pha.pa.us>
cc: Thomas Lockhart <lockhart@alumni.caltech.edu>,
Lamar Owen <lamar.owen@wgcr.org>, Tom Lane <tgl@sss.pgh.pa.us>,
Mike Mascari <mascarm@mascari.com>, Peter Eisentraut <peter_e@gmx.net>,
Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <200003080554.AAA15390@candle.pha.pa.us>
Message-ID: <Pine.BSF.4.21.0003081607320.591-100000@thelab.hub.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 8 Mar 2000, Bruce Momjian wrote:
But with Postgres, we can write a utility to do this for us, so I
think that it isn't so much of an issue. In fact, perhaps we could
have a backend function which could do this, so we could query the
sizes directly.Does not work if the table was accidentally deleted. Also requires the
backend to be running.
For ppl that aim ourselves at providing for data integrity, we sure have a
lot of "if the table was accidentally deleted" problems with poor
solutions, no? :)
IMHO, we are basically supporting ppl *not* doing regular backups of their
data ... most, if not all, of the problems that ppl feel exist that
requires the use of 'flat files', IMHO, aren't big problems if properly
backup procedures are followed ...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From bouncefilter Wed Mar 8 16:17:26 2000
Received: from www.wgcr.org (IDENT:root@www.wgcr.org [206.74.232.194])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA70321
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 16:16:54 -0500 (EST)
(envelope-from lamar.owen@wgcr.org)
Received: from wgcr.org (dial-14.r15.ncbrvr.InfoAve.Net [207.144.84.214])
by www.wgcr.org (8.9.3/8.9.3/WGCR) with ESMTP id QAA17550;
Wed, 8 Mar 2000 16:16:06 -0500
Message-ID: <38C6C2FC.1DC645A4@wgcr.org>
Date: Wed, 08 Mar 2000 16:15:40 -0500
From: Lamar Owen <lamar.owen@wgcr.org>
Organization: WGCR Internet Radio
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: The Hermit Hacker <scrappy@hub.org>
CC: Bruce Momjian <pgman@candle.pha.pa.us>,
Thomas Lockhart <lockhart@alumni.caltech.edu>,
Tom Lane <tgl@sss.pgh.pa.us>, Mike Mascari <mascarm@mascari.com>,
Peter Eisentraut <peter_e@gmx.net>, Tatsuo Ishii <t-ishii@sra.co.jp>,
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
References: <Pine.BSF.4.21.0003081607320.591-100000@thelab.hub.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The Hermit Hacker wrote:
IMHO, we are basically supporting ppl *not* doing regular backups of their
data ... most, if not all, of the problems that ppl feel exist that
requires the use of 'flat files', IMHO, aren't big problems if properly
backup procedures are followed ...
I suggested the 'flat-file' more as a compromise than anything else.
(Although it kindof backfired :-(). Technically speaking, my
'flat-file' is trading the flat-file in the OS's filesystem (the
directory) with a separate flat-file. Little to no admin difference
from my point of view.
The problem that Bruce is talking about occurs when you try to restore
(from a properly built off-line binary backup) a single table or small
set of tables. It doesn't have anything to do with supporting people
who won't do proper backups, IMO.
Of course, I personally use on-line pg_dump backups and feed into psql
for on-line restore -- which doesn't require knowing anything about the
underlying filesystem structures.
So, the dichotomy is between those who want to admin at the OS file
level versus those who feel the backend should hide all those details
from the admin. At least that's how istm.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
From bouncefilter Wed Mar 8 16:20:25 2000
Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu
[128.42.12.154])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA70965
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 16:20:05 -0500 (EST)
(envelope-from reedstrm@wallace.ece.rice.edu)
Received: by wallace.ece.rice.edu via sendmail from stdin
id <m12Snrr-000LELC@wallace.ece.rice.edu> (Debian Smail3.2.0.102)
for pgsql-hackers@postgresql.org; Wed, 8 Mar 2000 15:19:43 -0600 (CST)
Date: Wed, 8 Mar 2000 15:19:43 -0600
From: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Message-ID: <20000308151943.A22438@rice.edu>
References: <200003080706.CAA17536@candle.pha.pa.us>
<24574.952504877@sss.pgh.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0i
In-Reply-To: <24574.952504877@sss.pgh.pa.us>;
from tgl@sss.pgh.pa.us on Wed, Mar 08, 2000 at 03:41:17AM -0500
On Wed, Mar 08, 2000 at 03:41:17AM -0500, Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Bruce seems to be willing to accept a window of failure for RENAME
TABLE in order to make database admin easier. That is very possibly
the right tradeoff --- but it is *not* an open-and-shut decision.
We need to talk about it.How about creating a hard link during RENAME, and you can just remove
the old link on commit or remove the new link on transaction rollback?Still non-atomic as far as I can see...
And there doesn't seem to be an obvious way to extend it to the DROP
TABLE case. Hmm, on second thought, to rollback DROP TABLE we'll need to
'hide' the table from the current transaction: one way would be to rename
it, then do the drop at commit time.
Regardless, since I think there are other, SQL92 standard driven reasons to
break the relname == filename link, I decided to go ahead and see how hard
coding it would be, and how much code might be depending on that behavior.
Looked like it was going to be very simple: the RelationGetRelationName
and RelationGetPhysicalRelationName macros encapsulate access to the
(relation)->rd_rel->relname structure member pretty effectively (thanks
to Bruce's temp. relation work, I presume)
As a first crack, I decided to use the oid for the filename, just because
it simplified the chamges to the Macro, and there was already an oidout()
builtin that'd do the palloc for me ;-)
<some time latter...>
Well, ... it is, as they say, a Small Matter of Programming. I now know
a lot more about the bootstrap process, and the relcache, I can tell you!
Most problems where code that used RelationGetPhysicalRelationName
when they it should use RelationGetRelationName. In several cases,
the code assumed RelationGetPhysicalRelationName handed them a
pointer to rd_rel->relname, which they copy into! I substituted
RelationGetRelationName for all these cases.
There's some uglyness with SharedSystemRelations, as well. I just hacked
in hard coded numbers where ever I found hardcoded relation names, for
an inital test of principle.
I've got a version running, and I can type at a standalone backend:
still some problems with initdb: the pg_log, pg_shadow and pg_user
relations don't get created: I cheated and copied the first two from my
'current' install. That got the backend up, either standalone, or as
postmaster. It'll even accept connections from pgsql: just errors a lot,
since pg_user isn't there!
However, typing at the backend, I can create tables, insert, delete,
start transactions, rollback, etc. Basically, everything works.
Suffice to say, altering the physical storage name is not too difficult,
if _I_ can get this far in just a few hours. Whatever we decide for
'policy' on the name issue (and now that I've generated it, I can tell
you that a directory full of numbers is _really_ ugly) implementation
should go easily.
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
From bouncefilter Wed Mar 8 18:27:27 2000
Received: from candle.pha.pa.us (pgman@s5-03.ppp.op.net [209.152.195.67])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA40632
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 18:26:31 -0500 (EST)
(envelope-from pgman@candle.pha.pa.us)
Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id
SAA07123;
Wed, 8 Mar 2000 18:24:35 -0500 (EST)
From: Bruce Momjian <pgman@candle.pha.pa.us>
Message-Id: <200003082324.SAA07123@candle.pha.pa.us>
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
In-Reply-To: <20000308151943.A22438@rice.edu> from "Ross J. Reedstrom" at "Mar
8, 2000 03:19:43 pm"
To: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
Date: Wed, 8 Mar 2000 18:24:35 -0500 (EST)
CC: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Looked like it was going to be very simple: the RelationGetRelationName
and RelationGetPhysicalRelationName macros encapsulate access to the
(relation)->rd_rel->relname structure member pretty effectively (thanks
to Bruce's temp. relation work, I presume)
Yes.
As a first crack, I decided to use the oid for the filename, just because
it simplified the chamges to the Macro, and there was already an oidout()
builtin that'd do the palloc for me ;-)<some time latter...>
Well, ... it is, as they say, a Small Matter of Programming. I now know
a lot more about the bootstrap process, and the relcache, I can tell you!Most problems where code that used RelationGetPhysicalRelationName
when they it should use RelationGetRelationName. In several cases,
the code assumed RelationGetPhysicalRelationName handed them a
pointer to rd_rel->relname, which they copy into! I substituted
RelationGetRelationName for all these cases.
Please send in a patch on those if they need to be corrected, OK?
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From bouncefilter Wed Mar 8 18:53:27 2000
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2])
by hub.org (8.9.3/8.9.3) with ESMTP id SAA73861
for <pgsql-hackers@postgreSQL.org>; Wed, 8 Mar 2000 18:52:27 -0500 (EST)
(envelope-from tgl@sss.pgh.pa.us)
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id SAA06634;
Wed, 8 Mar 2000 18:51:37 -0500 (EST)
To: prlw1@cam.ac.uk, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] alter_table.sql
In-reply-to: <26433.952543776@sss.pgh.pa.us>
References: <20000307145227.H9329@quartz.newn.cam.ac.uk>
<20333.952445948@sss.pgh.pa.us>
<20000307164031.L9329@quartz.newn.cam.ac.uk>
<20484.952448489@sss.pgh.pa.us>
<20000307172215.M9329@quartz.newn.cam.ac.uk>
<20877.952457372@sss.pgh.pa.us>
<20000308185828.A29001@quartz.newn.cam.ac.uk>
<26433.952543776@sss.pgh.pa.us>
Comments: In-reply-to Tom Lane <tgl@sss.pgh.pa.us>
message dated "Wed, 08 Mar 2000 14:29:36 -0500"
Date: Wed, 08 Mar 2000 18:51:37 -0500
Message-ID: <6631.952559497@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
Story so far: I have a table called "found". vacuum() in
src/backend/commands/vacuum.c gets called with vacrel="found". During
vc_init() at line 177, vacrel is cleared (="").
Somebody broke this code badly since I last looked at it.
Fix committed to CVS.
regards, tom lane
From bouncefilter Wed Mar 8 19:11:27 2000
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA82077
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 19:10:40 -0500 (EST)
(envelope-from eloehr@austin.rr.com)
Received: from austin.rr.com ([24.93.58.117]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Wed, 8 Mar 2000 17:59:51 -0600
Sender: ed
Message-ID: <38C6ECA5.AA30DE1@austin.rr.com>
Date: Wed, 08 Mar 2000 18:13:25 -0600
From: Ed Loehr <eloehr@austin.rr.com>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tom Lane <tgl@sss.pgh.pa.us>
CC: pghackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Transaction abortions & recovery handling
References: <38C68B96.909FF724@austin.rr.com> <26543.952545263@sss.pgh.pa.us>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Tom Lane wrote:
Ed Loehr <eloehr@austin.rr.com> writes:
Any suggestions on how I might handle this?
Er ... run 7.0beta ? Probably a cleaner answer than hacking up your
app to implement an incomplete workaround for that 6.5 bug.Year before last, I moved my company's production applications onto
a pre-alpha 6.4 snapshot, because we were getting killed by a bad bug
in 6.3.*. It made me pretty nervous, but guess what: we didn't have
any problems.
I was sure that would be someone's first response. I'd like to
express my perspective and
see if you still stick with your advice...
[flame suit on]
My system is live. As such, I really don't want to trade this known
problem for (unknown) additional adjustments to 7.0beta right now
(pg_dump & views, not null unique, etc), also due to my own time
constraints. Based on recent threads on this list, I have the
impression that 7.0beta is not quite ready for production. The recent
flaming of one fellow for, among other things, using it in his
near-production system reinforced my impression. Before I get derided
and flamed, let me admit I haven't tracked all these issues to their
conclusion, nor am I watching cvs for fixes.
[flame suit off]
Additionally, I already have the app code in place to catch the error
& vacuum, and I think it has even worked in the past, though something
has apparently changed on my end to make that cease.
Having said all that, do you still advise 7.0beta for production? Or
might there be a simple workaround to my original question?
OK, flame away...
Regards,
Ed Loehr
From bouncefilter Wed Mar 8 19:23:28 2000
Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu
[128.42.12.154])
by hub.org (8.9.3/8.9.3) with ESMTP id TAA86333
for <pgsql-hackers@postgresql.org>; Wed, 8 Mar 2000 19:22:37 -0500 (EST)
(envelope-from reedstrm@wallace.ece.rice.edu)
Received: by wallace.ece.rice.edu via sendmail from stdin
id <m12Sqia-000LGMC@wallace.ece.rice.edu> (Debian Smail3.2.0.102)
for pgsql-hackers@postgresql.org; Wed, 8 Mar 2000 18:22:20 -0600 (CST)
Date: Wed, 8 Mar 2000 18:22:20 -0600
From: "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Message-ID: <20000308182220.A31129@rice.edu>
References: <20000308151943.A22438@rice.edu>
<200003082324.SAA07123@candle.pha.pa.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0i
In-Reply-To: <200003082324.SAA07123@candle.pha.pa.us>;
from pgman@candle.pha.pa.us on Wed, Mar 08, 2000 at 06:24:35PM
-0500
On Wed, Mar 08, 2000 at 06:24:35PM -0500, Bruce Momjian wrote:
Looked like it was going to be very simple: the RelationGetRelationName
and RelationGetPhysicalRelationName macros encapsulate access to the
(relation)->rd_rel->relname structure member pretty effectively (thanks
to Bruce's temp. relation work, I presume)Yes.
Well, thank you, then ;-)
Most problems where code that used RelationGetPhysicalRelationName
when they it should use RelationGetRelationName. In several cases,
the code assumed RelationGetPhysicalRelationName handed them a
pointer to rd_rel->relname, which they copy into! I substituted
RelationGetRelationName for all these cases.Please send in a patch on those if they need to be corrected, OK?
Once I'm sure it's the Right Thing To Do, I will. That's probably
the only clean part of the ugly hack I've done so far.
I've got a complete system up, now. For some reason, the bootstrapping
in initdb doesn't create the pg_log (or pg_shadow!) relations, even
though the same step on a clean CVS tree does. Can't quite find why. So,
the non-bootstrap connections in initdb (creating all the system views)
then fail. If I manually copy the pg_log and pg_shadow files over from
'current' to 'hacked', I can then run the code from initdb by hand,
and get a fully functional system.
I went ahead and ifdefed out the rename() in renamerel(). Low and behold,
I can rollback an ALTER TABLE RENAME, and have a concurrent session
see the right thing. The conncurent session hangs, though, because of
the exclusive lock. Based on comments in that function, I think the
lock is still needed to handle the buffer cache, which is indexed by
relname. Should probably make that indexed by PhysicalName, since they're
disk buffers, after all. Haven't touched DROP TABLE, yet though.
My real goal with all this is to now look at the parser, and see how
hard it will be to do something with schema. I think that's going to
require an other field in the relation structure, to indicate which
schema a relation belongs to, then control access based on what the
current default schema is. All the relname stuff was just so different
schema can have different tables with the same name. ;-)
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
This bug appears to still exist in 7.0:
test=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key'
for table 'test'
CREATE
test=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 22157 1
test=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 22158 1
test=> select * from test;
zone | net
------+----------
1 | 1.2.3/24
1 | 2.3.4/24
(2 rows)
test=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 22159 1
test=>
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique index
dns=> select * from test;
zone|net
- ----+--------
1|1.2.3/24
1|2.3.4/24
1|1.2.3/24
(3 rows)Once a unique error is reported, uniqueness seems to be maintained.
Also, if you enter 4 values, then try a duplicate, it all works.The threshold seems to be 3.
A select before the duplicate add also seems to fix it.
~f
************
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
This is Vadim's comment on the bug.
Frank Cusack wrote:
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique indexYes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):ais=> create table test (zone int4, net int4, unique(zone, net));
^^^^
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
ais=> insert into test (zone, net) values (1, 1);
INSERT 7712479 1
ais=> insert into test (zone, net) values (1, 2);
INSERT 7712480 1
ais=> insert into test (zone, net) values (1, 1);
ERROR: Cannot insert a duplicate key into a unique indexVadim
************
--
Bruce Momjian | http://www.op.net/~candle
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes:
This bug appears to still exist in 7.0:
test=> create table test (zone int4, net cidr, unique(zone, net));
Yeah. IIRC, the issue is that the CIDR data-type-specific btree
comparison function looks at all bits in the datatype, including bits
that are past the specified length (/24, here) and weren't necessarily
zeroed by the datatype input routine. It's not clear whether the
comparator or the input routine or both are wrong --- *should* those
bits be significant, or not?
The discussion about how to fix it bogged down, and apparently
no one did anything. I recall feeling that we had some confusion
between what the semantics of CIDR and INET types ought to be,
but I don't understand them well enough to know what they should do.
Right now the same operators are used for both, which seems like it
can't be right.
I was hoping someone would dig through the archives or talk to Paul
Vixie again and come away with a clear understanding of the semantics
of these two datatypes (and why we need two, if we do).
Alternatively, if no one cares enough about these types to even
understand what they should do, maybe we should rip 'em out?
regards, tom lane
Tom Lane writes:
[CIDR and INET]
Alternatively, if no one cares enough about these types to even
understand what they should do, maybe we should rip 'em out?
Actually, I'm a happy user of these types, so that would certainly make me
unhappy...
CIDR stores network addresses, so '10.8/16' might be some network. INET
stores both host addresses and, optionally, the network it's in, so
'10.8.7.6/16' is the given host in the network '10.8/16'. Alternatively,
INET '10.8.7.6' is just a host with no network. IMO, there is one of two
bugs in the CIDR input routine:
1) '10.8.7.6/16' in not rejected
2) Since it is accepted, at least the hidden fields need to be zeroed.
(But note that this bug is only exposed when you use the type improperly
in the first place.)
Using the same operators for cidr and inet is fine as long as this is
fixed.
--
Peter Eisentraut Sernanders v�g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden
I can confirm this is fixed in the current source tree, to be released
as 7.1 in a few months:
test=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key'
for table 'test'
CREATE
test=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 19822 1
test=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 19823 1
test=> insert into test (zone, net) values (1, '1.2.3/24');
ERROR: Cannot insert a duplicate key into unique index test_zone_key
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into unique index test_zone_key
test=>
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique index
dns=> select * from test;
zone|net
- ----+--------
1|1.2.3/24
1|2.3.4/24
1|1.2.3/24
(3 rows)Once a unique error is reported, uniqueness seems to be maintained.
Also, if you enter 4 values, then try a duplicate, it all works.The threshold seems to be 3.
A select before the duplicate add also seems to fix it.
~f
************
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Yes, I can confirm this is now fixed.
Frank Cusack wrote:
Solaris 2.6/sparc; postgres 6.5.1
dns=> create table test (zone int4, net cidr, unique(zone, net));
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21750 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
INSERT 21751 1
dns=> insert into test (zone, net) values (1, '1.2.3/24');
INSERT 21752 1
dns=> insert into test (zone, net) values (1, '2.3.4/24');
ERROR: Cannot insert a duplicate key into a unique indexYes, I reproduced this (Solaris 2.5/sparc).
Seems like CIDR problem(??!):ais=> create table test (zone int4, net int4, unique(zone, net));
^^^^
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
CREATE
ais=> insert into test (zone, net) values (1, 1);
INSERT 7712479 1
ais=> insert into test (zone, net) values (1, 2);
INSERT 7712480 1
ais=> insert into test (zone, net) values (1, 1);
ERROR: Cannot insert a duplicate key into a unique indexVadim
************
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026