Search Postgresql Archives

Re: PGPool in Master-Master mode, is it possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am not familiar with swarm cluster nor repmgr. So I wonder why you
wouldn't be able to get to the goal you are trying to achieve without
repmgr. Can you please elaborate more?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> I am also interested in this set-up
> My idea is to run pgpool in a docker swarm cluster and to have two instances of pgpool on different nodes (but not in watchdog mode). In this case it is not possible to give the responsablity to pgpool to do the failover otherwise both instances would try to do the failover (they don't know about each other, no watchdog mode). So I have to set failover_command parameter to an empty string and let repmgr do the automatic failover. I have tested and I believe it is ok: in case of master failure repmgr does the promote, pgpool will not do the failover but will constantly try to reconnect to a new master and as soon as repmgr has done the promotion it is OK.
> The important think is that when pgpool starts I have to read the state of the cluster in the repmgr metadata table (repl_nodes) and generate the /tmp/pgpool_status file based on that. (I even have to do a promote_node in the edge case that the master is down and was brought down when pgpool also was down).  
> But the inconvenient is that if pgpool fails, let's say because the docker node of pgpool is stopped, then docker swarm restart the service on another node but this can take a few seconds. So I would prefer to have multiple pgpool. I did not have the time right now to test such a scenario but I am interested to know if it is possible.
> Pierre 
> 
>     On Wednesday, November 15, 2017, 11:02:31 AM GMT+1, Vikas Sharma <shavikas@xxxxxxxxx> wrote:  
>  
>  Thank you Tatsuo for the Reply, I will post this in list you mentioned.
> 
> By Master-Master, I meant two pgpool servers both active accepting connections from Application, If one Pgpool Server becomes unlavailable other still accepting connections. At an Ideal time, both Pgpool instances on each PgPool server working actively.  The database in this case will be 1 master and 2 slaves, replicated by streaming replication.
> 
> Regards
> VS
> 
> On 14 November 2017 at 22:56, Tatsuo Ishii <ishii@xxxxxxxxxxxx> wrote:
> 
>> Hello There,
>>
>> I need to setup two PGPool Servers in Master-Master mode, First thing I
>> want to know, is it possible?
>>
>> I know we can setup 2 PGPool servers in master-slave mode using watchdog.
>> http://www.pgpool.net/pgpool- web/contrib_docs/watchdog_ master_slave_3.3/en.html
>>
>> Could anyone please enlighten me and any workaround for this?
>>
>> Regards
>> VS
> 
>> I need to setup two PGPool Servers in Master-Master mode, First thing I
>> want to know, is it possible?
>>
>> I know we can setup 2 PGPool servers in master-slave mode using watchdog.
>> http://www.pgpool.net/pgpool- web/contrib_docs/watchdog_ master_slave_3.3/en.html
>>
>> Could anyone please enlighten me and any workaround for this?
> 
> This is not an appropriate list. You should go to the Pgpool mailing
> list:
> 
> https://www.pgpool.net/ mailman/listinfo/pgpool- general
> 
> Anyway... I am not sure what you mean by "Master-Master mode" but if
> that means you want to issue write queries by connecting to any of
> Pgpool-II port, it's already possible in the set up you have created.
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_ en.php
> Japanese:http://www.sraoss.co. jp
> 
> 
>   


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux