pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joseph Shraibman <jks@selectacast.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@hub.org <pgsql-general@hub.org>
Cc: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgreSQL.org>
Subject: Re: select for update not locking properly.
Date: Thu, 13 Jul 2000 14:43:20 -0400
Message-ID: <396E0DC8.D8CDF135@selectacast.net> (raw)
References: <396D2AEA.5D19984A@selectacast.net>
	<28676.963473660@sss.pgh.pa.us>
	<396E06AB.7544C109@selectacast.net>
	<1240.963513335@sss.pgh.pa.us>

Damn, I though having seperate Statement objects was supposed to take
care of that.

Peter can you confirm this?

Tom Lane wrote:
> 
> 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



view thread (6+ messages)

Message-ID: <396E0DC8.D8CDF135@selectacast.net>
Permalink:  ../396E0DC8.D8CDF135@selectacast.net/
Also on:    postgresql.org/message-id/396E0DC8.D8CDF135@selectacast.net

 · 

reply

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: jks@selectacast.net, tgl@sss.pgh.pa.us, pgsql-general@hub.org
  Subject: Re: select for update not locking properly.
  In-Reply-To: <396E0DC8.D8CDF135@selectacast.net>

* 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