Re: [HACKERS] Disaster!

2004-01-31 Thread Tom Lane
Randolf Richardson [EMAIL PROTECTED] writes: [EMAIL PROTECTED] (Greg Stark) stated in comp.databases.postgresql.hackers: The traditional Unix filesystems certainly don't return errors at close. Why shouldn't the close() function return an error? If an invalid file handle was passed

Re: [HACKERS] Disaster!

2004-01-31 Thread Greg Stark
Manfred Spraul [EMAIL PROTECTED] writes: The checkpoint code uses sync() right now. Actually sync();sleep(2);sync(). Win32 has no sync() call, therefore it will use fsyncs. Perhaps platforms with deferred errors on close must use fsync, too. Hopefully parallel fsyncs - sequential fsyncs

[HACKERS] Can not always connect to postmaster. Sometimes get Connection refused.

2004-01-31 Thread Hamedany, Allen
Hi, Were running postgres7.3 on RedHat7.3. The Postgres at boot time starts up from a java (1.2) class that runs the following commands in order: /usr/local/pgsql/bin/pg_ctl -w start -D /var/lib/pgsql -l /var/log/pgsqld.log -o i /usr/local/pgsql/bin/createdb management . . .

Re: [HACKERS] Named arguments in function calls

2004-01-31 Thread elein
I agree with Tom on this. Good operator combinations are hard to find when you are creating new operators. = is a particularly good one. Barring any override from the SQL200x standard, I would strongly suggest AS, too. elein [EMAIL PROTECTED] On Sun, Jan 25, 2004 at 02:54:12PM -0500, Tom Lane

[HACKERS] Undefined symbol elog

2004-01-31 Thread Dan Langille
Hi folks, I upgraded two servers from 7.3.* to 7.4.1. In both cases, the pgcrypto functions failed to migrate.. I used pg_dumpall. This is the cause of the problem: freshports=# CREATE FUNCTION digest (text, text) RETURNS bytea freshports-# AS '$libdir/pgcrypto', 'pg_digest'

[HACKERS] Undefined symbol elog

2004-01-31 Thread Dan Langille
My search was wrong. This is a known issue. Sorry for the post. -- Dan Langille : http://www.langille.org/ BSDCan - http://www.bsdcan.org/ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

Re: [HACKERS] dump + restore didn't include schemas

2004-01-31 Thread Dan Langille
On 30 Jan 2004 at 23:34, Tom Lane wrote: Dan Langille [EMAIL PROTECTED] writes: I upgraded two servers today from 7.3.* to 7.4.1. In both cases, the schemas which existed in the original databases were not created in the new database. New issue? Known bug? New one on me. Look at

Re: [HACKERS] dump + restore didn't include schemas

2004-01-31 Thread Tom Lane
Dan Langille [EMAIL PROTECTED] writes: I upgraded two servers today from 7.3.* to 7.4.1. In both cases, the schemas which existed in the original databases were not created in the new database. I found three of these messages in /var/log/messages on the box which had the problem.

[HACKERS] Transaction callback

2004-01-31 Thread Thomas Hallgren
I would like to register a transaction callback in the backend. Don't think it's possible today and my question is, how hard would it be to implement something that would enable this registration? Ideally, I'd like a beforeCompletion that is executed prior to the start of the commit process and a

Re: [HACKERS] dump + restore didn't include schemas

2004-01-31 Thread Dan Langille
On 31 Jan 2004 at 11:56, Tom Lane wrote: Dan Langille [EMAIL PROTECTED] writes: I upgraded two servers today from 7.3.* to 7.4.1. In both cases, the schemas which existed in the original databases were not created in the new database. I found three of these messages in

Re: [HACKERS] dump + restore didn't include schemas

2004-01-31 Thread Tom Lane
Dan Langille [EMAIL PROTECTED] writes: On 31 Jan 2004 at 11:56, Tom Lane wrote: 7.4's pg_dump will use AUTHORIZATION so that situations like this restore correctly, but 7.3's pg_dump is stupid and tries to create the schema as its owner. Does it matter that I used pg_dumpall? No.

