Re: OT: Question about transactions - Mailing list pgsql-jdbc

From Richard Broersma
Subject Re: OT: Question about transactions
Date
Msg-id 396486430808121321y1b65ba99q561c1a9fa820a1ae@mail.gmail.com
Whole thread Raw
In response to OT: Question about transactions  ("Paul Tomblin" <ptomblin@gmail.com>)
List pgsql-jdbc
On Tue, Aug 12, 2008 at 1:09 PM, Paul Tomblin <ptomblin@gmail.com> wrote:

> is there a way for the other JVMs to get a consistent view
> of the database?

My understanding is that PostgreSQL only supports two forms of
transaction Isolation: READ COMMITED AND SERIALIZABLE.  This means
that only the client that has opened the transaction can see
un-commited data.  All other client instances will see only the
commited data.

>  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,

I'm not to sure on this one.  If the other JVM are using a seperate
connection, I wouldn't expect you to be able to achieve consistant
results. However, maybe postgreSQL's LISTEN and NOTIFY will do what
you need?
http://www.postgresql.org/docs/8.3/interactive/sql-listen.html
http://www.postgresql.org/docs/8.3/interactive/sql-notify.html


--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

pgsql-jdbc by date:

Previous
From: "Paul Tomblin"
Date:
Subject: PreparedStatement timeouts?
Next
From: Andrew Sullivan
Date:
Subject: Re: OT: Question about transactions