Re: determine snapshot after obtaining locks for first statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: determine snapshot after obtaining locks for first statement
Дата
Msg-id 18798.1261006423@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: determine snapshot after obtaining locks for first statement  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: determine snapshot after obtaining locks for first statement  ("Markus Wanner" <markus@bluegap.ch>)
Список pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> (Besides which the lock acquired by UPDATE isn't exclusive and
>> wouldn't block anyway...)
> It blocks other UPDATEs.

Not at the table level.  If you could lock only at the tuple level
maybe you'd have something, but it seems like you can't find the
target tuples without having acquired a snapshot.

>> If he's talking about automatically taking an exclusive lock, I
>> doubt very many of our users would find that an improvement.
> I don't believe he's talking about a lock which excludes SELECTs on
> the data.

Well, you could take such a lock (one that blocks other UPDATEs but
not SELECTs) but it would be a clear loss of concurrency compared to
what we have now.  Unless I misunderstand what you're talking about,
it'd serialize all updates on a given table whether they conflict or
not.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: PATCH: Add hstore_to_json()
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: Does "verbose" Need to be Reserved?