Re: [HACKERS] [PATCHES] v7.4.1 text_position() patch

2004-01-31 Thread Joe Conway
Tatsuo Ishii wrote: It's surprising that nobody noticed the bug until now. It seems it has been there since 7.3 days. I would like to make a back patch for 7.3-stable if nobody objects. It's my bug :( -- sorry about that. Here's a 7.3 patch per Tom's nearby advice. I'll apply if you'd like. Joe

Re: [HACKERS] Transaction callback

2004-01-31 Thread Bruce Momjian
Tom Lane wrote: Thomas Hallgren [EMAIL PROTECTED] writes: Ideally, I'd like a beforeCompletion that is executed prior to the start of the commit process and a afterCompletion that is called when the transaction is commited. The latter would have a status flag indicating if status is

Re: [HACKERS] Transaction callback

2004-01-31 Thread David Helgason
On 31. jan 2004, at 18:53, Tom Lane wrote: Thomas Hallgren [EMAIL PROTECTED] writes: Ideally, I'd like a beforeCompletion that is executed prior to the start of the commit process and a afterCompletion that is called when the transaction is commited. The latter would have a status flag

Re: [HACKERS] Transaction callback

2004-01-31 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Why can't we call the callback before we commit so it can modify the database? He wanted that too... A user callback before we start the commit sequence seems doable, although there's some question in my mind of exactly when it should happen. The last

Re: [HACKERS] Transaction callback

2004-01-31 Thread Bruce Momjian
Tom Lane wrote: I got the impression that Thomas wanted this in order to kluge up some kind of two-phase-commit support, in which case he really needs to get control at the point where we're just about to really truly commit (ie, write the commit WAL record). That's certainly not a location

Re: [HACKERS] Extending SET SESSION AUTHORIZATION

2004-01-31 Thread Ezra Epstein
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Monday, January 26, 2004 7:56 PM To: Bruce Momjian Cc: [EMAIL PROTECTED]; PostgreSQL-development Subject: Re: [HACKERS] Extending SET SESSION AUTHORIZATION Bruce Momjian [EMAIL PROTECTED] writes: Ezra Epstein

Re: [HACKERS] Extending SET SESSION AUTHORIZATION

2004-01-31 Thread Shridhar Daithankar
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Ezra Epstein wrote: I'd like to extend SET SESSION AUTHORIZATION to support a form which takes a password. Uh, a password? What purpose would that serve? Indeed. SET SESSION AUTH is already allowed only to superusers --- a superuser

[HACKERS] Transaction aborts on syntax error.

2004-01-31 Thread Edwin S. Ramirez
Hello, Is is possible to change the transaction behaviour not to abort when a syntax error occurs. I've done some searches on the list, and have not found anything. -ESR- ---(end of broadcast)--- TIP 6: Have you searched our list archives?

Re: [HACKERS] Transaction aborts on syntax error.

2004-01-31 Thread Alvaro Herrera
On Fri, Jan 30, 2004 at 07:43:06AM -0800, Edwin S. Ramirez wrote: Is is possible to change the transaction behaviour not to abort when a syntax error occurs. Not currently. -- Alvaro Herrera (alvherre[a]dcc.uchile.cl) And as an added bonus, now my computer goes to the toilet for me, leaving

[HACKERS] Update Syntax

2004-01-31 Thread Edwin S. Ramirez
Hello, I need Postgres support for the following update syntax : update table1 set (col1, col2, col3) = (select f1, f2, f3 from table2 where id=5) where rownum=3; update table1 set (col1, col2, col3) = (select f1, f2, f3 from table2 where id=table1.parentid) where rownum=3; These type of

Re: [HACKERS] Mixing threaded and non-threaded

2004-01-31 Thread Bruce Momjian
OK, thanks. --- Scott Lamb wrote: On Jan 30, 2004, at 4:53 PM, Bruce Momjian wrote: Actually, thinking about this a bit more, that might not even be necessary. Is SIGPIPE-via-(read|write) synchronous or asynchronous?

Re: [HACKERS] Write cache

2004-01-31 Thread Larry Rosenman
--On Tuesday, January 27, 2004 23:15:09 +0100 [EMAIL PROTECTED] wrote: On Tue, 27 Jan 2004, Larry Rosenman wrote: ISTM that the driver should force it out to the disk, unless the disk is lying to the driver, or the driver is buggy. That's exactly what I think: the DISK has a write cache

Re: [HACKERS] Write cache

2004-01-31 Thread ohp
On Tue, 27 Jan 2004, Larry Rosenman wrote: ISTM that the driver should force it out to the disk, unless the disk is lying to the driver, or the driver is buggy. That's exactly what I think: the DISK has a write cache so it's lying to the controler saying data is written when it's

Re: [HACKERS] Mixing threaded and non-threaded

2004-01-31 Thread Scott Lamb
On Jan 30, 2004, at 4:53 PM, Bruce Momjian wrote: Actually, thinking about this a bit more, that might not even be necessary. Is SIGPIPE-via-(read|write) synchronous or asynchronous? (I.e., is the SIGPIPE guaranteed to arrive during the offending system call?) I was thinking not, but maybe yes. I

Re: [HACKERS] Write cache

2004-01-31 Thread Andrew Dunstan
Tom Lane wrote: Andreas Pflug [EMAIL PROTECTED] writes: This would be the first time a SCSI disk lies about its write caching. There are plenty of low-cost (i.e. IDE) disks out there having a hidden write cache, but AFAIK a generic SCSI tool is usable to enable/disable the write cache.

Re: [HACKERS] Extending SET SESSION AUTHORIZATION

2004-01-31 Thread Ezra Epstein
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 27, 2004 10:46 AM To: [EMAIL PROTECTED] Cc: Bruce Momjian; PostgreSQL-development Subject: Re: [HACKERS] Extending SET SESSION AUTHORIZATION Ezra Epstein [EMAIL PROTECTED] writes: I'd like to

Re: [HACKERS] Write cache

2004-01-31 Thread Bruce Momjian
Andrew Dunstan wrote: Tom Lane wrote: Andreas Pflug [EMAIL PROTECTED] writes: This would be the first time a SCSI disk lies about its write caching. There are plenty of low-cost (i.e. IDE) disks out there having a hidden write cache, but AFAIK a generic SCSI tool is usable to

Re: [HACKERS] Transaction aborts on syntax error.

2004-01-31 Thread Bruce Momjian
Edwin S. Ramirez wrote: Hello, Is is possible to change the transaction behaviour not to abort when a syntax error occurs. I've done some searches on the list, and have not found anything. No, we need nested transactions for that. We are working on it or at least have a plan. --

Re: [HACKERS] Problem with pgtcl on HP

2004-01-31 Thread Neil Conway
Michael Brusser [EMAIL PROTECTED] writes: We tracked problem to this line in pgtcl.c: putenv (PGCLIENTENCODING=UNICODE); Changing this to Tcl_PutEnv (PGCLIENTENCODING=UNICODE); seems to be a good fix, so far we are not seeing any problems. Looks good to me. Unless anyone else objects,

[HACKERS] Idea about better configuration options for sort memory

2004-01-31 Thread Tom Lane
We frequently recommend to people that they increase sort_mem while creating btree indexes. It is reasonable to have a larger setting for that purpose, since (1) a single backend isn't going to be doing multiple index creations in parallel (whereas complex queries could easily be doing multiple

Re: [HACKERS] Idea about better configuration options for sort memory

2004-01-31 Thread Marc G. Fournier
On Sat, 31 Jan 2004, Tom Lane wrote: So, what I'd like to do is make btree index creation pay attention to vacuum_mem instead of sort_mem, and rename the vacuum_mem parameter to some more-generic name indicating that it's used for more than just VACUUM. Any objections so far? Why not create

Re: [HACKERS] Idea about better configuration options for sort memory

2004-01-31 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes: On Sat, 31 Jan 2004, Tom Lane wrote: So, what I'd like to do is make btree index creation pay attention to vacuum_mem instead of sort_mem, and rename the vacuum_mem parameter to some more-generic name indicating that it's used for more than just

Re: [HACKERS] Transaction callback

2004-01-31 Thread Thomas Hallgren
What I want accomplish has been very well defined already. I'm thinking of javax.transaction.Transaction and javax.transaction.Synchronized, two interfaces readily available in any J2EE application server. The actions that can be performed by implementers of the latter interface (the one that gets

Re: [HACKERS] Idea about better configuration options for sort memory

2004-01-31 Thread Joe Conway
Tom Lane wrote: Now, what should we call it instead? I haven't come up with any compelling thoughts --- the best I can do is big_sort_mem or single_sort_mem. Surely someone out there has a better idea. BTW, does anyone want to lobby for renaming sort_mem at the same time? Since it's used for

Re: [HACKERS] Idea about better configuration options for sort memory

2004-01-31 Thread Marc G. Fournier
On Sat, 31 Jan 2004, Tom Lane wrote: Marc G. Fournier [EMAIL PROTECTED] writes: On Sat, 31 Jan 2004, Tom Lane wrote: So, what I'd like to do is make btree index creation pay attention to vacuum_mem instead of sort_mem, and rename the vacuum_mem parameter to some more-generic name

Re: [HACKERS] Transaction callback

2004-01-31 Thread Thomas Hallgren
I don't want to kludge up a 2-phase commit support. Any attempt to provide that must be extremely well thought through :-) But I would like to know more about PostgreSQL capabilities in the area. What kind of XA-support is there? Can I read about this somewhere? (I'm working on an Open Source

Re: [HACKERS] Extending SET SESSION AUTHORIZATION

2004-01-31 Thread Ezra Epstein
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Tom Lane Sent: Tuesday, January 27, 2004 1:35 PM Ezra Epstein [EMAIL PROTECTED] writes: I do not think SET SESSION AUTH is a suitable replacement for logging in. For one thing, it doesn't apply

Re: [HACKERS] 7.4.1 release status - Turkish Locale

2004-01-31 Thread Nicolai Tufar
We might think that the Turkish-locale problem Devrim Gunduz pointed out is a must-fix, too. But I'm not convinced yet what to do about it. Here is a first try to fix what Devrim Gunduz talked about. Please be patient with me for it is the first major patch I submit and I realize that I

Re: [HACKERS] [PATCHES] v7.4.1 text_position() patch

2004-01-31 Thread Tatsuo Ishii
Tatsuo Ishii wrote: It's surprising that nobody noticed the bug until now. It seems it has been there since 7.3 days. I would like to make a back patch for 7.3-stable if nobody objects. It's my bug :( -- sorry about that. Here's a 7.3 patch per Tom's nearby advice. I'll apply if you'd

[HACKERS] Kerberos as source of user name? (Re: [BUGS] segfault in psql on x86_64)

2004-01-31 Thread Tom Lane
Orion Henry [EMAIL PROTECTED] writes: It appears to be faulting on a kerberos call which is odd because I don't use kerberos for anything. I was a bit surprised to realize that if you compile Kerberos support at all, libpq will try to get a user name from Kerberos in preference to using

Re: [HACKERS] 7.4.1 release status - Turkish Locale

2004-01-31 Thread Tom Lane
Nicolai Tufar [EMAIL PROTECTED] writes: We might think that the Turkish-locale problem Devrim Gunduz pointed out is a must-fix, too. But I'm not convinced yet what to do about it. Here is a first try to fix what Devrim Gunduz talked about. I still don't much like having a locale-specific