Re: LISTEN/NOTIFY and notification timing guarantees

Поиск
Список
Период
Сортировка
От Joachim Wieland
Тема Re: LISTEN/NOTIFY and notification timing guarantees
Дата
Msg-id dc7b844e1002160503t255b97c1n8a545eced38e0673@mail.gmail.com
обсуждение исходный текст
Ответ на Re: LISTEN/NOTIFY and notification timing guarantees  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: LISTEN/NOTIFY and notification timing guarantees  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Feb 16, 2010 at 1:31 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Tom Lane  wrote:
>> We could adopt the historical policy of sending self-notifies
>> pre-commit, but that doesn't seem tremendously appetizing from the
>> standpoint of transactional integrity.
>
> But one traditional aspect of transactional integrity is that a
> transaction always sees *its own* uncommitted work.

True but notifications aren't sent until the transaction commits
anyway. At the time when an application receives its self-notifies, it
has already committed the transaction so there is no uncommitted work
anymore.


> Wouldn't the
> historical policy of PostgreSQL self-notifies be consistent with
> that?

No. The policy is also to not see the committed work if for some
reason the transaction had to roll back during commit. In this case
we'd also expect getting no notification from this transaction at all
and this is what is violated here.


Joachim


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

Предыдущее
От: Hitoshi Harada
Дата:
Сообщение: Re: ToDo: plpgsql plugin for query and expression verification
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: OpenVMS?