Re: any way for a transaction to "see" inserts done earlier in the transaction? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: any way for a transaction to "see" inserts done earlier in the transaction?
Date
Msg-id 534F3D26.7080508@aklaver.com
Whole thread Raw
In response to Re: any way for a transaction to "see" inserts done earlier in the transaction?  (Susan Cassidy <susan.cassidy@decisionsciencescorp.com>)
Responses Re: any way for a transaction to "see" inserts done earlier in the transaction?  (Susan Cassidy <susan.cassidy@decisionsciencescorp.com>)
List pgsql-general
On 04/16/2014 05:24 PM, Susan Cassidy wrote:
> I marked it volatile, and still the next time I call the function after
> the first insert, using the previous new id as as input parameter, it
> still can't "find" the newly inserted id for the next go-round.  Nor can
> any regular SELECTs in the main program find it.

To expand on my earlier post and to address all the different scenarios
proposed, it might to be a good idea to expand on what you are logging.
The caveat is whether you are working against a production server or a
development. In the development case you would presumably be able to
more easily limit the scope of what you are observing. In that case
turning up the log_statement to 'all' in postgresql.conf would give you
a picture of what is actually hitting the database. So you could see if
there where multiple connections happening or multiple transactions in a
connection or if different tables where being used, etc. That would help
create some anchor points from which you could backwards engineer to
possible causes.

>
> Susan
>
>



--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: any way for a transaction to "see" inserts done earlier in the transaction?
Next
From: Michael Paquier
Date:
Subject: Re: shared memory allocation - C function