Re: [GENERAL] Setting up HA postgresql

2015-07-23 Thread William Dunn
Thanks so much for lending your expertise Tatsuo. Aviel I have found and linked below the relevant section of the official pgpool-II docs on using pgpool-II for failover. It is available starting in pgpool-II version 3.1: http://www.pgpool.net/docs/latest/pgpool-en.html#stream *Will J. Dunn* On

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Joshua D. Drake
On 07/21/2015 07:07 PM, Tatsuo Ishii wrote: But it appears that the fail condition for "watchdog" is the failure of a pgpool-II instance. In the configuration described in the wiki you would put a pgpool-II instance on each Postgres node, and if one of the pgpool-II instances fails it executes

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Tatsuo Ishii
> But it appears that the fail condition for "watchdog" is the failure of a > pgpool-II instance. In the configuration described in the wiki you would > put a pgpool-II instance on each Postgres node, and if one of the pgpool-II > instances fails it executes a script (which can create the trigger f

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Joshua D. Drake
On 07/21/2015 02:48 PM, William Dunn wrote: Maybe Linux-HA which you recommended is the more promising option for open source tool. http://www.linux-ha.org/wiki/Main_Page The Postgres resource agent appears to monitor the instance by executing 'SELECT now();' which is typically the recommended

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
Maybe Linux-HA which you recommended is the more promising option for open source tool. http://www.linux-ha.org/wiki/Main_Page The Postgres resource agent appears to monitor the instance by executing 'SELECT now();' which is typically the recommended check. Though, I do not know Linux-HA well enou

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
On Tue, Jul 21, 2015 at 5:12 PM, Joshua D. Drake wrote: > > > "When backend node status changes by failover etc., watchdog notifies the > information to other pgpool-IIs and synchronizes them. When online recovery > occurs, watchdog restricts client connections to other pgpool-IIs for > avoiding

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Joshua D. Drake
On 07/21/2015 01:37 PM, William Dunn wrote: But it appears that the fail condition for "watchdog" is the failure of a pgpool-II instance. In the configuration described in the wiki you would put a pgpool-II instance on each Postgres node, and if one of the pgpool-II instances fails it executes a

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
But it appears that the fail condition for "watchdog" is the failure of a pgpool-II instance. In the configuration described in the wiki you would put a pgpool-II instance on each Postgres node, and if one of the pgpool-II instances fails it executes a script (which can create the trigger file to p

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Joshua D. Drake
On 07/21/2015 01:21 PM, William Dunn wrote: That's pretty cool! But the intended use of watchdog is so you can have multiple pgpool-II instances and failover among them (http://www.pgpool.net/docs/latest/pgpool-en.html#watchdog) rather than failure of Postgres. In the configuration described in

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
That's pretty cool! But the intended use of watchdog is so you can have multiple pgpool-II instances and failover among them ( http://www.pgpool.net/docs/latest/pgpool-en.html#watchdog) rather than failure of Postgres. In the configuration described in that wiki what happens when the DBMS goes down

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Joshua D. Drake
On 07/21/2015 11:04 AM, William Dunn wrote: If you dig deeper into pgpool-II you will find that it does not have failover logic. Its intention is to pool connections and distribute query load among replicas, but it cannot differentiate node failure from network partition and cannot promote a sta

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
Implementing failover logic is quite simple, and probably even preferred over a pre-built solution because you can implement it in the way that integrates well with your architecture. The basic logic is as follows: - On the standby server you would configure the "trigger" file. When you cre

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
If you dig deeper into pgpool-II you will find that it does not have failover logic. Its intention is to pool connections and distribute query load among replicas, but it cannot differentiate node failure from network partition and cannot promote a standby to master in the case of failure. *Will J

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread AI Rumman
Hi, I made the following document 4 years back: http://www.rummandba.com/2011/02/postgresql-failover-with-pgpool-ii.html You may have a look if it makes any good to your work. BTW, if you want to setup a share-nothing high scalable system with data-sharding, you can go for pl/proxy. Thanks. On

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Aviel Buskila
Can you link me up to a good tutorial using pgpool-II? 2015-07-21 20:02 GMT+03:00 Joshua D. Drake : > > On 07/21/2015 08:34 AM, William Dunn wrote: > >> Hello Aviel, >> >> On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila > > wrote: >> >> How can I set a highly availabl

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Joshua D. Drake
On 07/21/2015 08:34 AM, William Dunn wrote: Hello Aviel, On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila mailto:avie...@gmail.com>> wrote: How can I set a highly available postgresql in a share-nothing architecture? I suggest you review the official documentation on high-availability c

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread Aviel Buskila
hey will, Is there any open-source tool instead of developing the fail-over logic by myself? 2015-07-21 18:34 GMT+03:00 William Dunn : > Hello Aviel, > > On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila wrote: >> >> How can I set a highly available postgresql in a share-nothing >> architecture? >>

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
Hello Aviel, On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila wrote: > > How can I set a highly available postgresql in a share-nothing > architecture? > I suggest you review the official documentation on high-availability configurations linked below: http://www.postgresql.org/docs/current/static/