Re: Listen / Notify - what to do when the queue is full - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Listen / Notify - what to do when the queue is full
Date
Msg-id 4B0665FC.8000308@enterprisedb.com
Whole thread Raw
In response to Re: Listen / Notify - what to do when the queue is full  (Joachim Wieland <joe@mcknight.de>)
List pgsql-hackers
Joachim Wieland wrote:
> On Fri, Nov 20, 2009 at 7:51 AM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>>> Note that we don't preserve notifications when the database restarts.
>>> But 2PC can cope with restarts. How would that fit together?
>> The notifications are written to the state file at prepare. They can be
>> recovered from there and written to the queue again at server start (see
>> twophase_rmgr.c).
> 
> Okay, but which of the backends would then leave its pointer at that
> place in the queue upon restart?
> 
> This is also an issue for the non-restart case, what if you prepare
> the transaction in one backend and commit in the other?

The dummy procs that represent prepared transactions need to be treated
as backends. Each prepared transaction needs a slot of its own in the
backends array.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Joachim Wieland
Date:
Subject: Re: Listen / Notify - what to do when the queue is full
Next
From: Tino Wildenhain
Date:
Subject: Re: Python 3.1 support