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 1sJyn7-007fgZ-3P for pgsql-general@arkaria.postgresql.org; Wed, 19 Jun 2024 17:08:13 +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 1sJyn4-002vGC-Hx for pgsql-general@arkaria.postgresql.org; Wed, 19 Jun 2024 17:08:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sJyn4-002vEH-6V for pgsql-general@lists.postgresql.org; Wed, 19 Jun 2024 17:08:11 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sJyn2-0026sr-Jd for pgsql-general@postgresql.org; Wed, 19 Jun 2024 17:08:09 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-254aec5a084so33114fac.3 for ; Wed, 19 Jun 2024 10:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718816888; x=1719421688; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=mZ1fsTJemppg/zBEzzV5wFNV/Ym4nH7RPziaZ5cLMyg=; b=QXa+OUgeWXVvtF80W2KfC4FbktruLtvCSszfJkYRyXzdf+XtwO9VUmDjZbRTPZZN4K WiKNCsDeO1OqazCtQ3/qzbwcfthR/9DXRj+Xbmg90qcQkVhbHRlXa7tqruN0Ub6N7D+p lrcc0fjCFGBohHpMTJtfRX1U+PEsuYdeordDNC1d816/Zm/zeU6/mf1BOJCxB/AMWL7t 58bi2ADD6m4RtMkoDWPLV3c1zkbqTna4Xx7HjXk2kFidrQcCgLgRR7M/42PdVQ3RCKqd pnXWf18yvwKE5A3j+RKmFo8QqkF+3aPvUASUd/CLpWXrrFTmNib6o9HxBU79LJOZwElC CEYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718816888; x=1719421688; h=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=mZ1fsTJemppg/zBEzzV5wFNV/Ym4nH7RPziaZ5cLMyg=; b=O03jAM6hVBmLmbIoWqXfuqEI22Wz/OC2TS6sQj71MaAi4YRKHE9tlOxwzSkFvUSX71 BELkupIX5C2meYH5x6fQnbUTLi6pHmW6VWYm9x8fmMDjPj6kQCL6ncrF1ACWFHvVqiaM uzLBQtzyduVYk2mkM+X6BHsBhJ0Ruz7qfmrZXFEaGhU8NaE9xaZsxTky5LqEcHAHo/SM aiwd3JmAQ0NyVeD1hxEdOTftw591liTIySJZ8HuoMCAIk4sVXCbpwjm1yEgwznLxUc8X PVmaZS8Cz0+eLiuo6vsjVFZHvCUy6X7t3lh/bSy0VO7QDg6Dr35Mj351vfnmO2/xMA3M s3eA== X-Gm-Message-State: AOJu0YzpNlTmjdKI+x0Z5Yn65LoYlKm8eNuq3WJJsE8uZLC3dsmIqtJn fJwBXHMpsUOsz4GJvwyXHApnCvm3AbidDFX65EiAnlQhDIYHePi3QalukqfxkYBUeOfaKBl41ly whrsUGrTFlw0pvaQGZm8ed3FvgnEy9njm X-Google-Smtp-Source: AGHT+IFAd4QZqQB5ZZ3zii6DSpGdAOgwlSw70hVEfhgQ3xz/m83B/4cWFggvz4ngvIM87Lrr+03yPAnj29O01L5LNu8= X-Received: by 2002:a05:6870:b14c:b0:254:9d28:647 with SMTP id 586e51a60fabf-25c948eafe5mr3601261fac.7.1718816887742; Wed, 19 Jun 2024 10:08:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Wed, 19 Jun 2024 13:07:56 -0400 Message-ID: Subject: Re: Manual Failover To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000072873061b413ef6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000072873061b413ef6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 19, 2024 at 11:03=E2=80=AFAM Yongye Serkfem wrote: > Hello Engineers, > I am facing an issue with the manual failover of the standby to the maste= r > role. I was able to promote the standby and got it out of recovery mode. > How do I direct applications to point to the standby which has assumed th= e > role of the current master, > A typical solution is a separate service which manages a virtual IP that points to whichever DB server you choose. > and what should I do after completing maintenance on the previous master > to assume its original role as master? > pg_basebackup is guaranteed to get previous-master in sync with now-active. pg_rewind might also work. --000000000000072873061b413ef6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jun 19, 2024 at 11:03=E2=80=AFAM = Yongye Serkfem <yserkfem@gmail.com= > wrote:
Hello Engineers,
I am facin= g an issue with the manual failover of the standby to the master role. I wa= s able to promote the standby and got it out of recovery=C2=A0mode. How do = I direct applications to point to the standby which has assumed the role of= the current master,

A typ= ical solution is a separate service which manages a virtual IP that points = to whichever DB server you choose.
=C2=A0
and what s= hould I do after completing maintenance on the previous=C2=A0master to assu= me its original role as master?=C2=A0

pg_basebackup is guaranteed to get previous-master=C2=A0in sync with= now-active.=C2=A0 pg_rewind might also work.

--000000000000072873061b413ef6--