Re: Re: LOCK TABLE

Поиск
Список
Период
Сортировка
От Patrick Welche
Тема Re: Re: LOCK TABLE
Дата
Msg-id 20000918181538.K2791@quartz.newn.cam.ac.uk
обсуждение исходный текст
Ответ на Re: Re: LOCK TABLE  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
On Sun, Sep 17, 2000 at 12:50:26PM -0700, Stephan Szabo wrote:
>
> If you always SELECT ... FOR UPDATE (in all transactions that access it),
> then the second one will not see the DB state before the transaction is
> started, because the row is locked and the second transaction won't be
> able to get its lock and will instead wait.  Admittedly this lowers your
> ability to have concurrent reads of the same rows as well, so you would
> want the other transactions to hold the lock for as short a time as
> possible.

I was wondering, if I do something like

select * from person order by surname for update limit 1 offset 10;

as there is no where clause, am I locking the whole table?


Cheers,

Patrick

В списке pgsql-general по дате отправления:

Предыдущее
От: "Muggleton, Keith"
Дата:
Сообщение: Geometric Operations
Следующее
От: Scott Holdren
Дата:
Сообщение: multiple referential integrity