Re: main vs primary

From: Bo Peng <pengbo(at)sraoss(dot)co(dot)jp>
To: Luca Ferrari <fluca1978(at)gmail(dot)com>, "pgpool-general(at)lists(dot)postgresql(dot)org" <pgpool-general(at)lists(dot)postgresql(dot)org>
Subject: Re: main vs primary
Date: 2025-07-30 10:03:41
Message-ID: TYWP286MB2633D3F688B88656A74356EEF224A@TYWP286MB2633.JPNP286.PROD.OUTLOOK.COM
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-general

Hi,

The "primary node" refers to the PostgreSQL primary server in a streaming replication setup.
The "main node" indicates the main backend node, usually the first live backend (i.e., the one with the smallest node ID).
The term "main node" is typically used in native replication or snapshot isolation modes. In non-streaming replication modes, there is no primary/standby role, so Pgpool refers to the selected main backend as the "main node".

> LOG:  failover: 2 follow backends have been degenerated
> LOG:  failover: set new primary node: 1
> LOG:  failover: set new main node: 2
>
> in my scenario, the third host (so number 2) has been promoted. So
> what is the "primary" node 1 doing?

If node2 is promoted to the primary, the primary node should be shown as "node: 2".
Could you share more logs related to the failover, as well as your configuration file?

---
Bo Peng <pengbo(at)sraoss(dot)co(dot)jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
Mobile: 080-7752-0749
URL: https://www.sraoss.co.jp/

________________________________________
差出人: Luca Ferrari <fluca1978(at)gmail(dot)com>
送信: 2025 年 7 月 29 日 (火曜日) 19:32
宛先: pgpool-general(at)lists(dot)postgresql(dot)org <pgpool-general(at)lists(dot)postgresql(dot)org>
件名: main vs primary

Hi all,
sorry for the trivial question, but I cannot find this in
documentation, so please indicate me where I can find (in case I
missed).
What is the difference between main and primary nodes?

For example, in my logs I've:

LOG:  failover: 2 follow backends have been degenerated
LOG:  failover: set new primary node: 1
LOG:  failover: set new main node: 2

in my scenario, the third host (so number 2) has been promoted. So
what is the "primary" node 1 doing?

Thanks,
Luca

In response to

Responses

Browse pgpool-general by date

  From Date Subject
Next Message Tatsuo Ishii 2025-07-30 12:13:24 Re: Sudden increase in connections in pgpool usage environment
Previous Message Luca Ferrari 2025-07-29 10:32:17 main vs primary