Re: Standalone synchronous master

From: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Standalone synchronous master
Date: 2014-01-08 06:57:31
Message-ID: BF2827DCCE55594C8D7A8F7FFD3AB7713DDB6749@SZXEML508-MBX.china.huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8th Jan, 2014, Amit Kapila Wrote
>
> > Add a new "eager" synchronous mode that starts out synchronous but
> > reverts to asynchronous after a failure timeout period
> >
> > This would require some type of command to be executed to alert
> > administrators of this change.
> >
> > http://archives.postgresql.org/pgsql-hackers/2011-12/msg01224.php
> > This patch implementation is in the same line as it was given in the
> > earlier thread.
> >
> > Some Of the additional important changes are:
> >
> > 1. Have added two GUC variable to take commands from user to be
> > executed
> >
> > a. Master_to_standalone_cmd: To be executed before master
> switches to
> > standalone mode.
> >
> > b. Master_to_sync_cmd: To be executed before master switches
> from sync
> > mode to standalone mode.
>
> In description of both switches (a & b), you are telling that it
> will switch to
> standalone mode, I think by your point 1b. you mean to say other way
> (switch from standalone to sync mode).

Yes you are right. Its typo mistake.

> Instead of getting commands, why can't we just log such actions? I
> think
> adding 3 new guc variables for this functionality seems to be bit
> high.

Actually in earlier discussion as well as in TODO added, it is mentioned
to execute some kind of command to be executed to alert administrator.
http://archives.postgresql.org/pgsql-hackers/2011-12/msg01224.php

In my current patch, I have kept the LOG along with command.

> Also what will happen when it switches to standalone mode incase
> there
> are some async standby's already connected to it before going to
> standalone mode, if it continues to send data then I think naming it
> as
> 'enable_standalone_master' is not good.

Yes we can change name to something more appropriate, some of them are:
1. enable_async_master
2. sync_standalone_master
3. enable_nowait_master
4. enable_nowait_resp_master

Please provide your suggestion on above name or any other?.

Thanks and Regards,
Kumar Rajeev Rastogi

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-01-08 07:43:46 Re: Simple improvements to freespace allocation
Previous Message Simon Riggs 2014-01-08 06:56:33 Simple improvements to freespace allocation