Re: Locking rows

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Locking rows
Дата
Msg-id 1046444926.430.90.camel@tokyo
обсуждение исходный текст
Ответ на Locking rows  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список pgsql-general
On Fri, 2003-02-28 at 05:26, Jean-Christian Imbeault wrote:
> I have written an application that prints out data from a database. One
> problem I am encountering is in the time it takes to generate the print
> file the data may have changed.

Is that a problem? ISTM that if you need to keep the DB consistent
during the entire print job, you're going to get pretty poor concurrent
performance regardless.

> I've read the iDocs and Bruce's online manual but can seem to find any
> info on the syntax for locking other that for SELECT FOR UPDATE. And
> even then the docs don't state how to remove the lock created by a
> SELECT FOR UPDATE.

The docs on FOR UPDATE say:

This prevents them from being modified or deleted by other transactions
until the current transaction ends; that is, other transactions that
attempt UPDATE, DELETE, or SELECT FOR UPDATE of these rows will be
blocked until the current transaction ends.

Cheers,

Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC




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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Locking rows
Следующее
От: Jonathan Bartlett
Дата:
Сообщение: Re: Few Simple Questions