Re: [HACKERS] pulling projection up in plans

2004-08-17 Thread Hicham G. Elmongui
To be more specific, i am trying to implement an operator, and i get the tuples being projected in ExecScan (called from ExecSeqScan). I just needed them unprojected. thanks, --h On Mon, 16 Aug 2004, Sailesh Krishnamurthy wrote: Tom == Tom Lane [EMAIL PROTECTED] writes: Tom Hicham G.

[HACKERS] too short string for SQL in pg_stat_backend_activity

2004-08-17 Thread Pavel Stehule
Hello I my work I have problem with some ugly SQL. Processing some query takes 2 days and more (problem is in queries not in PostgreSQL). I can't wait on end of query and can't take text of query from serverlog. Text of queries has about 2 - 7 Kb. I have problem identifi queries in our is,

[HACKERS] psql's \l

2004-08-17 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I just received a question about psql. They want psql to show 'only' the databases that the 'current_user' owns. I'd like to hack it for them but I don't know where \l is called and defined. Could someone point me where the code is? Thanks.

Re: [HACKERS] psql's \l

2004-08-17 Thread Peter Eisentraut
Am Dienstag, 17. August 2004 12:30 schrieb Devrim GUNDUZ: I'd like to hack it for them but I don't know where \l is called and defined. Could someone point me where the code is? src/bin/psql$ grep pg_database *.c -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [HACKERS] psql's \l

2004-08-17 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Tue, 17 Aug 2004, Peter Eisentraut wrote: I'd like to hack it for them but I don't know where \l is called and defined. Could someone point me where the code is? src/bin/psql$ grep pg_database *.c Thanks. - -- Devrim GUNDUZ

[HACKERS] vacuums and ctid

2004-08-17 Thread Gaetano Mendola
Hi all, looking at how ctid is used is clear to me: insert line (A) in a table; == ctid = (0, 1); rollback an update for the line (A); insert a line (B) in the table; == ctid = (0, 3); vacuum full; insert a line (C) in the table; == ctid = (0, 2); I was expecting this for a normal vacuum

[HACKERS] tablespace and sequences?

2004-08-17 Thread Fabien COELHO
Dear hackers, Some minor comments about the new tablespace feature in 8.0beta1: It seems to me that tablespaces and sequences are not yet prefectly integrated. (1) the CREATE SEQUENCE foo TABLESPACE disk2 syntax does not seem to be implemented. (2) when creating an implicit sequence with

Re: [HACKERS] too short string for SQL in pg_stat_backend_activity

