Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1IFYEE99581 for ; Mon, 18 Feb 2002 10:34:15 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g1IFYDP19471; Mon, 18 Feb 2002 10:34:13 -0500 (EST) From: Bruce Momjian Message-Id: <200202181534.g1IFYDP19471@candle.pha.pa.us> Subject: Re: table locking In-Reply-To: <200202181521.g1IFLwk24097@fullerruss.dsvr.co.uk> To: me@shanewright.co.uk Date: Mon, 18 Feb 2002 10:34:13 -0500 (EST) CC: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL96 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200202/214 X-Sequence-Number: 6638 Shane Wright wrote: > Hi Bruce > > Thanks for the information (and the book link, straight in the bookmarks and > remembered for an Amazon search...) > > Anyway, the chapter was helpful, but I'm still stuck. SERIALIZABLE looks > like it would do the job, but I don't want any queries to fail/rollback - I'd > rather they stalled on SET TRANSACTION or LOCK TABLE until the first was > complete. > > Is this possible? > > I am also assuming that even with SERIALIZABLE, concurrent SELECTs can > proceed unhindered? Actually, I think the default READ COMMITTED will work fine for you. Backends will block waiting for your write, then continue when you commit, and reads will not be affected. I am not totally sure what you are testing, so I suggest starting two psql sessions and trying it. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026