From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Sync Rep v19 |
Date: | 2011-03-06 14:26:22 |
Message-ID: | AANLkTinNZjF7KMWMP=mTViADhEjqzn1iHSRqNUJk1kEY@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Mar 6, 2011 at 5:26 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On Sun, 2011-03-06 at 16:58 +0900, Fujii Masao wrote:
>> On Sun, Mar 6, 2011 at 4:51 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> > One comment; what about introducing built-in function to wake up all the
>> > waiting backends? When replication connection is closed, if we STONITH
>> > the standby, we can safely (for not physical data loss but logical one)
>> > switch the primary to standalone mode. But there is no way to wake up
>> > the waiting backends for now. Setting synchronous_replication to OFF
>> > and reloading the configuration file doesn't affect the existing waiting
>> > backends. The attached patch introduces the "pg_wakeup_all_waiters"
>> > (better name?) function which wakes up all the backends on the queue.
>>
>> If unfortunately all connection slots are used by backends waiting for
>> replication, we cannot execute such a function. So it makes more sense
>> to introduce something like "pg_ctl standalone" command?
>
> Well, there is one way to end the wait: shutdown, or use
> pg_terminate_backend().
Immediate shutdown can release the wait. But smart and fast shutdown
cannot. Also pg_terminate_backend() cannot. Since a backend is waiting
on the latch and InterruptHoldoffCount is not zero, only SetLatch() or
SIGQUIT can cause it to end.
> If you simply end the wait you will get COMMIT messages.
>
> What I would like to do is commit the "safe" patch now. We can then
> discuss whether it is safe and desirable to relax some aspects of that
> during beta.
OK if changing some aspects is acceptable during beta.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2011-03-06 14:44:58 | Re: Sync Rep v19 |
Previous Message | Fujii Masao | 2011-03-06 14:10:51 | Re: Replication server timeout patch |