public inbox for [email protected]  
help / color / mirror / Atom feed
From: Macao Tom <[email protected]>
To: Koshino Taiki <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: About pgpool failover / switchover
Date: Wed, 17 Sep 2025 09:17:44 +0800
Message-ID: <CAPTV4vxfPs+9XrCWZb3odecCyAypKROeLvfcnw1J4jfkk45Ghw@mail.gmail.com> (raw)
In-Reply-To: <TYCP286MB2926C37D1EB8D8E2D882DA819417A@TYCP286MB2926.JPNP286.PROD.OUTLOOK.COM>
References: <CAPTV4vzgri_2VogHSZUv9-h2+PkWKdAcESg3eOwxkf2MV7UrYQ@mail.gmail.com>
	<TYCP286MB2926C37D1EB8D8E2D882DA819417A@TYCP286MB2926.JPNP286.PROD.OUTLOOK.COM>

Dear koshino,

I discover that I add “-R” in the basebackup command in recovery_1st_stage
script, this action will lead postgre generate some information into
postgre.auto.conf, therefore it success to switch over after I delete it.

Thanks for your help.

Best regards,
Terence

On Wed, 17 Sep 2025 at 09:13, Koshino Taiki <[email protected]> wrote:

> This is because, when a failover or switchover occurs and the primary
> changes, Pgpool-II updates $PGDATA/myrecovery.conf instead of
> postgresql.auto.conf.
>
> When a standby connects to the primary, it refers to the information in
> postgresql.auto.conf , if the setting exists there.
> However, during failover or switchover, Pgpool-II updates
> $PGDATA/myrecovery.conf rather than postgresql.auto.conf.
> As a result, postgresql.auto.conf still contains outdated connection
> information, causing PostgreSQL to attempt to connect using this wrong
> information, which leads to connection failures.
>
> In this case, by deleting postgresql.auto.conf, the primary_conninfo in
> $PGDATA/myrecovery.conf was used, which was correct, so the connection
> succeeded.
>
> Since having primary_conninfo in postgresql.auto.conf can sometimes
> prevent proper connections, it is generally recommended not to include
> primary_conninfo in postgresql.auto.conf.
>
> Taiki Koshino<[email protected]>
> SRA OSS K.K.
> TEL: 03-5979-2701 FAX: 03-5979-2702
> URL: https://www.sraoss.co.jp/
>
> ------------------------------
> *差出人:* Macao Tom <[email protected]>
> *送信日時:* 2025年9月12日 12:43
> *宛先:* [email protected] <
> [email protected]>
> *件名:* About pgpool failover / switchover
>
> Dear pgpool,
>
> I built up a postgresql 17.6.2 3 nodes cluster with 3 pgpool 4.6.2 , when
> I try to switch over using “pcp_promote_start -s …..” it seems other standy
> nodes can not follow the new primary node. However, after I remove the
> “postgres.auto.conf” in each server and switch over using the same command
> again, it works. I have also check what store in “postgres.auto.conf”, it
> may store many config like “primary_conn_info” which connect to the old
> primary.
>
> Do you have any idea about this? Or do you know what mechanism cause
> postgres store the old primary info in “postgres.auto.config” file?
>
> Best regards,
> Terence
>


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: About pgpool failover / switchover
  In-Reply-To: <CAPTV4vxfPs+9XrCWZb3odecCyAypKROeLvfcnw1J4jfkk45Ghw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox