Re: [GENERAL] PQstatus does not seem to work

2009-08-10 Thread Juan Backson
Hi Tim, Thank you for your suggestion. In my application, it is a multi-thread and each thread will need to query 5 select statements. Right now, I am having my own pool of 500 PgConn inside the code. For each connection that I obtain from the connection pool, I am using direct socket into que

Re: [GENERAL] xlog flus not satisfied

2009-08-10 Thread Ow Mun Heng
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] "Ow Mun Heng" writes: >> As background, this is a new box mirrored from a separate box via rsync. >> I've basically copied/rsync the entire postgresql server and data files >>over >> to create a mirror copy. After which, I'v

Re: [GENERAL] xlog flus not satisfied

2009-08-10 Thread Tom Lane
"Ow Mun Heng" writes: > As background, this is a new box mirrored from a separate box via rsync. > I've basically copied/rsync the entire postgresql server and data files over > to create a mirror copy. After which, I've tried to do the vacuum and gotten > into the above trouble. Did you shut dow

[GENERAL] xlog flus not satisfied

2009-08-10 Thread Ow Mun Heng
While doing # VACUUM VERBOSE ANALYZE d_trr_dfh; INFO: vacuuming "xmms.d_trr_dfh" ERROR: xlog flush request 21F/9F57DF88 is not satisfied --- flushed only to 21F/924CE76C CONTEXT: writing block 2919652 of relation 17461/17462/17668 I see this in the logs user= CONTEXT: writing block

Re: [GENERAL] NOTICE: there is no transaction in progress

2009-08-10 Thread Shoaib Mir
On Tue, Aug 11, 2009 at 2:51 AM, John R Pierce wrote: > Rodrick Hales wrote: > >> We have two machines that run a C application that interfaces with a >> Postgres database. They are our development and production machines. The >> version is PostgreSQL 8.3.7 on i686-redhat-linux-gnu, complied by

Re: [GENERAL] Accessing a database form another database

2009-08-10 Thread Kobus Wolvaardt
Just a thought, but would it not be possible to add a trigger written in python that makes a connection to another database and does what it needs to? I have not done this, but if it is possible it should solve your problem and one that I have. It should allow updates and selects. I am sure the do

Re: [GENERAL] libpq

2009-08-10 Thread Scott Ribe
> I didn't remember seeing anywhere in the docs that you were supposed to check > for pqr==NULL, I wish they would document that in PQexec. It's right there in the first sentence of the discussion. > There is no mention of return values! ??? -- Scott Ribe scott_r...@killerbytes.com http://www.

Re: [GENERAL] Postgres memory question

2009-08-10 Thread Kobus Wolvaardt
Hi, Thanks for all the answers. I think I need to first look into the windows connection issue (where some memory pool gets used up and then new connections cannot be made). If that does not help, upping the ram by a bit might help (at least buy some time). And looking into tuning the options tha

Re: [GENERAL] Accessing a database form another database

2009-08-10 Thread Guy Rouillier
Bill Thoen wrote: I've got some GIS tables that I want to use across several projects and currently I've got each project in a separate database. So say I've got two databases, one for the Spacely Sprookets project and one for the Cogswell Cogs contract, but I want to access my WorldMap tables

Re: [GENERAL] Postgres memory question

2009-08-10 Thread Scott Marlowe
On Mon, Aug 10, 2009 at 3:16 PM, Allan Kamau wrote: > On Mon, Aug 10, 2009 at 7:49 PM, Vick Khera wrote: >> On Mon, Aug 10, 2009 at 9:46 AM, Bill Moran wrote: >>> We have servers using about 200 connections on average ... it climbs up >>> to 300+ during busy use.  I've seen it peak as high as 450,

Re: [GENERAL] Postgres memory question

2009-08-10 Thread Allan Kamau
On Mon, Aug 10, 2009 at 7:49 PM, Vick Khera wrote: > On Mon, Aug 10, 2009 at 9:46 AM, Bill Moran wrote: >> We have servers using about 200 connections on average ... it climbs up >> to 300+ during busy use.  I've seen it peak as high as 450, and we've seen >> no performance issues. >> >> This is a

Re: [GENERAL] Postgres memory question

