Re: SELECT FOR UPDATE - release lock?

Поиск
Список
Период
Сортировка
От Luís Silva
Тема Re: SELECT FOR UPDATE - release lock?
Дата
Msg-id BAY117-DAV16DACD6A29D96EEA9B7D93B5B50@phx.gbl
обсуждение исходный текст
Ответ на Re: SELECT FOR UPDATE - release lock?  (Bruno Wolff III <bruno@wolff.to>)
Ответы Re: SELECT FOR UPDATE - release lock?  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-novice
Locks only affects the lines in the table selected in the sql query, right?

-----Mensagem original-----
De: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org] Em nome de Bruno Wolff III
Enviada: quinta-feira, 4 de Maio de 2006 20:21
Para: Christian Hofmann
Cc: pgsql-novice@postgresql.org
Assunto: Re: [NOVICE] SELECT FOR UPDATE - release lock?

On Thu, May 04, 2006 at 22:08:16 +0200,
  Christian Hofmann <christian.hofmann@gmx.de> wrote:
> Hello,
>
> for some tables I am using a "select a,b,c from mytable where x='abc' FOR
> UPDATE" query to prevent other servers also modify this data while I am
> reading the data and decide to modify the data.
>
> Now sometimes I don't want to make an update. Is there a way to release
the
> lock. Or is the lock released by simply call commit?

Locks are released when transactions end.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

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

Предыдущее
От: Joao Miguel Ferreira
Дата:
Сообщение: what are the pg_clog and pg_xlog directories ?
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: SELECT FOR UPDATE - release lock?