Re: [GENERAL] Default fill factor for tables?

2008-07-16 Thread Chris
> I'm using 8.3.1 on Solaris and I just tried this: > CREATE TABLE test (a int) WITH (hot_update='true'); > > It fails with: > ERROR: unrecognized parameter "hot_update" > > Is a hot update automatic in 8.3.x and that is why there isn't any > formal documentation other than what is in the sour

Re: [GENERAL] 8.3.3 regression test on SCO 5.0.7

2008-07-16 Thread Harvey, Allan AC
> "Harvey, Allan AC" <[EMAIL PROTECTED]> writes: > >> "Harvey, Allan AC" <[EMAIL PROTECTED]> writes: > >>> creating template1 database in > /upgrades/postgres/postgresql-8.3.3/src/test/regress/./tmp_che > ck/data/base/1 ... =: is not an identifier > > > A diff of postgres.bki on the SCO system to

[GENERAL] Problem with xpath function and full xml documents

2008-07-16 Thread Cheetah
I'm trying to use the xpath function to search through an xml field stored in my database (pgsql 8.3.3 win32). It is failing miserably, because the xpath function appears to wrap my xml content in an element. It then tels me it can't parse the xml data because my xml fields have the at the star

Re: [GENERAL] 10.5 OS X ppc64 problem

2008-07-16 Thread Shane Ambler
David Brown wrote: I'm trying to install the ppc64 bit version on my server, It completes, but when I try to build PHP with postgre support, it complains about a set of libraries in the postgresql install and it dumps this: I am configuring with these settings. CFLAGS="-arch ppc -arch ppc64 -g

Re: [GENERAL] vacuum taking an unusually long time

2008-07-16 Thread Tom Lane
"Mason Hale" <[EMAIL PROTECTED]> writes: >> It looks like "read a page, sleep for 80 milliseconds, repeat". That's what it looks like to me too. >> I'd look at your settings for autovacuum_vacuum_cost_limit / >> autovacuum_vacuum_cost_delay, and maybe the contents of pg_autovacuum. > autovacuum_

Re: [GENERAL] vacuum taking an unusually long time

2008-07-16 Thread Mason Hale
> On Wed, Jul 16, 2008 at 10:26 AM, Mason Hale <[EMAIL PROTECTED]> wrote: >> Here's some of the strace output: >> >> select(0, NULL, NULL, NULL, {0, 1}) = 0 (Timeout) >> >> If I read the 'select(2)' man page correctly, it appears this process is >> waiting indefinitely for a NULL file descripto

Re: [GENERAL] Which design would be faster ...

2008-07-16 Thread Scott Marlowe
On Wed, Jul 16, 2008 at 8:40 AM, Haim Ashkenazi <[EMAIL PROTECTED]> wrote: > Hi > > I'm creating an application that have an fixed length alphanumeric key > and each key has (currently) up to 5 fixed length alphanumeric > variables. I was wondering which of the designs would be faster > considerin

Re: [GENERAL] vacuum taking an unusually long time

2008-07-16 Thread Steve Atkins
On Jul 16, 2008, at 4:40 PM, Mason Hale wrote: On Wed, Jul 16, 2008 at 10:26 AM, Mason Hale <[EMAIL PROTECTED]> wrote: Here's some of the strace output: select(0, NULL, NULL, NULL, {0, 1}) = 0 (Timeout) If I read the 'select(2)' man page correctly, it appears this process is waitin

Re: [GENERAL] unable to drop a constraint

2008-07-16 Thread Michael Glaesemann
On 2008-07-16, at 7:18 AM, Enrico Sirola wrote: Hi, I'm using postgresql version 8.3.1 I have two tables, one has a field with a foreign key pointing to the primary key of another table. When I to drop the first table, I get the following error: test=# drop table user; ERROR: "customer

Re: [GENERAL] vacuum taking an unusually long time

2008-07-16 Thread Mason Hale
On Wed, Jul 16, 2008 at 10:26 AM, Mason Hale <[EMAIL PROTECTED]> wrote: > Here's some of the strace output: > select(0, NULL, NULL, NULL, {0, 1}) = 0 (Timeout) > If I read the 'select(2)' man page correctly, it appears this process is waiting indefinitely for a NULL file descriptor. That look

Re: [GENERAL] vacuum taking an unusually long time

2008-07-16 Thread Mason Hale
Here's some of the strace output: select(0, NULL, NULL, NULL, {0, 1}) = 0 (Timeout) semop(9895945, 0x7fff1321db70, 1) = 0 read(72, "\233\7\0\0H\207f2\1\0\1\0`\0\0 \0 \4 \0\0\0\0\0\0\0\0\0\0\0\0"..., 8192) = 8192 select(0, NULL, NULL, NULL, {0, 8}) = 0 (Timeout) read(72, "!\5\0\0\370\2

Re: [GENERAL] UPDATE runs slow in a transaction

2008-07-16 Thread Viktor Rosenfeld
Yes, I either run begin; ... lots of other stuff in a script explain analyze update ... (called from the same script) rollback; or ... lots of other stuff in a script (same as above) explain analyze update ... Cheers, Viktor Am 16.07.2008 um 16:58 schrieb Pavel Stehule: this is strange. wh

Re: [GENERAL] UPDATE runs slow in a transaction

