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 1srFPB-00GLyR-FN for pgsql-admin@arkaria.postgresql.org; Thu, 19 Sep 2024 11:33:01 +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 1srFP9-00A0tY-3i for pgsql-admin@arkaria.postgresql.org; Thu, 19 Sep 2024 11:32:59 +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 1srFP8-00A0pj-Na for pgsql-admin@lists.postgresql.org; Thu, 19 Sep 2024 11:32:58 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1srFP5-0000T6-J3 for pgsql-admin@lists.postgresql.org; Thu, 19 Sep 2024 11:32:58 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a8d43657255so106762566b.0 for ; Thu, 19 Sep 2024 04:32:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726745576; x=1727350376; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:from:to:cc:subject:date :message-id:reply-to; bh=5kYxomnZeIcqKEg2HBTI6AiuLDMdRXBQwL5DGgwn2zQ=; b=XFvXuUo1Q1C5n9kGFwcN1ncupbENoabS0PPxlZnLW1825zRYi7S3D5noyO/kAOTiLg 9QfkJHN5toRfMN7Jq/FDzFA7iZdDnp5vlnMFQ88GSVPoEKjuSVFZFjFTcdtE0fjFxqTW Jw7ZBKvpzxh8nrdVKhZjNGqUL6zgAknIPBSLseYkJrouJMvOGYStGHIwWXTXgLKyDyYZ 1jek+qbBv4XSeUyDZVmvdSzpp+5FqRqgj7WK+4NGSX5kcppdz2idqRXNtn2kcweJ4KM0 oTp92qIvWbgpMJ8yg0xyiTvGDoTEdgbwgztp1x8id/IxavmSyQ7UQ65XFkyZChEqyfxj wEhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726745576; x=1727350376; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5kYxomnZeIcqKEg2HBTI6AiuLDMdRXBQwL5DGgwn2zQ=; b=cr8wUdcDKRNZNHIYCr4Ue/oRXcDqKkSkpKFPNV/yi7XSKUajctymSoTBOMgEqwfWHV XUJ4lk3jMv9k1BIB9gd6VKmMv42VqAGIBFE4eS0lOyvSo66i1xZ2YdBiGx1ufnkwfMIO qu53SXRGeib3NuNyLvrE0gBA3pRKJdW0xrHVaAmzv2/fPVQCAr4qOoLzDw3UPqulVcQX nlP9r56LHHphIY5I5yf8mH865OHdAg01lSSz+BT2d/NMFqutwQjYX2/KLfzna08OO/2T t5Rl9791Rv18iIAmtmVCgBXWeDmPnGz+OOhIFLayntn/GmSBjq1KhFfvF1jcEou1LFYI j3VA== X-Gm-Message-State: AOJu0YztK0BqVfKnjyKDfY21jgAXzCl/KjjCSc7wT7q06V6oedu5UCoX Ymix/WHg6Cewag35LwiMWg8CBr4IxmThja3o/1Fi5lp/IKz12maC X-Google-Smtp-Source: AGHT+IEr9ELiFB17u753kccl8C1d/LgcD555G/Fl+WBhHZET84RdFHynzHNoN3fXiXmo951ReIJUMw== X-Received: by 2002:a17:907:97cf:b0:a8a:906d:b485 with SMTP id a640c23a62f3a-a9047cad53cmr2060173566b.26.1726745575932; Thu, 19 Sep 2024 04:32:55 -0700 (PDT) Received: from lightning.caipicrew.dd-dns.de ([2001:a61:aeb:9601:de9f:ad50:75e5:2a8c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90612e5617sm719387166b.177.2024.09.19.04.32.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2024 04:32:55 -0700 (PDT) Message-ID: <66ec0be7.170a0220.48a0.7d07@mx.google.com> X-Google-Original-Message-ID: <20240919113254.GH17063@caipicrew.dd-dns.de;lightning.caipicrew.dd-dns.de> Sender: Michael Banck Received: from mbanck by lightning.caipicrew.dd-dns.de with local (Exim 4.92) (envelope-from ) id 1srFP4-0003U8-Oi; Thu, 19 Sep 2024 13:32:54 +0200 Date: Thu, 19 Sep 2024 13:32:54 +0200 From: Michael Banck To: "Narendran .j" Cc: pgsql-admin@lists.postgresql.org Subject: Re: Failover and Failback References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Sep 19, 2024 at 04:46:28PM +0530, Narendran .j wrote: > I have facing a problem in failback. I just promoted my secondary as master > by using pg_ctl promote.it was successful.so now how can I bring my old > master as primary I tried with pg_rewind it's not working. You need to bring your old primary as standby first, then switchover back to it - otherwise, you would have two primaries, no? In general, pg_rewind is the only reasonable way to recover a failed over primary other than by rebuilding it from scratch as a standby. So if pg_rewind did not work, we would need more information, like what command did you issue exactly and what was the output/error message? Michael