Re: synchronous_commit = apply
От | Thomas Munro |
---|---|
Тема | Re: synchronous_commit = apply |
Дата | |
Msg-id | CAEepm=2_dDqQxgGc83_a48rYza3T4P4vPTpSC6xkHcMEoGyspw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: synchronous_commit = apply (Thomas Munro <thomas.munro@enterprisedb.com>) |
Ответы |
Re: synchronous_commit = apply
|
Список | pgsql-hackers |
On Tue, Sep 8, 2015 at 1:11 AM, Thomas Munro <thomas.munro@enterprisedb.com> wrote:
Here is a version that does that, using a bit in xinfo to request apply feedback from standbys when running with synchronous_commit = apply.
I am not very happy with the way that xact_redo communicates with the main apply loop when it sees that bit, through calls to XLogAppliedSynchronousCommit (essentially a global variable), but I couldn't immediately see a better way to get information out of xact_redo into the apply loop without changing the rm_redo interface. Perhaps xinfo is the wrong place for that information. Thoughts?
On Thu, Sep 3, 2015 at 12:02 AM, Fujii Masao <masao.fujii@gmail.com> wrote:One idea is to change the standby so that it manages the locations
that the backends in "apply" mode are waiting for in the master,
and to make the startup process wake the walreceiver up whenever
the replay location reaches either of those locations. In this idea,
walreceiver sends back the "apply" location to the master only when
needed.
Hmm. So maybe commit records could have a flag saying 'someone is waiting for this to commit to apply', and the startup process's apply loop would only bother to signal the walreceiver if it sees that flag. I will try that.
Here is a version that does that, using a bit in xinfo to request apply feedback from standbys when running with synchronous_commit = apply.
I am not very happy with the way that xact_redo communicates with the main apply loop when it sees that bit, through calls to XLogAppliedSynchronousCommit (essentially a global variable), but I couldn't immediately see a better way to get information out of xact_redo into the apply loop without changing the rm_redo interface. Perhaps xinfo is the wrong place for that information. Thoughts?
Thomas Munro
http://www.enterprisedb.com
http://www.enterprisedb.com
Вложения
В списке pgsql-hackers по дате отправления: