Re: message type 0x50 - Mailing list pgsql-general

From Tom Lane
Subject Re: message type 0x50
Date
Msg-id 8534.1063214751@sss.pgh.pa.us
Whole thread Raw
In response to message type 0x50  (Alessandro GARDICH <gremlin@gremlin.it>)
List pgsql-general
Alessandro GARDICH <gremlin@gremlin.it> writes:
> with setittimer and SIGALRM i do an explicit COMMIT every 10 seconds,
> update loop have a random delay from 0 to 500 msec using usleep().
> I have problems using SIGALRM and libpq (libpqxx exactly), does libpq
> use select or other signal ???

Are you trying to execute database operations from inside the SIGALRM
signal handler?  Perhaps these operations are interrupting something at
the main level?  libpq is not re-entrant for operations on a single
connection.

> P.S. on the table there is a trigger that execute an NOTIFY every
> update, but only one is received also if many updates happen between
> commits ... why ???

Because that's the way NOTIFY works.

            regards, tom lane

pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Picture with Postgres and Delphi
Next
From: Holger Marzen
Date:
Subject: Re: Find overlapping time intervals, how?