[GENERAL] Range Partititioning & Constraint Exclusion Oddities

2008-09-05 Thread Ow Mun Heng
Hi, appreciate if someone can help shed some light on what i may be doing wrong. I know there are caveat on using constraint exclusion to reduce the # of partitions scanned. pg:8.2.9 create table test ( code varchar, dummy_col1 int, dummy_col2 int ) create table test_experimental_code ( code

Re: [GENERAL] Postgresql optimisator deoptimise queries sometime...

2008-09-05 Thread Maxim Boguk
Anyone can commet that issue? More extremal sample (simplified version of what i get in real world situation): same table data... Query: select * from (SELECT table1.id,(select count(*) from table2 where table2.fk=table1.id) as total from table1) as t1 where total=990 or total=991 or total=992 o

Re: [GENERAL] Prepared statements aren't working with parameters with PQexecParams

2008-09-05 Thread David Wilson
On Fri, Sep 5, 2008 at 2:52 AM, Subspace god <[EMAIL PROTECTED]> wrote: > The following does not work in C++, executed as above, in another session > using two subsequent calls to PQexecParams > > PREPARE myquery (text) AS INSERT INTO myTable (word) VALUES ($1); > EXECUTE myquery($1::text); You'r

[GENERAL] max_stack_depth Exceeded

2008-09-05 Thread Ow Mun Heng
Hi, I'm playing around with triggers to implement partitioning. I hit something which I don't know what and I don't have internet here at work to find out what is the cause. ERROR : stack depth limit exceeded I see that this is one of the options in postgresql.conf but I don't know exactly wha

Re: [GENERAL] max_stack_depth Exceeded

2008-09-05 Thread Magnus Hagander
Ow Mun Heng wrote: > Hi, > > I'm playing around with triggers to implement partitioning. > I hit something which I don't know what and I don't have internet here > at work to find out what is the cause. > > > ERROR : stack depth limit exceeded > > I see that this is one of the options in postg

Re: [GENERAL] max_stack_depth Exceeded

2008-09-05 Thread Ow Mun Heng
On Fri, 2008-09-05 at 10:35 +0200, Magnus Hagander wrote: > Ow Mun Heng wrote: > > Hi, > > > > I'm playing around with triggers to implement partitioning. > > I hit something which I don't know what and I don't have internet here > > at work to find out what is the cause. > > > > > > ERROR : st

[GENERAL] xml queries & date format

2008-09-05 Thread Jef Peeraer
i am using the xml add-ons, but the date output format seems to be wrong : i have show datestyle; DateStyle --- SQL, DMY select agenda_datum from dossiers where id = 61; agenda_datum -- 29/07/2008 select table_to_xml('dossiers', false, false, ''); gives (knip ) 62

Re: [GENERAL] Cannot connect to server

2008-09-05 Thread Filip Rembiałkowski
2008/9/5 Paul Shapley <[EMAIL PROTECTED]>: > Hi, > > > > I am attempting to 'add a connection' to the postgres database using > pgadminlll v_1.8.4, postgresql v 8.3.3 - 1 with PostGis 1.3.3 on Mac OS > 10.5.4. > > > > After an initial installation it may connect successfully for a couple of > days

Re: [GENERAL] max_stack_depth Exceeded

2008-09-05 Thread Magnus Hagander
Ow Mun Heng wrote: > On Fri, 2008-09-05 at 10:35 +0200, Magnus Hagander wrote: >> Ow Mun Heng wrote: >>> Hi, >>> >>> I'm playing around with triggers to implement partitioning. >>> I hit something which I don't know what and I don't have internet here >>> at work to find out what is the cause. >>>

Re: [GENERAL] Cannot connect to server

2008-09-05 Thread Reid Thompson
On Fri, 2008-09-05 at 11:44 +0200, Filip Rembiałkowski wrote: > > is the server running (see process list, ps ax | grep postgres) > does the socket file exist? (see filesystem, ls -l /tmp/.s.PGSQL.5432) Since you say things work for several days, then stop -- make sure there's no braindead automa

[GENERAL] large inserts and fsync

