Waiting for Commit

From: "Pablo Montilla" <melkor(at)adinet(dot)com(dot)uy>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Waiting for Commit
Date: 2004-03-26 20:25:44
Message-ID: 005e01c41370$85e6b210$7d00a8c0@athena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello, I don't know if this is the right place for this question,
sorry in advance.

So, the question is: how can I wait for a transaction commited data
to be available to other sessions programmatically? I need to read
data in a different session than the one that commits it, but I'm
having timing problems, and can't seem to be able to synchronize
them.

What I've got is something like this:

Session1> INSERT INTO Table VALUES(0);
Session1> COMMIT;
Session2> SELECT FROM Table;

And Session2 is not gettint the values I've just commited.

Many thanks,
Pablo

- --
An assertion is Zen only when it is itself an act and does not refer
to
anything that is asserted in it.
-- (from Bruce Lee's book, The Tao of Jeet Kune Do)

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQGSRxr6KEogX0AkqEQKGLwCgmR+sn1/YnoRNlNIzK6OVkNo2cm8An2tm
b0dz1bNuAUpFtQbaa/KZHkl3
=ZkFI
-----END PGP SIGNATURE-----

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Diogo Biazus 2004-03-26 20:29:21 Problem with memory in C function
Previous Message Eric Ridge 2004-03-26 20:08:29 pg 7.3, cursors, and prepared queries