View Issue Details

IDProjectCategoryView StatusLast Update
0000626Pgpool-IIGeneralpublic2020-08-26 15:50
ReporterKen Assigned Topengbo  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Summary0000626: PCP_PROMOTE_NODE
DescriptionHELLO

I have pgpool in version 4.1.2. I have configured scripts follow_master.sh and failover.sh. I tested scripts and it work good but when I execute command pcp_promote_node -n number_node -h ip_watchdog it status change in pgpool but replication don't change in postgres.

PCP_PRMOTE_NODE change only status in pgpool and command don't switched primary/slave?

Best regards
TagsNo tags attached.

Activities

pengbo

2020-07-20 10:48

developer   ~0003434

> PCP_PRMOTE_NODE change only status in pgpool and command don't switched primary/slave?

Yes.
pcp_promote_node does not actually promote standby PostgreSQL backend.
It just changes the internal status of Pgpool-II.

https://www.pgpool.net/docs/latest/en/html/pcp-promote-node.html

pengbo

2020-08-17 17:00

developer   ~0003471

if follow_master.sh is configured, follow_master.sh will be executed against PostgreSQL.
It is a standard advice that you disable "follow_master_command" before executing "pcp_promote_node".

Ken

2020-08-17 23:19

reporter   ~0003472

Ok, I understend advice

I have one question yet. Is anything method to manual switch primary without make backup?

Best regards

pengbo

2020-08-24 20:09

developer   ~0003508

> I have one question yet. Is anything method to manual switch primary without make backup?

Do you mean without executing pg_basebackup in follow_master.sh?
You can use pg_rewind. Below is a sample script of follow_master.sh using pg_rewind.
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blob_plain;f=src/sample/scripts/follow_master.sh.sample;hb=refs/heads/V4_1_STABLE

Ken

2020-08-25 22:04

reporter   ~0003514

ok, Thanks you for answer. This topic is to closing

Issue History

Date Modified Username Field Change
2020-07-17 22:50 Ken New Issue
2020-07-20 10:48 pengbo Note Added: 0003434
2020-07-20 10:49 pengbo Assigned To => pengbo
2020-07-20 10:49 pengbo Status new => feedback
2020-08-17 17:00 pengbo Note Added: 0003471
2020-08-17 23:19 Ken Note Added: 0003472
2020-08-17 23:19 Ken Status feedback => assigned
2020-08-24 20:09 pengbo Note Added: 0003508
2020-08-24 20:09 pengbo Status assigned => feedback
2020-08-25 22:04 Ken Note Added: 0003514
2020-08-25 22:04 Ken Status feedback => assigned
2020-08-26 15:50 pengbo Status assigned => closed