2008-07-16 Thread Viktor Rosenfeld
Hi, I have no idea why the trigger constraints are called in the first place since the respective columns are not touched in the query. Also with the old correlated subquery these trigger constraints were not called either. Cheers, Viktor Am 16.07.2008 um 17:01 schrieb Pavel Stehule:

Re: [GENERAL] UPDATE runs slow in a transaction

2008-07-16 Thread Pavel Stehule
hello second query: why without transactions are not called triggers constraint _FK_struct_2_collection and constraint _FK_struct_2_text? Regards Pavel Stehule 2008/7/16 Viktor Rosenfeld <[EMAIL PROTECTED]>: > Hi Pavel, > > thanks for the advice on how to uncorrelate the query. I must admit I

Re: [GENERAL] UPDATE runs slow in a transaction

2008-07-16 Thread Pavel Stehule
this is strange. what means "run under transaction"? you did exactly statements in psql console: begin; explain analyze select ... commit? regards Pavel Stehule 2008/7/16 Viktor Rosenfeld <[EMAIL PROTECTED]>: > Hi Pavel, > > thanks for the advice on how to uncorrelate the query. I must admit I

Re: [GENERAL] roll back to 8.1 for PyQt driver work-around

2008-07-16 Thread Guillaume Lelarge
Scott Frankel a écrit : [...] Here's the full text from the log file: FATAL: syntax error in file "/Library/PostgreSQL8/data/postgresql.conf" line 107, near token "kB" You can't use units in a pre-8.2 config file. FATAL: syntax error in file "/Library/PostgreSQL8/data/postgresql.conf"

Re: [GENERAL] UPDATE runs slow in a transaction

2008-07-16 Thread Viktor Rosenfeld
Hi Pavel, thanks for the advice on how to uncorrelate the query. I must admit I didn't know about the UPDATE ... SET ... FROM ... syntax. Now the UPDATE runs in an acceptable time inside a transaction, however the query plan still differs when I run it outside. Outside a transaction:

[GENERAL] Which design would be faster ...

2008-07-16 Thread Haim Ashkenazi
Hi I'm creating an application that have an fixed length alphanumeric key and each key has (currently) up to 5 fixed length alphanumeric variables. I was wondering which of the designs would be faster considering that I could have about million keys... The first design is the obvious one. create

Re: [GENERAL] unable to drop a constraint

2008-07-16 Thread Tom Lane
Enrico Sirola <[EMAIL PROTECTED]> writes: > I have two tables, one has a field with a foreign key pointing to the > primary key of another table. When I to drop the first table, I get > the following error: > test=# drop table user; > ERROR: "customer_pkey" is an index I don't think you're b

Re: [GENERAL] 8.3.3 regression test on SCO 5.0.7

2008-07-16 Thread Tom Lane
"Harvey, Allan AC" <[EMAIL PROTECTED]> writes: >> "Harvey, Allan AC" <[EMAIL PROTECTED]> writes: >>> creating template1 database in >>> /upgrades/postgres/postgresql-8.3.3/src/test/regress/./tmp_check/data/base/1 >>> ... =: is not an identifier > A diff of postgres.bki on the SCO system to anoth

Re: [GENERAL] Default fill factor for tables?

2008-07-16 Thread Roberts, Jon
> > I can find very little information on hot updates but I found this: > http://archives.postgresql.org/pgsql-patches/2006-11/msg00059.php > > > > It states, "This design optimizies the updates when none of the index > columns are modified and length of the tuple remains the same after > update."

[GENERAL] 10.5 OS X ppc64 problem

2008-07-16 Thread David Brown
I'm trying to install the ppc64 bit version on my server, It completes, but when I try to build PHP with postgre support, it complains about a set of libraries in the postgresql install and it dumps this: ibs/libphp5.bundle libs/libphp5.so ld: warning in /usr/local/pgsql/lib/libpq.dylib, file is

Re: [GENERAL] UPDATE runs slow in a transaction

2008-07-16 Thread Pavel Stehule
Hello my advice is little bit offtopic, I am sorry. Why you use correlated subquery? Your update statement should be update _struct set left_token = tmp.left_token from tmp where _struct.id = tmp.id; send output of explain analyze statement, please. etc explain analyze UPDATE _struct SET left_to

Re: [GENERAL] UPDATE runs slow in a transaction

2008-07-16 Thread Viktor Rosenfeld
Hi Tom, Postgres is indeed selecting a bad plan. Turns out that the index I created to speed up the UPDATE isn't used inside a transaction block. Here's the plan for "UPDATE _struct SET left_token = (SELECT DISTINCT left_token FROM tmp WHERE _struct.id = tmp.id)" outside of a transaction

[GENERAL] unable to drop a constraint

2008-07-16 Thread Enrico Sirola
Hi, I'm using postgresql version 8.3.1 I have two tables, one has a field with a foreign key pointing to the primary key of another table. When I to drop the first table, I get the following error: test=# drop table user; ERROR: "customer_pkey" is an index test=# select * from pg_constra

Re: [GENERAL] Referential integrity vulnerability in 8.3.3

2008-07-16 Thread Klint Gore
Sergey Konoplev wrote: > CREATE OR REPLACE FUNCTION fktrigfn() RETURNS TRIGGER AS $$ > BEGIN >PERFORM 1 FROM table1 WHERE a = OLD.aref; >IF FOUND THEN >RAISE NOTICE 'aborting delete for %', OLD.aref; >RETURN NULL; >ELSE >RAISE NOTICE 'allowing delete for %', OL