[pgpool-general: 6567] Re: Pgpool Info Required

Pierre Timmermans ptim007 at yahoo.com
Thu May 23 05:22:57 JST 2019


Answers to some questions (just my ideas )
1. failover_command : this will usually be a shell script. The script will do a standby promote on new master, so there is no reason that it would fail and I believe it is over-engineering to do more than that. But since this is a script, you are free to put what you want in it : if you want to check the result of the standby promote and if it fails try on the third node, it is possible.
2. pgpool does not support switch-over, you would have to stop the primary postgres database and let pgpool trigger the failover and then run a pcp_recovery on the old primary postgres
3. The VIP point to the pgpool master not to the postgres master. So application connects to pgpool, not to postgres.
4. No, pgpool will not do anything when a failed standby comes back, this must be done manually or you could develop a script and schedule it via cron for example (it is a bit complex and it might be risky)
5. No idea, sorry
Pierre 

    On Wednesday, May 22, 2019, 8:08:49 PM GMT+2, Lakshmi Raghavendra <lakshmiym108 at gmail.com> wrote:  
 
 Hi,
   It would be of a great help if someone helps me out with the below queries, as am planning to use it in our production environment. Replies @ the earliest would be highly appreciated. 
1. In case of failure on the master postgres, "failover_command" is being executed.However, In a 3 node cluster, when the master (node-0) goes down failover_command is run against the node-1 (auto selection by pgpool). But if this fails, there is no primary elected and also the following follow_master_command is also not run.Is there any way, we could configure the failover_command to run on node -2 , if it wasn't successful on node-1 ?
2.  Failover_command / follow_master_command is run only in case of primary postgres failure. For some reason if a end-user wanted to switch his primary postgres node from node-0 to node-1 in a 3-node pgpool cluster (without any failures on node-0 ),Does pgpool support any command which will internally do a combination of failover_command( to make new node-1 as primary postgres )+ follow_master_command on the intended slaves ?
3. As per my understanding, VIP helps us to  always point to the primary postgres. Thus any application which is accessing postgres  via VIP will always be highly available. In my application due to some unknown reason, when VIP is configured, the application's APIs stops working. Hence as a workaround, I have chosen to maintain /etc/hosts entries of the primary postgres on all my nodes and recover.conf / any one who would want to access the master, would basically access with the name present here. Please let me know if this serves the purpose or am I missing something here.
4. When the postgres on master / slave comes up after a failure , is there any script which could be run by pgpool to get it in sync with the new master ?I referred the documentation : http://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html ,which says when a postgres node gets attached to pgpool failback_command will be executed, but I never see the command being triggered by  pgpool when the postgres server is back and running.Kindly let me know how I can achieve this

5. In the pgpool logs, I see a line as below :
 2019-05-08T06:17:35+00:00  r connection request[14251]: [403-1] 2019-05-08 06:17:35: pid 14251: LOG:  failback event detected
2019-05-08T06:17:35+00:00 r connection request[14251]: [403-2] 2019-05-08 06:17:35: pid 14251: DETAIL:  restarting myself

Is it usual to see this in the log ?

Please let  me know.
Thanks in Advance !
 _______________________________________________
pgpool-general mailing list
pgpool-general at pgpool.net
http://www.pgpool.net/mailman/listinfo/pgpool-general
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20190522/a02868b8/attachment-0001.html>


More information about the pgpool-general mailing list