pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill Moran <wmoran@potentialtech.com>
To: scott.marlowe <scott.marlowe@ihs.com>
Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: Saleem Burhani Baloch <peseek@khi.wol.net.pk>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow response of PostgreSQL
Date: Tue, 17 Feb 2004 21:21:31 -0500
Message-ID: <4032CC2B.9030208@potentialtech.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0402171848520.32355-100000@css120.ihs.com>
References: <Pine.LNX.4.33.0402171848520.32355-100000@css120.ihs.com>

scott.marlowe wrote:
> On Wed, 18 Feb 2004, Christopher Kings-Lynne wrote:
> 
>>>>>1- How can I lock a single record so that other users can only read 
>>>>>it. ??
>>>>
>>>>
>>>>You cannot do that in PostgreSQL.
>>>
>>>
>>>How about SELECT ... FOR UPDATE?
>>
>>No, because users cannot read the locked row in that case.
> 
> I just tested it (within transactions) and it appeared that I could still 
> view the rows selected for update.

Thank you.  I was just about to test it myself.

The user's guide, section 9.3.2 states that this is the case: i.e. select
for update will prevent concurrent updating of the row, while allowing
queries utilizing that row to succeed.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com




view thread (18+ messages)  latest in thread

Message-ID: <4032CC2B.9030208@potentialtech.com>
Permalink:  ../4032CC2B.9030208@potentialtech.com/
Also on:    postgresql.org/message-id/4032CC2B.9030208@potentialtech.com

 · 

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-performance@postgresql.org
  Cc: wmoran@potentialtech.com, scott.marlowe@ihs.com, chriskl@familyhealth.com.au, peseek@khi.wol.net.pk
  Subject: Re: Slow response of PostgreSQL
  In-Reply-To: <4032CC2B.9030208@potentialtech.com>

* 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