Re: Support for N synchronous standby servers - take 2
От | Amit Kapila |
---|---|
Тема | Re: Support for N synchronous standby servers - take 2 |
Дата | |
Msg-id | CAA4eK1+K=m0T8ba_B=dKw-BngPW2Lp8v7jUdDomdT6rFkzu0=A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Support for N synchronous standby servers - take 2 (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
Ответы |
Re: Support for N synchronous standby servers - take 2
|
Список | pgsql-hackers |
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 7, 2016 at 1:30 PM, Amit Langote <<a href="mailto:Langote_Amit_f8@lab.ntt.co.jp">Langote_Amit_f8@lab.ntt.co.jp</a>>wrote:<br />><br />> On 2016/04/0715:26, Fujii Masao wrote:<br />> > On Thu, Apr 7, 2016 at 2:48 PM, Amit Kapila <<a href="mailto:amit.kapila16@gmail.com">amit.kapila16@gmail.com</a>>wrote:<br />> >> On Thu, Apr 7, 2016 at 10:02AM, Fujii Masao <<a href="mailto:masao.fujii@gmail.com">masao.fujii@gmail.com</a>> wrote:<br />> >>>Yes if the variable that we'd like to pass to a backend is BOOL, INT,<br />> >>> REAL, STRING orENUM. But SyncRepConfig variable is a bit more<br />> >>> complicated.<br />> >> SyncRepConfig isa parsed result of SyncRepStandbyNames, why you want to<br />> >> pass that? I assume that current non-defaultvalue of SyncRepStandbyNames<br />> >> will be passed via write_nondefault_variables(), so we can usethat to<br />> >> regenerate SyncRepConfig.<br />> ><br />> > Yes, so SyncRepUpdateConfig() needsto be called by a backend after fork,<br />> > to regenerate SyncRepConfig from the passed value of SyncRepStandbyNames.<br/>> > This is the approach of (2) which I explained upthread. assign_XXX function<br />>> doesn't seem to be helpful for this case.<br />><br />> I don't see why there is need to SyncRepUpdateConfig()after every fork or<br />> anywhere outside syncrep.c/walsender.c for that matter. AIUI, only<br/>> walsender or a backend that runs pg_stat_get_wal_senders() ever needs to<br />> run SyncRepUpdateConfig()to get parsed synchronous standbys info from the<br />> string that is SyncRepStandbyNames.</div><divclass="gmail_quote">></div><div class="gmail_quote"><br /></div><div class="gmail_quote">Soif we go by this each time backend calls pg_stat_get_wal_senders, it needs to do parsing to form SyncRepConfigwhether it's changed or not from previous time. I understand that this is not a performance critical path,but still if we can do it in some other optimal way which doesn't hurt any other path, then it will be better.<br /></div><divclass="gmail_quote"><br class="" /><br />With Regards,<br />Amit Kapila.<br />EnterpriseDB: <a href="http://www.enterprisedb.com/"target="_blank">http://www.enterprisedb.com</a><br /></div></div></div>
В списке pgsql-hackers по дате отправления: