Re: [HACKERS] Re: locking - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: locking
Date
Msg-id 199801211505.KAA20684@candle.pha.pa.us
Whole thread Raw
In response to Re: locking  (Jan Vicherek <honza@ied.com>)
Responses Re: [QUESTIONS] Re: [HACKERS] Re: locking  (Leslie Mikesell <les@Mcs.Net>)
List pgsql-hackers
>
>
>   *Any* answers would be appreciated :
>
>  I'll rephrase the original questions :
>
> pg doesn't have "row-level locking" but has "table locking".
> a result from a SELECT * FROM TESTTABLE; is a table.
> I lock the table (which is result of a SELECT).
>
>  Q : will this locking prevent update of the rows in TESTTABLE that have
> been SELECTed ?
>

While the SELECT is running, no one can update the table.  If the SELECT
is in a transaction, no one can update the table until the transaction
completes.  Other people can read from the table, though.

--
Bruce Momjian
maillist@candle.pha.pa.us

pgsql-hackers by date:

Previous
From: fabri@orion.it
Date:
Subject: unsubscribe
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: subselects