2009-08-10 Thread Bill Moran
On Mon, 10 Aug 2009 13:49:02 -0400 Vick Khera wrote: > On Mon, Aug 10, 2009 at 9:46 AM, Bill Moran wrote: > > We have servers using about 200 connections on average ... it climbs up > > to 300+ during busy use.  I've seen it peak as high as 450, and we've seen > > no performance issues. > > > > T

Re: [GENERAL] libpq

2009-08-10 Thread Merlin Moncure
On Mon, Aug 10, 2009 at 4:03 PM, Jim Michaels wrote: > these are straight dll calls as outlined in Using Run-Time Dynamic Linking > (Windows) > that's why they look funny.  it is impossible to link VC++ .lib files with > mingw(gcc) .a libraries. that is not why they look funny...they look funny be

Re: [GENERAL] libpq

2009-08-10 Thread Jim Michaels
these are straight dll calls as outlined in Using Run-Time Dynamic Linking (Windows) that's why they look funny. it is impossible to link VC++ .lib files with mingw(gcc) .a libraries. yeah, I just found the PQntuples bug myself too, and got the program finished. thank you for the tips on usi

Re: [GENERAL] PQstatus does not seem to work

2009-08-10 Thread Tim Hart
On 8/10/09 12:08 PM, "Sam Mason" wrote: > On Tue, Aug 11, 2009 at 12:41:47AM +0800, Juan Backson wrote: >> I used PQstatus(conn) function to check connection status, but I found that >> it still returns CONNECTION_OK even after postgres is restarted. Does >> anyone know if there is another comm

Re: [GENERAL] using COPY and PARTITON

2009-08-10 Thread Scott Marlowe
On Mon, Aug 10, 2009 at 12:58 AM, cjm1010 wrote: > > thanks for reply > > I am using rules with libpq instead of triggers now. > When INSERT was used, it was possible to insert it in CHILD TABLE well. > However, if COPY is used, it is possible to insert it only in PARENT TABLE. > Can triggers be us

Re: [GENERAL] Postgres memory question

2009-08-10 Thread Vick Khera
On Mon, Aug 10, 2009 at 9:46 AM, Bill Moran wrote: > We have servers using about 200 connections on average ... it climbs up > to 300+ during busy use.  I've seen it peak as high as 450, and we've seen > no performance issues. > > This is a quad core with 4G of RAM.  Of course the OS isn't windows,

Re: [GENERAL] PQstatus does not seem to work

2009-08-10 Thread Sam Mason
On Tue, Aug 11, 2009 at 12:41:47AM +0800, Juan Backson wrote: > I used PQstatus(conn) function to check connection status, but I found that > it still returns CONNECTION_OK even after postgres is restarted. Does > anyone know if there is another command that I can use to check connection > status?

Re: [GENERAL] PQstatus does not seem to work

2009-08-10 Thread Tom Lane
Juan Backson writes: > I used PQstatus(conn) function to check connection status, but I found that > it still returns CONNECTION_OK even after postgres is restarted. Does > anyone know if there is another command that I can use to check connection > status? PQstatus isn't going to get updated u

Re: [GENERAL] Accessing a database form another database

2009-08-10 Thread David Fetter
On Mon, Aug 10, 2009 at 10:48:10AM -0600, Bill Thoen wrote: > I've got some GIS tables that I want to use across several projects > and currently I've got each project in a separate database. So say > I've got two databases, one for the Spacely Sprookets project and > one for the Cogswell Cogs c

Re: [GENERAL] NOTICE: there is no transaction in progress

2009-08-10 Thread John R Pierce
Rodrick Hales wrote: We have two machines that run a C application that interfaces with a Postgres database. They are our development and production machines. The version is PostgreSQL 8.3.7 on i686-redhat-linux-gnu, complied by GCC gcc (GCC) 4.1.2.20071124 (Red Hat 4.1.2-42) . On the deve

[GENERAL] Accessing a database form another database

2009-08-10 Thread Bill Thoen
I've got some GIS tables that I want to use across several projects and currently I've got each project in a separate database. So say I've got two databases, one for the Spacely Sprookets project and one for the Cogswell Cogs contract, but I want to access my WorldMap tables in my GIS database

[GENERAL] PQstatus does not seem to work

2009-08-10 Thread Juan Backson
Hi I used PQstatus(conn) function to check connection status, but I found that it still returns CONNECTION_OK even after postgres is restarted. Does anyone know if there is another command that I can use to check connection status? What other solution is available to check whether a connection

