Re: LISTEN considered dangerous

Поиск
Список
Период
Сортировка
От Flemming Frandsen
Тема Re: LISTEN considered dangerous
Дата
Msg-id Pine.LNX.4.44.0608030033390.22172-100000@partyticket.net
обсуждение исходный текст
Ответ на Re: LISTEN considered dangerous  (Harald Fuchs <hf0731x@protecting.net>)
Список pgsql-general
On 2 Aug 2006, Harald Fuchs wrote:

> > all events that have happened after the snapshot that the transaction
> > represents (the start of the transaction).
>
> Here you're contradicting yourself.  In your second paragraph you
> state that LISTEN should get events unless later cancelled by a
> ROLLBACK.  How should LISTEN know if its transaction will commit or
> abort?

No, I'm not contradicting myself.

What I'm saying is that if you listen for an event then that event should
be delivered in the next transaction, if it happens after the start of the
transaction that you listen in.


The reason for this is that while you are in a transaction you see the
world as it existed at the time the transaction was started.

So if you decide that you want to be told about something then that wish
has to be in effect from the time of the start of the transaction, because
otherwise the state of the delivered events is not consistent with the
state of the rest of the data.



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

Предыдущее
От: MargaretGillon@chromalloy.com
Дата:
Сообщение: Re: Tape backup, 2 versions, same database name, which is pg_dump
Следующее
От: Flemming Frandsen
Дата:
Сообщение: Re: LISTEN considered dangerous