Re: BUG #9557: Row not visible after receiving notification

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: BUG #9557: Row not visible after receiving notification
Дата
Msg-id 5321AAAF.4020207@joh.to
обсуждение исходный текст
Ответ на BUG #9557: Row not visible after receiving notification  (marko@joh.to)
Ответы Re: BUG #9557: Row not visible after receiving notification  (Marko Tiikkaja <marko@joh.to>)
Список pgsql-bugs
On 3/13/14 10:39 AM, marko@joh.to wrote:
> We went live with an application a few days ago, and it's been having
> problems with seeing rows after receiving a notification from the
> transaction that committed it.  I can't say for sure how often it happens,
> but I've seen evidence suggesting at least three separate occasions.

I can reproduce this locally with some trickery.  Here's what I did:

   1) Stop the listener at HandleNotifyInterrupt() (suppose an unrelated
notification comes in in the real world).
   2) In another backend, do what the application would normally do, but
stop it before ProcArrayEndTransaction().
   3) Let the notification go through to the listener.  It sees *both*
notifications (since the new one has been committed to CLOG).
   4) SELECT from the frontend after seeing the notification (#2 is
still stuck right before ProcArrayEndTransaction).

This would explain it, as I don't see the notification code checking
whether the transaction is still in PGPROC, just calling
TransactionIdDidCommit().

Any thoughts?


Regards,
Marko Tiikkaja

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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: BUG #9118: WAL Sender does not disconnect replication clients during shutdown
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: BUG #9557: Row not visible after receiving notification