Re: [HACKERS] Subtle pg_dump problem...

2004-05-11 Thread Christopher Kings-Lynne
Did you guys find any solution to this in the end? Chris Oleg Bartunov wrote: Thanks Christopher, we'll look into the issue. Oleg On Fri, 7 May 2004, Christopher Kings-Lynne wrote: I have a table with a tsearch2 index on it. Now, I have all the tsearch2 stuff installed into a 'contrib'

Re: [HACKERS] PostgreSQL pre-fork speedup

2004-05-11 Thread Tatsuo Ishii
> > Sorry for the confusion because Rod asked a question > > and I answered too quickly. This is what I mean. > > > > 15x Slower: > > --- > > Client <--TCP--> PgPool <--UNIX--> PostgreSQL > > Client <--TCP--> PgPool <--TCP--> PostgreSQL > > > > 5x Faster: > > -- > > Client <--UNIX

Re: [HACKERS] Module dependency on PostgeSQL version

2004-05-11 Thread Joe Conway
Tom Lane wrote: Thomas Hallgren <[EMAIL PROTECTED]> writes: PGSQL_MAJOR_VER := 7 PGSQL_MINOR_VER := 5 PGSQL_PATCH_VER := devel VERSION := $(PGSQL_MAJOR_VER).$(PGSQL_MINOR_VER).$(PGSQL_PATCH_VER) To be used in CPPFLAGS as: -DPGSQL_MAJOR_VER=$(PGSQL_MAJOR_VER) etc. Wouldn't it be better to just put

[HACKERS] CVS HEAD compile failure on Freebsd 4.9