[GENERAL] NOTICE: there is no transaction in progress

2009-08-10 Thread Rodrick Hales
We have two machines that run a C application that interfaces with a Postgres database. They are our development and production machines. The version is PostgreSQL 8.3.7 on i686-redhat-linux-gnu, complied by GCC gcc (GCC) 4.1.2.20071124 (Red Hat 4.1.2-42) . On the development machine, I d

Re: [GENERAL] Postgresql Backups

2009-08-10 Thread sub_woofer
Hello all Thank you very much for your responses! I realised that the restores were not working as the databases were not being...backed up!...oops! After I did the reinstallation of the OS I forgot to give permissions in postgresql for the user doing the backup in ubuntu! I have fixed this. I h

Re: [GENERAL] Multiple foreign keys with the same name and information_schema

2009-08-10 Thread Jonathan Tapicer
> > Actually, the information_schema supposes that constraint names are > unique within a *schema*, not within a *catalog* (a/k/a database). > Don't know if that distinction can help you or not.  You are correct > that Postgres is less rigid.  We do not consider that to be a deficiency > on the Pos

Re: [GENERAL] Multiple foreign keys with the same name and information_schema

2009-08-10 Thread Tom Lane
Jonathan Tapicer writes: > I was a able to do it using the pg_catalog tables, but I haven't found > a way to do it using information_schema since it relies on foreign > keys names being unique in the same catalog. Is this a known > limitation? Actually, the information_schema supposes that constr

[GENERAL] Multiple foreign keys with the same name and information_schema

2009-08-10 Thread Jonathan Tapicer
Hello everyone, I have a question regarding foreign keys and information_schema. Given the following valid schema: CREATE TABLE "Cat" ( "IdCat" serial NOT NULL, CONSTRAINT "PK_Cat" PRIMARY KEY ("IdCat") ); CREATE TABLE "Art" ( "IdArt" serial NOT NULL, "IdCat" integer NOT NULL, CONSTRAIN

Re: [GENERAL] Postgres memory question

2009-08-10 Thread Bill Moran
In response to Kobus Wolvaardt : > 2009/8/9 Scott Marlowe > > > On Sun, Aug 9, 2009 at 4:06 AM, Kobus Wolvaardt > > wrote: > > > Hi, > > > > > > We have software deployed on our network that need postgres, we have > > server > > > that hosts the server and all worked fine until we crossed about

R: [GENERAL] batch inserts in python & libpq

2009-08-10 Thread Scara Maccai
> Is there a Python driver that uses the same protocol form > of addBatch in Java? I'll answer my own question: the method to be used should be cursor.executemany() -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.pos

Re: [GENERAL] psql crashing - don't know why

2009-08-10 Thread Martijn van Oosterhout
On Mon, Aug 10, 2009 at 11:04:24AM +1200, Brent Wood wrote: > Hi... > > I have a view across 3 tables, total some 5m rows. > > I can extract parts of the view, entire rows, with a where clause > (eg: select * from view where cell_id=10;) > > If I try to select the entire view (eg: select *

[GENERAL] ERROR: XLogFlush: request AF/5703EDC8 is not satisfied --- flushed only to AF/50F15ABC

2009-08-10 Thread utsav.turray
Dear All, I am using postgres 7.3 version on RHEL 4.0. My database has been restored. All tables all working fine i.e select , update but on a particular table its showing error ERROR: XLogFlush: request AF/5703EDC8 is not satisfied --- flushed only to AF/50F15ABC I have searched other threads

Re: [GENERAL] using COPY and PARTITON

2009-08-10 Thread cjm1010
thanks for reply I am using rules with libpq instead of triggers now. When INSERT was used, it was possible to insert it in CHILD TABLE well. However, if COPY is used, it is possible to insert it only in PARENT TABLE. Can triggers be used with libpq? And, if trigger is used, can it straighten

Re: [GENERAL] using COPY and PARTITON

2009-08-10 Thread Wojtek
Hi, I'd recommend coping directly to child tables (partitions). It's much faster. Regards, foo Scott Marlowe wrote: I believe triggers can do it. On Sun, Aug 9, 2009 at 11:15 PM, cjm1010 wrote: hi~ I want to insert DATA by using the COPY making PARTITON TABLE. By the way, DATA is inse