Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uhP7t-00ECde-CU for pgpool-general@arkaria.postgresql.org; Thu, 31 Jul 2025 08:59:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uhP7s-00ETi6-HW for pgpool-general@arkaria.postgresql.org; Thu, 31 Jul 2025 08:59:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uhP7s-00EThy-C5 for pgpool-general@lists.postgresql.org; Thu, 31 Jul 2025 08:59:00 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uhP7p-001ofi-0m for pgpool-general@lists.postgresql.org; Thu, 31 Jul 2025 08:59:00 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-302effd5978so427609fac.2 for ; Thu, 31 Jul 2025 01:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753952336; x=1754557136; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8ntq3LOi8ir4AdbHJEbIiCbgJgi+fb2ySH1hHGFMkCQ=; b=EP9HizbiO5L1RZPacPZe5MQQXcPHDicNF/d50oGR3yvh25DQ2DDyCmPjkMAW0kMCy6 QjZJPlY7Tp4gA1pnYFoUfduz80EZ8vYIF8zSyeUitNeoFyRKF0eaYSvl/Rnh5RwNJdwM uO90eib5vz06aPAjJjgFY3y5Vnm8WxdihPTnJCfu7C4RifHxYHd1ChsIkDbBOd7gM9cc 7vftPfmEzi59U0zlFlLFz992qkCARfPM5hR4mj/nndjlTawMaydVYXHIIfKdLG3/FXMw zKzhUUdNJolaGcsAZd+LI0sAP6Ib8QW5sMlLdVq3BoTWjmUdr8qPzkVjj13HxBsWQ+Eb 1aqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753952336; x=1754557136; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8ntq3LOi8ir4AdbHJEbIiCbgJgi+fb2ySH1hHGFMkCQ=; b=PP9iiTf2q9jqXWB+raWENvw1gDtvnQwK/M1F65YtnXQMZG/V71hjocIP9TXCBWTLBK N0f/fasOFKHGBmeG/lw258GBcgy/u6fL2i7NQ4c7iMFWqnBxKYUwIyUBxL8znsAs31bV Tx6+wtaf5gKWaQliURo5oIgr47GUCf6xDbxSy2SZ8gFR9Mlo0MWNQhbMQwM9aqZ211dJ xCZX7/UMG3bLmwYAf8yTg0ulltFDtMo24eny0p2A+xic4UKXP8w874G0VrkhW41owaUS U0wOQiO3q86hyXnHeT6oAzO9MUc4MKc7Hwqfile06EbfUqEv2B2WSYA9kiSC97lBiq1Q 7GGg== X-Gm-Message-State: AOJu0Yz1He75bo3aIcaSnqqdPrZ6zuFCUGW7OlqqZ0NAX3HxwLkW+4/F tb42agjohFGtmorfYHZnaG6kg7JMTndlYfaJ8EavJjlt4KgPWZc9PANkZpKEjPOE5bomD5ReCq8 qZ8lPg9Ed21UCo1+PCICXlwK24PcJLN1Wuvhletk= X-Gm-Gg: ASbGncu5dxHnz64hkQ9jDenVTvXNxANZrmN1NAp3WxwuZfgk28TrWfy+nW9xXa0RaTy MTUOqH8fhr05Gj7dM6PFbKM1lfTX0bms36q0N8HiI+nll+lpN0uES7FwEiPd20plCx93n9rjQXn aCmqQsyK3xu+ho+qF+LpH1OapUY6KE+kU7sSrVa2Z7iF2eMw8z57km1rRLOUabNVnhitzGGMBPW f1uhg== X-Google-Smtp-Source: AGHT+IHj4oCkHL4coxykUZK0q3iOtINdCgPC2iaw1u8F5lMxmBsxndOZOanQQrjlgZztGpsjXnURlller7YPl8QZFPs= X-Received: by 2002:a05:6871:7424:b0:2ff:8956:fd45 with SMTP id 586e51a60fabf-307856b087amr3800878fac.0.1753952335911; Thu, 31 Jul 2025 01:58:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luca Ferrari Date: Thu, 31 Jul 2025 10:58:19 +0200 X-Gm-Features: Ac12FXyuKvp1TD5Do_CcfAPHDbwkMB-OG16VOby8Rp2GF-Bb8DB_isYFYu3bXwA Message-ID: Subject: Re: main vs primary To: Bo Peng Cc: "pgpool-general@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 30, 2025 at 12:03=E2=80=AFPM Bo Peng wrot= e: > > 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 b= ackend (i.e., the one with the smallest node ID). Thanks, much more clear now. > > > 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 config= uration file? > This is something I'm fighting from days. I've an open issue, updated almost daily, I don't think repeating all the infor here is appropriate but I could open a new thread if you believe it is worth. See . In short: I've three nodes, I shutdown the first and the second gets promoted. Failover and follow primary are fine, watchdog is happy. Then I stop the second node, expecting the third to be promoted, and this happens in fact. But pgpool stops working, and pcp reports the third node as "standby primary", not "primary primary". In particular, see behavior in . Any help is appreciated. Thanks, Luca