On Thu, Apr 7, 2016 at 5:49 PM, Fujii Masao <masao.fu...@gmail.com> wrote:
> On Thu, Apr 7, 2016 at 7:29 PM, Amit Kapila <amit.kapil...@gmail.com>
> >
> > So if we go by this each time backend calls pg_stat_get_wal_senders, it
> > needs to do parsing to form SyncRepConfig whether it's changed or not
> > previous time.  I understand that this is not a performance critical
> > but still if we can do it in some other optimal way which doesn't hurt
> > other path, then it will be better.
> So, will you write the patch? Either current implementation or
> the approach you're suggesting works to me. If you really want
> to change the current one, I'm happy to review that.

Sorry, I don't have time to complete the patch, but I have written an
initial patch to show you what I have in mind and something on this lines
should work.  I think with such an approach, you don't need to parse for
s_s_names twice (once in check_* and once in syncupdate* function),  you
can refer check_temp_tablespaces() and assign_temp_tablespaces() to see how
to use the work done by check_* function in assign_* function.  Also write
now, I have used TopMemoryContext for allocation in
assign_synchronous_standby_names,  it is better to use guc_malloc or
something similar for allocation as is done in other check_* and assign_*

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment: fix_sync_rep_update_conf_v1.patch
Description: Binary data

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to