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 1rf4Na-00FGEN-7H for pgsql-general@arkaria.postgresql.org; Tue, 27 Feb 2024 20:48:46 +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 1rf4NY-0069jk-Rb for pgsql-general@arkaria.postgresql.org; Tue, 27 Feb 2024 20:48:45 +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 1rf4NY-0069jb-As for pgsql-general@lists.postgresql.org; Tue, 27 Feb 2024 20:48:45 +0000 Received: from sonic320-50.consmr.mail.bf2.yahoo.com ([74.6.128.231]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rf4NU-001bGf-In for pgsql-general@postgresql.org; Tue, 27 Feb 2024 20:48:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1709066919; bh=k46Izz3OJVS8AOsoYJQ/tLU3KuwHj7o1Q17ezURELEg=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject:Reply-To; b=IbESZEZR4IZQfjwLzKv23o66gofDcoT2eedcTHZYp2QiL7ynzFW9Pb/lP2Tl1eKRbQ3rdjRoPYAuO9IHT9O4mdbK5LGc9V9vvp2jY/KSMMKV2PE4m++dAm0Chnnhctc2yH5MYyKYAZW5PFLV7WQbJsxKmiDBWxNxfOEACRauRZeBApHJ4LITjyVTwq6Ef2FEsEUsV6zk8TU1l697E+Pkyc8pKLDc0J3MLw8xMx36FlrDorbeA/NCLT8zM7cvcg6xssSUaqYfPgorA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7N2CH3KOJy07u9 JCyWNeB3d3pnHFa3bMRL2VFNWq.6151D_7RX6w26B1kiiekB1BaeV6ZuWv369iTVn_fDuMFl2_4_ WM1XN84n6Ejmsenq7j85E9eoOdzxBKKxDwrBmt3qOKM0MKHtHDDGJwqSDy8.XRoIgz.RHjwgEibT SbpV5aSkgHVW6Zvj2pXriIccmpR3NR7AUmM2kIGsKTXSiiEngWe2cdTPLIiPvCqoZTZulgEIBd_8 3bWGbGEU7mrLOknqg71KrhT67074Q0nGFlmHV0vJwqvf7axUk8acemHOr07ANoxiV7dYQs49vzcg ig_Yvbe2f9ef4AoS6Y5yI4HZurzNAmBbp6i95nrxNBa.mjkZZwvqGjtfQzPE3PjeBbvrtMpNuW3c I0_3YrlaXnMfuHNyGrd5IvVpiXEE0hgOaAgRY5cuSYPh2DjVKs7_DlQgBd5gQ4mWHA1FrgbSyKJ9 yu3yhj9YZ2tkVEy9qsQzEHTi9ckzeLWe9s.S53dv80xPobkSApz6G6V4CbYn6cKCk31J2OPEqDGF mfRP1fsLuLBPwNRt.1wDwsScr7soNppxzAJo_T.hLo5nub0mrWrMtqH2GPmEfQpshg2cn3Y6107x h55vfSkIgeY5VZ5qW.jvnq7G0TJ8VABDREfuwQpgiz2xDOS1FNIxPDWS4dTCQ8T..A.eg6cn7uqS RS8aydFsxnLsQ9ERZGL_2FgLyDWpxvF1OtSn4FZZfRUvqFnD8N3R5AmJFAaO8TjrYcb_hj8O.xNK j07GD_6AqkFSg_Ata9_kQeOvCNH5VNCJCU_UFDlRXKFi1LUjjYM5hI0v1uN7XAtGfkrg_kUVKjrl VXVdgJqgxslT8IfwqoJAWsMVy X-Sonic-MF: X-Sonic-ID: b8c2f031-300b-4c7f-bc30-27a194d650fc Received: from sonic.gate.mail.ne1.yahoo.com by sonic320.consmr.mail.bf2.yahoo.com with HTTP; Tue, 27 Feb 2024 20:48:39 +0000 Date: Tue, 27 Feb 2024 20:46:33 +0000 (UTC) From: Jason Long Reply-To: Jason Long To: Ron Johnson , Pgsql-general General Message-ID: <1668855396.866991.1709066793039@mail.yahoo.com> In-Reply-To: References: <2131161806.698565.1709023412017.ref@mail.yahoo.com> <2131161806.698565.1709023412017@mail.yahoo.com> <1267802730.758412.1709046484381@mail.yahoo.com> <225b8b45-3e54-4c4e-bf7f-f4a9950621c8@aklaver.com> <730983731.798844.1709053243136@mail.yahoo.com> Subject: Re: PostgreSQL Guard MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_866990_993714504.1709066793037" X-Mailer: WebService/1.1.22103 YahooMailAndroidMobile Content-Length: 8061 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_866990_993714504.1709066793037 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,Do I have to run this command on the server where the main database is l= ocated? Suppose you want to transfer the database of a website like Amazon.com to a= new server and delete the old one. Many users are buying and selling on th= is website at the same time and it is not possible to turn off the server. = What do you do to move a database to another server? =20 =20 On Tue, Feb 27, 2024 at 9:30 PM, Ron Johnson wro= te: I used this web page to implement hot standby via physical streaming.= =C2=A0 This command sets up everything for you:pg_basebackup \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --pgdata=3D$PGDATA \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --dbname=3Dservice=3Dbasebackup \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --verbose --progress \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --checkpoint=3Dfast \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --write-recovery-conf \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --wal-method=3Dstream \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --create-slot --slot=3Dpgstandby1= \ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --compress=3Dserver-zstd I got it from https://www.tecmint.com/configure-postgresql-streaming-replic= ation-in-centos-8/, which I encourage you to read. For guarding, and situations with a minimal RTO SLA, I use PgPool-II to man= age the cluster, automatic failover and Virtual IP address.=C2=A0 Note that= only two database servers are needed.=C2=A0 Install PgPool on the two DB s= ervers, and a third, smaller system. There are other products which do the same thing as PgPool, and you might f= ind them better. On Tue, Feb 27, 2024 at 12:00=E2=80=AFPM Jason Long w= rote: Hi,Should I read https://www.postgresql.org/docs/current/warm-standby.html#= STANDBY-SERVER-SETUP for question number 2? =20 =20 On Tue, Feb 27, 2024 at 7:28 PM, Adrian Klaver= wrote: On 2/27/24 07:08, Jason Long wrote: > Hi, > 1- Both split-brain protection and security. Any tool? >=20 > 2-=C2=A0Consider a database related to a website, which data is regularly= =20 > entered. Now you want to transfer this database to another server.=20 > What's the solution? https://www.postgresql.org/docs/current/high-availability.html --=20 Adrian Klaver adrian.klaver@aklaver.com =20 =20 ------=_Part_866990_993714504.1709066793037 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,
Do I have to run this command on the server where the main database i= s located?

Suppose you want to transfer the database of a= website like Amazon.com to a new server and delete the old one. Many users= are buying and selling on this website at the same time and it is not poss= ible to turn off the server. What do you do to move a database to another s= erver?

On Tue, Feb 27, 2= 024 at 9:30 PM, Ron Johnson
<ronljohnsonjr@gmail.com> wrote= :
I used this web page to implement hot standby via physical stream= ing.  This command sets up everything for you:
pg_basebackup \
        &= nbsp;   --pgdata=3D$PGDATA \
      &n= bsp;     --dbname=3Dservice=3Dbasebackup \
&nbs= p;           --verbose --progress \
            --checkpoint=3Dfast \
            --write-recovery-conf = \
            --wal-method= =3Dstream \
            --c= reate-slot --slot=3Dpgstandby1 \
      &nb= sp;     --compress=3Dserver-zstd
<= div>I got it from https://www.tecmint.com/configure-postgresql-= streaming-replication-in-centos-8/, which I encourage you to read.

For guarding, and situations with a min= imal RTO SLA, I use PgPool-II to manage the cluster, automatic failover and= Virtual IP address.  Note that only two database servers are needed.&= nbsp; Install PgPool on the two DB servers, and a third, smaller system.

There are other products which do the= same thing as PgPool, and you might find them better.

On Tue, Feb 27, 2024 at 12:00=E2=80=AFPM Jason= Long <hack3rcon@yahoo.com> wrote:
Hi,

On Tue, Feb 27, 2024 at 7:28 PM, Adrian Klaver
On 2/27/24 07:08, Jason Long wrote:

> Hi,
> 1- Both split-brain protection and security. Any tool?
>
> 2- Consider a database related = to a website, which data is regularly
> entered. Now = you want to transfer this database to another server.
&g= t; What's the solution?


https://www= .postgresql.org/docs/current/high-availability.html
<= br clear=3D"none">

--
Adrian Klaver
adrian.klaver@aklaver.com<= div id=3D"yiv0097775024m_-3373429966443162589yqtfd03511">

------=_Part_866990_993714504.1709066793037--