From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joseph Shraibman <jks@selectacast.net>
Cc: pgsql-general@hub.org <pgsql-general@hub.org>
Subject: Re: select for update not locking properly.
Date: Thu, 13 Jul 2000 14:35:35 -0400
Message-ID: <1240.963513335@sss.pgh.pa.us> (raw)
In-Reply-To: <396E06AB.7544C109@selectacast.net>
References: <396D2AEA.5D19984A@selectacast.net>
<28676.963473660@sss.pgh.pa.us>
<396E06AB.7544C109@selectacast.net>
Joseph Shraibman <jks@selectacast.net> writes:
> OK here is the test program.
I don't know Java hardly at all, but it looks like you've got ten
threads in Java all issuing commands through a *single* connection
to a single backend. Postgres isn't going to lock those threads
against each other for you ... it has no idea whatever that the
sequence of commands it's seeing aren't all from one thread.
You'd need to have ten separate connections to ten separate backends
to get the behavior you're expecting. Try putting the Connection
objects into the Adder objects and firing them up at Adder creation.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, jks@selectacast.net, pgsql-general@hub.org
Subject: Re: select for update not locking properly.
In-Reply-To: <1240.963513335@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox