[pgpool-general: 5379] Re: [pgpool] Streaming Replication - Identify Slave Node Status

Anushka Weerakkodyge anushkaw at ceylonit.com
Wed Mar 22 17:37:29 JST 2017


Hi Lazaro,

I tried failover command in pgpool and was able to stop the replication and
make the master server a read only node when the standby is down. But I
noticed that this procedure does not work always. Sometimes pgpool does not
trigger failover mechanism when the standby node is down and log keeps
showing *failed to make persistent db connection *message. Is there
something I'm missing here ?

In the config file I turned on master_slave mode and load_balance mode.





Thanks,
Anushka

On Fri, Mar 17, 2017 at 5:10 AM, Anushka Weerakkodyge <anushkaw at ceylonit.com
> wrote:

> Thank you! I will try this method definitely. By the way, what I really
> need is to fail the transaction when slave is down. Using this method I can
> identify the status of the slave node, then will try to make the master
> node read only until the slave comes online.
>
>
> Thanks,
> Anushka
>
> On Thu, Mar 16, 2017 at 6:36 PM, Lazaro Garcia <lazaro3487 at gmail.com>
> wrote:
>
>> When slave goes down, pgpool detects that and triggers a failover, then
>> the master remains active and the slave are marked as down state. On the
>> failover_command of pgpool, you could execute a command that drop the slave
>> from the master synchronous_standby_names and reload the configuration on
>> the master. By this way new transactions can be executed on the master
>> without checking the state of the slave because synchronous replication has
>> been disabled.
>>
>>
>>
>> If you recover the slave you can attach this server to master again an
>> activate the synchronous replication.
>>
>>
>>
>> Regards.
>>
>>
>>
>>
>>
>> *De:* pgpool-general-bounces at pgpool.net [mailto:pgpool-general-bounces
>> @pgpool.net] *En nombre de *Anushka Weerakkodyge
>> *Enviado el:* miércoles, 15 de marzo de 2017 05:37 p. m.
>> *Para:* pgpool-general at pgpool.net
>> *Asunto:* [pgpool-general: 5370] [pgpool] Streaming Replication -
>> Identify Slave Node Status
>>
>>
>>
>> Hi all,
>>
>>
>>
>> I have a synchronous streaming replication environment which is
>> implemented using inbuilt replication mechanism in postgresql. There is a
>> requirement that I need to fail the data modification transactions on
>> master node if the slave node is down. (ie: transactions should commit when
>> only both servers are up and running)
>>
>>
>>
>> Please let me know whether there is a way to identify slave node status
>> and fail the transaction using pgpool ?
>>
>>
>>
>> Thanks,
>>
>> Anushka
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20170322/3d000fad/attachment.html>


More information about the pgpool-general mailing list