2008-09-05 Thread Aaron Burnett
Forgive me if this is a many-times rehashed topic. I¹m very new to postgresql, most of my background is in Oracle. Running postgres 8.2.5 with one master and three slaves (using slony) For an upcoming release there is a 16 million row insert that on our test cluster takes about 2.5 hours to comp

Re: [GENERAL] a performence question

2008-09-05 Thread Filip Rembiałkowski
2008/9/4 Rafal Pietrak <[EMAIL PROTECTED]>: > Hi, > > Maybe someone on this list actually have already tried this: > > I'm planning to make a partitioned database. From Postgres documentation > I can see, that there are basically two methods to route INSERTS into > partitioned table: >one.

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Sam Mason
On Fri, Sep 05, 2008 at 09:16:41AM -0400, Aaron Burnett wrote: > For an upcoming release there is a 16 million row insert that on our test > cluster takes about 2.5 hours to complete with all indices dropped > beforehand. > > If I turn off fsync, it completes in under 10 minutes. Have you tried b

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Aaron Burnett
Yes, the developer already made sure of that and I verified. On 9/5/08 11:10 AM, "Sam Mason" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 05, 2008 at 09:16:41AM -0400, Aaron Burnett wrote: >> For an upcoming release there is a 16 million row insert that on our test >> cluster takes about 2.5 hours

Re: [GENERAL] max_stack_depth Exceeded

2008-09-05 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > Ow Mun Heng wrote: >> Am I doing something wrong? > If your trigger is defined on the head_raw_all_test_2 table, then yes. > Because it will do a new insert there, and the new insert will fire the > trigger again, which will do a new insert, which wil

Re: [GENERAL] xml queries & date format

2008-09-05 Thread Tom Lane
Jef Peeraer <[EMAIL PROTECTED]> writes: > i am using the xml add-ons, but the date output format seems to be wrong : I think the conversion to xml intentionally always uses ISO date format, because that's required by some spec somewhere. regards, tom lane -- Sent via pgs

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Sam Mason
On Fri, Sep 05, 2008 at 11:19:13AM -0400, Aaron Burnett wrote: > On 9/5/08 11:10 AM, "Sam Mason" <[EMAIL PROTECTED]> wrote: > > On Fri, Sep 05, 2008 at 09:16:41AM -0400, Aaron Burnett wrote: > >> For an upcoming release there is a 16 million row insert that on our test > >> cluster takes about 2.5

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Alan Hodgson
> > > Have you tried bundling all the INSERT statements into a single > > > transaction? > > > > Yes, the developer already made sure of that and I verified. I would verify that again, because fsync shouldn't make much of a difference in that circumstance. I might not do all 16 million in one tra

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Tom Lane
Aaron Burnett <[EMAIL PROTECTED]> writes: > On 9/5/08 11:10 AM, "Sam Mason" <[EMAIL PROTECTED]> wrote: >> Have you tried bundling all the INSERT statements into a single >> transaction? > Yes, the developer already made sure of that and I verified. Hmm, in that case the penalty probably comes fro

[GENERAL] Error Installing Postgre 8.3 Silent Mod

2008-09-05 Thread Anderson dos Santos Donda
Hi All I'm trying to install the Postgre 8.3 on Windows XP/Vista using the silent mod of msi. But, the installation returns "Internal Account lookup Failure" after create the service account user. Here is my line: msiexec /i postgresql-8.3-int.msi /qr ADDLOCAL=server,psql,pgadmin INTERNALLAUNCH

Re: [GENERAL] max_stack_depth Exceeded

2008-09-05 Thread Ow Mun Heng
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2008 11:22 PM To: Magnus Hagander Cc: Ow Mun Heng; pgsql-general@postgresql.org Subject: Re: [GENERAL] max_stack_depth Exceeded Magnus Hagander <[EMAIL PROTECTED]> writes: > Ow Mun Heng wrote: >> Am

Re: [GENERAL] log_statement not working on pl/pgsql functions

2008-09-05 Thread Bruce Momjian
Fernando Moreno wrote: > Hi, I've changed the setting log_statement to mod, in order to log data > modifications, and it's working fine with sentences sent by the client > application (psql included), but insert/update/delete sentences executed > inside functions are not logged. Functions are calle