2004-05-11 Thread Mark Kirkwood
Fresh checkout of CVS HEAD yesterday, updated today : $ ./configure --prefix=/usr/local/pgsql/7.5 $ make gmake[4]: Entering directory `/usr/home/postgres/develop/c/pgsql/src/backend/access/nbtree' gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/in

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> I think this argument is largely a red herring ... but if it makes you > >> feel better, we could change the contents of the commit timestamp to > >> be gettimeofday() output (seconds+microseconds) instead of just

Re: [HACKERS] Configure redux.

2004-05-11 Thread pgsql
> WITH LOCATION would be great, That way you could distribute your > databases across multiple physical disks a lot easier than looking up > oid's > and moving the db after it's been created, mounting it over the top of the > cluster directory Actually "WITH LOCATION" already exists, but i

Re: [HACKERS] Module dependency on PostgeSQL version

2004-05-11 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 DBD::Pg uses "pg_config --version" and parses the output to set the version information before compiling. It finds pg_config by using PG envrironment variables, or looks in the path. Once running, it does a SELECT version() to find out what server

Re: [HACKERS] Probably security hole in postgresql-7.4.1

2004-05-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Should we be thinking about a 7.4.3? I'm not panicking over this particular bug ... but it does seem like we've accumulated enough fixes since 7.4.2 that it may be time to start thinking about another dot-release. Maybe set a date towards the end of the

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> I think this argument is largely a red herring ... but if it makes you >> feel better, we could change the contents of the commit timestamp to >> be gettimeofday() output (seconds+microseconds) instead of just time() >> output. That sh

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Alvaro Herrera
On Tue, May 11, 2004 at 11:07:47PM +0100, Simon Riggs wrote: > On Tue, 2004-05-11 at 22:26, Alvaro Herrera wrote: > > Right. What I was saying is that we don't need pg_subtrans info, > > because that's only needed while the subtransaction is marked as > > "subcommitted" but it's parent hasn't co

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Tue, May 11, 2004 at 09:25:37PM +0100, Simon Riggs wrote: >> Another way of putting it - if it was worth writing before a crash, it >> is worth recovering after a crash. Surely? > Right. Wrong. Only actions that were *committed* before the crash, o

Re: [HACKERS] Module dependency on PostgeSQL version

2004-05-11 Thread Thomas Hallgren
Tom Lane wrote: Thomas Hallgren <[EMAIL PROTECTED]> writes: The PGSQL_MAJOR_VER and PGSQL_MINOR_VER does not exist today. Ideally, I'd like to find them in src/Makefile.global. Only thing present seems to be the VERSION. I'd like to see something like: PGSQL_MAJOR_VER := 7 PGSQL_MINOR_VER := 5

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Many transactions are going to have the same timestamp because that just > > isn't precise enough to choose a particular transaction. > > I think this argument is largely a red herring ... but if it makes you > feel better, we could c

Re: [HACKERS] Probably security hole in postgresql-7.4.1

2004-05-11 Thread Bruce Momjian
Tom Lane wrote: > Ken Ashcraft <[EMAIL PROTECTED]> writes: > > I work at Coverity where we use static analysis to find bugs in > > software. I ran a security checker over postgresql-7.4.1 and I think I > > found a security hole. > > > > In the code below, fld_size gets copied in from a user specif

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Simon Riggs
Thanks to all of you for such swift advice and correction! Have a good evening... On Tue, 2004-05-11 at 22:26, Alvaro Herrera wrote: > On Tue, May 11, 2004 at 09:25:37PM +0100, Simon Riggs wrote: > > On Tue, 2004-05-11 at 16:33, Bruce Momjian wrote: > > > Tom Lane wrote: > > > > Alvaro Herrera <

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Many transactions are going to have the same timestamp because that just > isn't precise enough to choose a particular transaction. I think this argument is largely a red herring ... but if it makes you feel better, we could change the contents of the co

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Simon Riggs
On Tue, 2004-05-11 at 22:01, Bruce Momjian wrote: > Anyway, I though we agreed to just get total recovery working for 7.5 > and we can deal with recovery to a particular point later. Back on target now! Regards, Simon ---(end of broadcast)--- TIP 1

Re: [HACKERS] PITR Signalling the Archiver

2004-05-11 Thread Simon Riggs
On Tue, 2004-05-11 at 22:15, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > I need to send a signal from a backend to the archiver process. > > > 1. What signal should I use? > > SIGUSR1 or SIGUSR2 would be the safest choices. > > > 2. How do I give the processid of the archiver

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Simon Riggs
On Tue, 2004-05-11 at 21:29, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > Currently, recovery loops until end of xlogs. There is no exit condition > > from the loop. There is not currently a timestamp on the xlogs - > > anywhere apart from the file date on each xlog. > > Sure ther

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Both xact commit and abort have timestamps in the XLog. I think valid > recovery points are transaction commit/abort, not transaction start. A transaction abort cannot be an interesting stop point either; you may as well stop at the latest preceding co

[HACKERS] invalid memory alloc request size 0

2004-05-11 Thread Gaetano Mendola
Hi all, strange errors with a empty table: kalman=# create table test(); CREATE TABLE kalman=# select * from test t union select * from test t1; ERROR: invalid memory alloc request size 0 I think this have to return: -- (0 rows) Regards Gaetano Mendola ---(end of broadca

Re: [HACKERS] PITR Signalling the Archiver

2004-05-11 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > I need to send a signal from a backend to the archiver process. > 1. What signal should I use? SIGUSR1 or SIGUSR2 would be the safest choices. > 2. How do I give the processid of the archiver to the backend? The > archiver may restart at any time, so it

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Alvaro Herrera
On Tue, May 11, 2004 at 09:25:37PM +0100, Simon Riggs wrote: > On Tue, 2004-05-11 at 16:33, Bruce Momjian wrote: > > Tom Lane wrote: > > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > > > Hmm ... I think it should be forbidden to quote a subtrans Xid as > > > > rollforward point. Not sure if tha

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Bruce Momjian
Simon Riggs wrote: > During recovery, we would search for a timestamp. If found exactly, > stop. If exceeded, stop. Any transactions not committed at that point > are, as we say, out of luck. This approach has a certainty about it > that I think is much better than the error prone Xid hunting a

Re: [HACKERS] Module dependency on PostgeSQL version

2004-05-11 Thread Tom Lane
Thomas Hallgren <[EMAIL PROTECTED]> writes: > The PGSQL_MAJOR_VER and PGSQL_MINOR_VER does not exist today. Ideally, > I'd like to find them in src/Makefile.global. Only thing present seems > to be the VERSION. I'd like to see something like: > PGSQL_MAJOR_VER := 7 > PGSQL_MINOR_VER := 5 > PGSQL

Re: [HACKERS] PITR Signalling the Archiver

2004-05-11 Thread Bruce Momjian
Simon Riggs wrote: > A few questions may help to speed up my work > > I need to send a signal from a backend to the archiver process. > > 1. What signal should I use? You can use any unused signal. I would suggest looking at what the stats processes uses, and use something else like SIGUSR1.

[HACKERS] PITR Signalling the Archiver

2004-05-11 Thread Simon Riggs
A few questions may help to speed up my work I need to send a signal from a backend to the archiver process. 1. What signal should I use? 2. How do I give the processid of the archiver to the backend? The archiver may restart at any time, so its pid could change after a backend is forked. I ha

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-11 Thread Bruce Momjian
OK, DELETE added: * Add MERGE command that does UPDATE/DELETE, or on failure, INSERT (rules, triggers?) --- Bricklen wrote: > Alvaro Herrera wrote: > > > > Oh, I see. Complex stuff ... I wonder how wil

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Simon Riggs
On Tue, 2004-05-11 at 16:33, Bruce Momjian wrote: > Tom Lane wrote: > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > > Hmm ... I think it should be forbidden to quote a subtrans Xid as > > > rollforward point. Not sure if that can be done though, or how to do > > > it. > > > > Seems like a noni

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > Currently, recovery loops until end of xlogs. There is no exit condition > from the loop. There is not currently a timestamp on the xlogs - > anywhere apart from the file date on each xlog. Sure there is: every transaction commit record (and I think abort

Re: [HACKERS] Probably security hole in postgresql-7.4.1

2004-05-11 Thread Tom Lane
Ken Ashcraft <[EMAIL PROTECTED]> writes: > I work at Coverity where we use static analysis to find bugs in > software. I ran a security checker over postgresql-7.4.1 and I think I > found a security hole. > > In the code below, fld_size gets copied in from a user specified file. > It is passed as

Re: [HACKERS] SPI and bytea columns

2004-05-11 Thread Mike Mascari
Wolfgang Reichart wrote: hello! i want to insert jpeg pictures into a bytea field and i implemented a SPI extension. this function reads the jpeg-file from the filesystem, converts it into a octal-coded string to pass the sql-parser, and then exec's the insert statement. this is rather slow,

[HACKERS] Module dependency on PostgeSQL version

2004-05-11 Thread Thomas Hallgren
I'd like to make a small suggestion that would enable external modules to manage dependencies to PostgreSQL versions. Consider the following code: #if PGSQL_MAJOR_VER > 7 || (PGSQL_MAJOR_VER == 7 && PGSQL_MINOR_VER > 4) result = HeapTupleGetDatum(tuple); #else /* PostgreSQL 7.4 or earlier

Re: [HACKERS] Hacking MySQL Database

2004-05-11 Thread Andrew Hammond
Christopher Browne wrote: After takin a swig o' Arrakan spice grog, "Anonymous" <[EMAIL PROTECTED]> belched out: Does anybody here know how to hack into a mysql database? You might want to visit a mailing list devoted to MySQL; they might know... And possibly even care, too. ---

[HACKERS] Configure redux. "WITH LOCATION," what do you think?

2004-05-11 Thread pgsql
I'm sorry to keep bringing this up, but I keep thinking that PostgreSQL is a PITA to configure. It isn't that I don't know how, or can't read the documents, it's just that there is too many things that can go wrong or leave me with the "How does that work?" feeling where I need to test before I imp

[HACKERS] SPI and bytea columns

2004-05-11 Thread Wolfgang Reichart
hello! i want to insert jpeg pictures into a bytea field and i implemented a SPI extension. this function reads the jpeg-file from the filesystem, converts it into a octal-coded string to pass the sql-parser, and then exec's the insert statement. this is rather slow, and i'd like to insert u

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-11 Thread Bricklen
Alvaro Herrera wrote: Oh, I see. Complex stuff ... I wonder how will it work with sequences -- if one insertion fails and we have to try again, there's a chance a sequence could be advanced more than once. Note the article skips the "signal-statement" symbol (is it present in SQL99? What does i

Re: [HACKERS] Hacking MySQL Database

2004-05-11 Thread Christopher Browne
After takin a swig o' Arrakan spice grog, "Anonymous" <[EMAIL PROTECTED]> belched out: > Does anybody here know how to hack into a mysql database? You might want to visit a mailing list devoted to MySQL; they might know... -- output = reverse("gro.gultn" "@" "enworbbc") http://www.ntlug.org/~cbbr

Re: [HACKERS] Advice regarding configuration parameters

2004-05-11 Thread Thomas Hallgren
Tom Lane wrote: The sort of semantic funny I am thinking of is like this: * postgresql.conf contains pljava::var = somegoodvalue * ALTER DATABASE SET supplies pljava::var = somebadvalue For builtin variables the ALTER DATABASE value would be rejected on sight and the end result would be that the va

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Alvaro Herrera
On Tue, May 11, 2004 at 10:37:49AM -0400, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Hmm ... I think it should be forbidden to quote a subtrans Xid as > > rollforward point. Not sure if that can be done though, or how to do > > it. > > Seems like a nonissue, unless the XLOG

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Bruce Momjian
Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Hmm ... I think it should be forbidden to quote a subtrans Xid as > > rollforward point. Not sure if that can be done though, or how to do > > it. > > Seems like a nonissue, unless the XLOG trace makes a subtrans look the > same as

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Hmm ... I think it should be forbidden to quote a subtrans Xid as > rollforward point. Not sure if that can be done though, or how to do > it. Seems like a nonissue, unless the XLOG trace makes a subtrans look the same as a main trans, which it'd not d

Re: [HACKERS] XLog: how to log?

2004-05-11 Thread Alvaro Herrera
On Tue, May 11, 2004 at 07:44:53AM +0100, Simon Riggs wrote: > Tom Lane wrote: > > Just means you have to do some address arithmetic instead of being able > > to reference the additional data as a struct member. Tedious but hardly > > difficult. See for instance the handling of "move" data in >

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-11 Thread Bruce Momjian
Hannu Krosing wrote: > Bruce Momjian kirjutas T, 11.05.2004 kell 00:26: > > Hannu Krosing wrote: > > > Bruce Momjian kirjutas E, 10.05.2004 kell 06:58: > > > > Added to TODO: > > > > > > > > * Add MERGE command that does UPDATE, or on failure, INSERT > > > > > > perhaps the issue raised a

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-11 Thread Hannu Krosing
Bruce Momjian kirjutas T, 11.05.2004 kell 00:26: > Hannu Krosing wrote: > > Bruce Momjian kirjutas E, 10.05.2004 kell 06:58: > > > Added to TODO: > > > > > > * Add MERGE command that does UPDATE, or on failure, INSERT > > > > perhaps the issue raised about BEFOR/AFTER INSERT/UPDATE TRIGGERS and