Skip site navigation (1) Skip section navigation (2)

OT: Question about transactions

From: "Paul Tomblin" <ptomblin(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: OT: Question about transactions
Date: 2008-08-12 20:09:48
Message-ID: 8efd35820808121309y2cef4692w3ed4869419589931@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
I know this isn't strictly a JDBC issue, so feel free to ignore me.

If I've got one Java program that's doing database updates and then
firing events (through RMI/Observer/JMS, etc) to tell the other JVMs
to do some time-consuming things that fetch those items from the
database, is there a way for the other JVMs to get a consistent view
of the database?  For instance, if program 1 updates something in the
database and commits, and then tells everybody that's it's updated,
and then deletes the item from the database and commits, and then
tells everybody that it's deleted, is there a way that the other
programs can see the database as it was before the second commit until
they go to process the second message?  Could they do a "BEGIN
TRANSACTION" at the start and "END TRANSACTION" when they're done
processing, even though the processing only does queries and not
updates?  Or do I have to just suck it up and make it so that
everybody querying the database can handle things going away at
in-opportune times?

-- 
House: "Because it doesn't hurt here. Because I don't want to be in
pain, I don't want to be miserable."
Amber: "Well...You can't always get what you want."

Responses

pgsql-jdbc by date

Next:From: Paul TomblinDate: 2008-08-12 20:13:01
Subject: PreparedStatement timeouts?
Previous:From: Vic SimkusDate: 2008-08-11 19:49:26
Subject: Re: SSL connection and client verification

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group