2004-08-17 Thread Tom Lane
Pavel Stehule [EMAIL PROTECTED] writes: Can I set somewhere an long for text, which is in current_query in pg_catalog.pg_stat_activity? No. You could attach gdb to the backend that's running the troublesome query and do p debug_query_string ... regards, tom lane

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Stefan Kaltenbrunner
Fabien COELHO wrote: (3) psql auto completion does not have CREATE/DROP TABLESPACE in its list. I have already posted a patch for this(http://candle.pha.pa.us/mhonarc/patches/msg0.html) and afaik it is on Bruce's Beta-TODO list too. Stefan ---(end of

Re: [HACKERS] vacuums and ctid

2004-08-17 Thread Tom Lane
Gaetano Mendola [EMAIL PROTECTED] writes: could this due the fact that moving that tuple will not save any storage space ? Yup. VACUUM FULL is not interested in collapsing out unused CTID slots. regards, tom lane ---(end of

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Fabien COELHO
(3) psql auto completion does not have CREATE/DROP TABLESPACE in its list. I have already posted a patch for this(http://candle.pha.pa.us/mhonarc/patches/msg0.html) Good. I should have checked the pending patch queue. and afaik it is on Bruce's Beta-TODO list too. Argh, I

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Bruce Momjian
Fabien COELHO wrote: Dear hackers, Some minor comments about the new tablespace feature in 8.0beta1: It seems to me that tablespaces and sequences are not yet prefectly integrated. (1) the CREATE SEQUENCE foo TABLESPACE disk2 syntax does not seem to be implemented. (2) when

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Bruce Momjian
Fabien COELHO wrote: (3) psql auto completion does not have CREATE/DROP TABLESPACE in its list. I have already posted a patch for this(http://candle.pha.pa.us/mhonarc/patches/msg0.html) Good. I should have checked the pending patch queue. and afaik it is on Bruce's

[HACKERS] LDFLAGS vs. shared libraries

2004-08-17 Thread Oliver Jowett
I'm trying to build 7.4.3 under Solaris 9 with gcc and static linking of libgcc. This requires passing '-static-libgcc' when linking both binaries and shared libraries. Passing 'LDFLAGS=-static-libgcc' to configure only partially works. Binaries are correctly linked with that flag, but shared

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Fabien COELHO
Dear Bruce, (1) the CREATE SEQUENCE foo TABLESPACE disk2 syntax does not seem to be implemented. (2) when creating an implicit sequence with SERIAL, the sequence is created in the tablespace of the schema/database, not the one of the table, although indexes are added to

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Bruce Momjian
Fabien COELHO wrote: Dear Bruce, (1) the CREATE SEQUENCE foo TABLESPACE disk2 syntax does not seem to be implemented. (2) when creating an implicit sequence with SERIAL, the sequence is created in the tablespace of the schema/database, not the one of the table,

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Fabien COELHO
and afaik it is on Bruce's Beta-TODO list too. Argh, I missed this one! Is it somewhere on line? Yep, URL at the top: Quite an unexpected location! thanks for the pointer. Current version at ftp://momjian.postgresql.org/pub/postgresql/open_items. IMVHO, I think the following todo item

Re: [HACKERS] LDFLAGS vs. shared libraries

2004-08-17 Thread Tom Lane
Oliver Jowett [EMAIL PROTECTED] writes: I've changed Makefile.shlib to add all of LDFLAGS to SHLIB_LINK for now, but I'm assuming there's a reason that it was only using -L flags originally. IIRC, on some platforms there are elements of LDFLAGS that will actively break shared library

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Fabien COELHO
(1) the CREATE SEQUENCE foo TABLESPACE disk2 syntax does not seem to be implemented. This is intentional. Sequences are not large enough to need to be pushed around among multiple tablespaces. Also, if we did allow sequences to be associated with tablespaces, we'd be precluding

[HACKERS] 7.4.4 packaged ...

2004-08-17 Thread Marc G. Fournier
Sorry for delay, working through the packages ... 7.4.4 is available via ftp right now if anyone wants to take a quick peak at it ... they seem right, based on sizes ... Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: [EMAIL PROTECTED] Yahoo!:

Re: [HACKERS] 7.4.4 packaged ...

2004-08-17 Thread Devrim GUNDUZ
Hi, On Tue, 17 Aug 2004, Marc G. Fournier wrote: Sorry for delay, working through the packages ... 7.4.4 is available via ftp right now if anyone wants to take a quick peak at it ... they seem right, based on sizes ... I can't see them in ftp site?? ncftp /pub/source/v7.4.4 pwd

Re: [HACKERS] pg_restore (libpq? parser?) bug in 8

2004-08-17 Thread Bruce Momjian
Added to open items list: * fix dollar quoting problems in pg_restore --- Philip Warner wrote: CREATE FUNCTION xxx() RETURNS integer AS $$ begin return 1; 2004-08-12 01:38:48

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Bruce Momjian
Philip Warner wrote: At 01:47 AM 12/08/2004, Tom Lane wrote: It might be reasonable to offer that behavior as an option, but I think I'd only want it on for interactive input. My preference would be for something like: set savepoint_per_statement=true then interactive scripts

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Added to TODO list: * Add an option to automatically use savepoints for each statement in a multi-statement transaction. When enabled, this would allow errors in multi-statement transactions to be automatically ignored. Note that whoever

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Gaetano Mendola
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Added to TODO list: * Add an option to automatically use savepoints for each statement in a multi-statement transaction. When enabled, this would allow errors in multi-statement transactions to be automatically ignored. Like I said, my

[HACKERS] initdb failure on win32

2004-08-17 Thread Thomas Hallgren
I'm trying to run initdb on win32, freshly compiled from CVS HEAD, but I get the following error: creating template1 database in data/base/1 ... failed to get token information: 122 Any ideas? Regards, Thomas Hallgren ---(end of broadcast)--- TIP

Re: [HACKERS] initdb failure on win32

2004-08-17 Thread Magnus Hagander
Yes, one :-) Is your account by any chance a member of a large number of groups? If so, how many? There is a fixed buffer of 1024 bytes. I have a feeling ythat one has to be changed to dynamic. //Magnus -Original Message- From: Thomas Hallgren [mailto:[EMAIL PROTECTED] Sent: den 17

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Haroldo Stenger
Hi Tom On Wed, 11 Aug 2004 11:47:35 -0400, Tom Lane [EMAIL PROTECTED] wrote: The other objection is that this would create very substantial overhead. why? It might be reasonable to offer that behavior as an option, but I think I'd only want it on for interactive input. How could the server

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Added to TODO list: * Add an option to automatically use savepoints for each statement in a multi-statement transaction. When enabled, this would allow errors in multi-statement transactions to be automatically ignored.

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Tom Lane
Haroldo Stenger [EMAIL PROTECTED] writes: On Wed, 11 Aug 2004 11:47:35 -0400, Tom Lane [EMAIL PROTECTED] wrote: It might be reasonable to offer that behavior as an option, but I think I'd only want it on for interactive input. How could the server tell interactive input from scripted intput

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Doing it only for interactive mode seems too error-prone to me (it works in psql, but not from my script). You're missing the point: a script cannot safely work this way. A human typing at the terminal can notice that his command failed and react to

[HACKERS] 7.3.7 packaged ...

2004-08-17 Thread Marc G. Fournier
If someone wants to take a peak at it ... it *shrunk* from 7.3.6 ... -rw-r--r-- 1 pgsql pgsql 10367088 Aug 17 15:53 postgresql-7.3.7.tar.gz -rw-r--r-- 1 pgsql pgsql 11288430 Mar 4 21:35 postgresql-7.3.6.tar.gz I'm re-running the build right now, to see if there are any errors that I've

Re: [HACKERS] initdb failure on win32

2004-08-17 Thread Thomas Hallgren
Magnus, There is a fixed buffer of 1024 bytes. I have a feeling ythat one has to be changed to dynamic. You're quite right. The 'InfoBufferSize' denotes 1122 bytes after this call. if(!GetTokenInformation(AccessToken,TokenGroups,InfoBuffer,1024,InfoBufferSize)) Regards, Thomas Hallgren

[HACKERS] What else is needed for PITR?

2004-08-17 Thread Simon Riggs
Could I ask the general question: What else is needed for PITR? - What isn't clear about how PITR works? what it is or what its good for? - What additional features are required? - What additional tools are required to make it useful? - What additional documentation do we want? (Assuming you've

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Simon Riggs
Bruce Momjian Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Added to TODO list: * Add an option to automatically use savepoints for each statement in a multi-statement transaction. When enabled, this would allow errors in multi-statement transactions to be

Re: [HACKERS] [ADMIN] SRPM for 8.0.0 beta?

2004-08-17 Thread Joe Conway
Joe Conway wrote: Version 2 of the source rpm is now available here: http://www.joeconway.com/postgresql-8.0.0beta1/SRPM/postgresql-8.0.0beta1-2PGDG.src.rpm I've also put up i386 binary rpms for fc1 and fc2, and x86_64 binary rpms for fc2. Hopefully the third try is a charm ;-) Version 3 is now

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Alvaro Herrera Munoz
On Tue, Aug 17, 2004 at 03:33:01PM -0300, Haroldo Stenger wrote: Haroldo, On Wed, 11 Aug 2004 11:47:35 -0400, Tom Lane [EMAIL PROTECTED] wrote: The other objection is that this would create very substantial overhead. why? Establishing a savepoint is a non-trivial operation (cost-wise).

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Tom Lane
Alvaro Herrera Munoz [EMAIL PROTECTED] writes: Establishing a savepoint is a non-trivial operation (cost-wise). Several internal server structures have to be prepared for it. Check It's way cheaper than normal transaction start and commit, Is it? You have the same amount of work to do

stop the presses (Re: [HACKERS] 7.4.4 packaged ...)

2004-08-17 Thread Tom Lane
I have just found a bug in _bt_getstackbuf that I think explains Joe Conway's recent reports of PANICs under heavy concurrent insertions. We're gonna have to re-wrap 7.4.4 or relabel it 7.4.5, your choice. Fortunately the bug is not present in 7.3 and earlier, so those packagings can forge ahead.

Re: stop the presses (Re: [HACKERS] 7.4.4 packaged ...)

2004-08-17 Thread Marc G. Fournier
On Tue, 17 Aug 2004, Tom Lane wrote: I have just found a bug in _bt_getstackbuf that I think explains Joe Conway's recent reports of PANICs under heavy concurrent insertions. We're gonna have to re-wrap 7.4.4 or relabel it 7.4.5, your choice. let's relable it 7.4.5 ... with Devrim doing up the

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Haroldo Stenger
Hola Alvaro On Tue, 17 Aug 2004 16:58:56 -0400, Alvaro Herrera Munoz [EMAIL PROTECTED] wrote: On Wed, 11 Aug 2004 11:47:35 -0400, Tom Lane [EMAIL PROTECTED] wrote: The other objection is that this would create very substantial overhead. why? Establishing a savepoint is a non-trivial

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Philip Warner
At 07:10 AM 18/08/2004, Tom Lane wrote: I have not had an opportunity to benchmark it but I fear a savepoint may cost near as much as a full xact in practice. Out of curiosity, does this mean that using a savepoint per statement will be no worse than using psql in autocommit mode?

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Philip Warner
At 04:44 AM 18/08/2004, Bruce Momjian wrote: it turns off when the transaction completes? Not sure I like this part; I would like to be able to set the variable at the start of a psql session and have it run for the entire session. Or, even better, set it in a psql initialization file. Also,

Re: stop the presses (Re: [HACKERS] 7.4.4 packaged ...)

2004-08-17 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes: let me know when you are ready ... I've committed the patch itself. I have to leave for a few hours, but I can update the release notes and branding when I get back. regards, tom lane ---(end of

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Philip Warner
At 09:26 AM 18/08/2004, Philip Warner wrote: Also, will the 'interactive-session' check consider an included file (\i) to be interactive? I'd vote yes. In retrospect, I assume the interactive-session limit would not be a problem here since the command would be entered interactively. The source

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Alvaro Herrera
On Tue, Aug 17, 2004 at 08:21:13PM -0300, Haroldo Stenger wrote: Hola, On Tue, 17 Aug 2004 16:58:56 -0400, Alvaro Herrera Munoz [EMAIL PROTECTED] wrote: Establishing a savepoint is a non-trivial operation (cost-wise). Several internal server structures have to be prepared for it. It's

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Alvaro Herrera
On Wed, Aug 18, 2004 at 09:23:44AM +1000, Philip Warner wrote: At 07:10 AM 18/08/2004, Tom Lane wrote: I have not had an opportunity to benchmark it but I fear a savepoint may cost near as much as a full xact in practice. Out of curiosity, does this mean that using a savepoint per statement

Re: [HACKERS] psql's \l

2004-08-17 Thread Christopher Kings-Lynne
I'd like to hack it for them but I don't know where \l is called and defined. Could someone point me where the code is? src/bin/psql$ grep pg_database *.c Probably in describe.c Erm, but what stops them from going: SELECT * FROM pg_database; Chris ---(end of

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Christopher Kings-Lynne
We decided it didn't make much sense to allow the on-row sequences to be anywhere but the default tablespace. Hmmm... I can understand the performance/utility rationale, but I don't like the lack of orthogonality on principle. I like elegance;-) As a sequence looks a lot like a table, I guess it

Re: [HACKERS] tablespace and sequences?

2004-08-17 Thread Christopher Kings-Lynne
IMVHO, I think the following todo item should make it for 8.0: Allow database recovery where tablespaces can't be created When a pg_dump is restored, all tablespaces will attempt to be created in their original locations. If this fails, the user must be able to

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Greg Stark
Simon Riggs [EMAIL PROTECTED] writes: This behaviour allows much closer mimicking of Oracle and other RDBMS's transactional behaviour begin 2cThis is my single biggest pet peeve with Postgres. When I was first starting it was the single most frustrating violation of the least surprise

Re: stop the presses (Re: [HACKERS] 7.4.4 packaged ...)

2004-08-17 Thread Tom Lane
Marc G. Fournier [EMAIL PROTECTED] writes: let me know when you are ready ... It's branded, wrap away... regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

Re: [HACKERS] [PATCHES] Patch for pg_dump: Multiple -t options and

2004-08-17 Thread Bruce Momjian
OK, I have added a new pg_dump TODO section with adjustments based on feedback from original list: * pg_dump o Allow pg_dumpall to use non-text output formats o Have pg_dump use multi-statement transactions for INSERT dumps o -Allow pg_dump to dump CREATE CONVERSION

Re: [HACKERS] [ADMIN] SRPM for 8.0.0 beta?

2004-08-17 Thread Tom Lane
Joe Conway [EMAIL PROTECTED] writes: Hopefully the third try is a charm ;-) Version 3 is now available: fixes the init script. Previously /etc/init.d/postgresql worked the first time used (i.e. would initdb and start postgres) but not the second and subsequent times. [ blink... ] Was this

Re: [HACKERS] [ADMIN] SRPM for 8.0.0 beta?

2004-08-17 Thread Joe Conway
Tom Lane wrote: Joe Conway [EMAIL PROTECTED] writes: Hopefully the third try is a charm ;-) Version 3 is now available: fixes the init script. Previously /etc/init.d/postgresql worked the first time used (i.e. would initdb and start postgres) but not the second and subsequent times. [ blink...

Re: [HACKERS] to_char() and negative intervals

2004-08-17 Thread Bruce Momjian
We will either remove it in 8.0 or mention its removal in 8.1. It is probably wisest to remove in 8.1. --- Bruce Momjian wrote: Added to open items: * remove to_char(interval) if we initdb

Re: [HACKERS] Does psql use nested transactions?

2004-08-17 Thread Dennis Bjorklund
On 17 Aug 2004, Greg Stark wrote: With Postgres I effectively have to work in autocommit mode. Starting over from scratch every time I make a typo is infeasible. It feels like trying to type in a C program using cat. I've done it before but it's not something I want to repeat often. I agree.

[HACKERS] 7.4.3 8.0.0beta1 + Solaris 9: default pg_hba.conf breaks

2004-08-17 Thread Oliver Jowett
8.0.0beta1 tarball built with gcc 3.2.3 under Solaris 9 on a E250 (ultrasparc). I see the same bug as described in http://archives.postgresql.org/pgsql-admin/2004-05/msg00248.php: a mask of 255.255.255.255 in pg_hba.conf is rejected with LOG: invalid IP mask 255.255.255.255 in pg_hba.conf

Re: [HACKERS] LDFLAGS vs. shared libraries

2004-08-17 Thread Oliver Jowett
Tom Lane wrote: Oliver Jowett [EMAIL PROTECTED] writes: Is there a Right Way to pass extra options for shared-library linking? LDFLAGS_SL is meant for this, I believe. Dunno whether you can set it via configure, though ... that may be an oversight. In the meantime you could hand-hack