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 1tEWVM-007uuF-Tp for pgsql-admin@arkaria.postgresql.org; Fri, 22 Nov 2024 16:27:36 +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 1tEWVL-00AE4n-KK for pgsql-admin@arkaria.postgresql.org; Fri, 22 Nov 2024 16:27:35 +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 1tEWVL-00AE4e-8k for pgsql-admin@lists.postgresql.org; Fri, 22 Nov 2024 16:27:35 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tEWVI-003FEO-Ib for pgsql-admin@lists.postgresql.org; Fri, 22 Nov 2024 16:27:34 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4315baa51d8so20320335e9.0 for ; Fri, 22 Nov 2024 08:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732292850; x=1732897650; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ympqQxCnmfUhkpDAuxNahFpZnepyj4nD+xo2Idv8SDs=; b=iXsBqqBGd1SzKvnA3qTB0Cl8/Oh+tp+YLbjhoEOLpksm6WPN1oi7adTjHAQ0xsMY6m dagcW6+zMSSZ0EoZI6Qrj335JFB5hZtPEmfH2teaSd8o7H6RGCBng3ivJxtiQ3qW2sBi iwt8Vien35Y50XCPgBnR5qo8rxjtyo40AHvhGQiSpbYOYD1YFYTeZK/ebM4eFcYRtUxV CKrLEmMomomtyYIU3R6DR/JohtIy3au8QA1/IyRunioT04cBvytZN1G2cRg99+iuixuf PpyyoPy6635cgsoRYvCfG//mSa7NxFaUbnETKLbrP6xhvvBbobjebeaweCJ3iF2eRl8Q RZ7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292850; x=1732897650; h=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=ympqQxCnmfUhkpDAuxNahFpZnepyj4nD+xo2Idv8SDs=; b=ulriuj0gh6n3ewZ29/sFb2OhH9+3G1Ntkg9I8ttUsC5XMw83I3adfa3A6y2VlUbPhv MUu5VqtqjOIYkf7CwsSJisj/xUNuqwB4QGIq3gQVl+/unR/or4SVZngKOL7MI/o63hHA Hdykmim5wgUdw3TooZJnkq4g1UljUZzp6vjnpL9gDx2//BXXgZBTvLWuQUOcsG/Prem+ u4Y/I6rBzDsimhymeLv0jfJDpMrJf7jF2JqHVaJnpGtrWCNtlepri7gmC/2EFbT1AOhe 9ywoa6or2TsXlLh6CgB188r0g6UWvZuJcAT43UKWcEI820JKJ6nfbiMy53cpBFbgWoEP Zknw== X-Gm-Message-State: AOJu0YycoMbbU9dA5Jm1JqEFRi1xxklYG/QhIqk868Z63a6SbxdHCWV+ g9/gYnL7MXJOEEmCozb1TzVekNAwwU+Ttxqbf4o0J3UiwiWIVrqcBC9AyFtDxoEKvmk+gTamEoc cPv5bxrbW2zV9yhoYRkdtI13V2tYOjO6f X-Gm-Gg: ASbGncvqKK4+65ltw6JFRduDlSgw9/XRvT+VXfCRtEBNzEEY6ESiWL5xLSQTdd1M629 HKVJpIGJst6k9mFga8BuOWNXL2uDnQKzb X-Google-Smtp-Source: AGHT+IFYeZvGZcGgvCGGz9cbYwmHoxYEKtSPmi83zgLlnJAB1U4vf2UFmeLpYr89BfEU1EZRE0GXiiycUvE67/n+eAI= X-Received: by 2002:a05:600c:5643:b0:430:5887:c238 with SMTP id 5b1f17b1804b1-434872f5942mr22554855e9.11.1732292849844; Fri, 22 Nov 2024 08:27:29 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: SOzcn Date: Fri, 22 Nov 2024 19:27:18 +0300 Message-ID: Subject: Re: DB Switch over and Switch back support To: jayakumar s Cc: pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000f64b95062782db42" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f64b95062782db42 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, If you did this with the replication method physically it's not possible. You can manage it with Crontab on the OS. As an example ; Switchover 1 from node 1 to node 2. - Make failover on your replica. sudo pg_ctlcluster 14 main promote Switchover 2 : On node 1 clear your data path and make a new replica from node 2 to node 1 then make failover again. You can prepare the steps and manage them with Crontab or some bash script. Bash script might work better for this I think. It could work mostly with less data-sizing environments. If you have a load environment I would advice you to patroni cluster system. Have a nice weekend. jayakumar s , 22 Kas 2024 Cum, 18:59 tarihinde =C5=9Funu yazd=C4=B1: > Hi Team, > > I have configured master and slave DB's. Need to configure switcher and > switch back setup. I checked google but I am unable to find the correct > link. Kindly share with me. If any one has the setup document. > > Also please confirm. Without using any third party s/w. We can do DB > switch over and switch activity? > > Regards, > Jayakumar.S > --000000000000f64b95062782db42 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

If you did this with the replica= tion method physically=C2=A0it's not possible. You can manage it with C= rontab on the OS.=C2=A0

As an example ;
Switcho= ver 1=C2=A0 from node 1 to node 2.=C2=A0
- Make failover on your replica= .=C2=A0=C2=A0 sudo pg_ctlcluster 14 main promote
Switchover 2 :
On node = 1 clear your data path and make a new replica from node 2 to node 1 then ma= ke failover again.

You can prepare the steps and m= anage them with Crontab or some bash script. Bash script might work better = for this I think.

It could work mostly with less data-sizing environ= ments. If you have a load environment I would advice you to patroni cluster= system.

Have a nice weekend.

jayakumar s <= ;kumardba27.postgresql@g= mail.com>, 22 Kas 2024 Cum, 18:59 tarihinde =C5=9Funu yazd=C4=B1:
<= div>Hi Team,

I have configured master and slave DB= 's. Need to configure switcher and switch back setup. I checked google = but I am unable to find the correct link. Kindly share with me. If any one = has the setup document.

Also please confirm. = Without using any third party s/w. We can do DB switch over and switch acti= vity?

Regards,
Jayakumar.S
--000000000000f64b95062782db42--