From lists@alteeve.ca Sun Aug 15 19:16:50 2021 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFLd6-0002IL-PA for pgsql-general@arkaria.postgresql.org; Sun, 15 Aug 2021 19:17:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mFLd2-0005p6-Mj for pgsql-general@arkaria.postgresql.org; Sun, 15 Aug 2021 19:17:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFLd2-0005og-3u for pgsql-general@lists.postgresql.org; Sun, 15 Aug 2021 19:17:04 +0000 Received: from mail.alteeve.com ([198.96.117.112] helo=zimbra.alteeve.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFLcw-0001pf-Ew for pgsql-general@lists.postgresql.org; Sun, 15 Aug 2021 19:16:59 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.alteeve.com (Postfix) with ESMTP id 6223F22236E98 for ; Sun, 15 Aug 2021 15:13:13 -0400 (EDT) Received: from zimbra.alteeve.com ([127.0.0.1]) by localhost (zimbra.alteeve.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZTV_YoP1MgzR for ; Sun, 15 Aug 2021 15:13:09 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.alteeve.com (Postfix) with ESMTP id F205522236E9B for ; Sun, 15 Aug 2021 15:13:08 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra.alteeve.com F205522236E9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alteeve.ca; s=3658BF78-91B3-11E8-A999-AEFD2914AE28; t=1629054789; bh=ajpJB7EoOFALG4zxibzvXSbNIVy57bMFhvy7qrEL2yc=; h=To:From:Message-ID:Date:MIME-Version; b=NmSX47bSYaA9g651vFIaEvN0GfaiDFLLgnNReNNXQjLkOKeB+OKdlEJKQX2z6E+zk fjwY+slnfZ75mpd2bMl5ephs4KIqNjxxEJjGG8DbqQHcxL3D7wDTTFS+dPjlmfP2hH VqARzma3C2Zt+OHVLAKSzqFUbKb6Fy7mIq6z/Duhfht3388lyBTyAq8Pfc/ilk1HdS iphI/zQCO768RY2clvQJC4XcJaG33HLISLj7U5CDcMlEQDnJ6+Cw8pBtTfEyYhHqTw axZ+1bnwR2ozC4ljN44dWB7t4vDYa7mAiRUW6j5CUcRuv7BRiAQBJh7srGBYoyd+vS 7kgQxId9XZj1g== X-Virus-Scanned: amavisd-new at zimbra.alteeve.com Received: from zimbra.alteeve.com ([127.0.0.1]) by localhost (zimbra.alteeve.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JEzb5t7sY4oB for ; Sun, 15 Aug 2021 15:13:08 -0400 (EDT) Received: from gravitar.alteeve.com (dhcp-108-168-17-168.cable.user.start.ca [108.168.17.168]) by zimbra.alteeve.com (Postfix) with ESMTPSA id C5B3722236E98 for ; Sun, 15 Aug 2021 15:13:08 -0400 (EDT) To: "pgsql-general@lists.postgresql.org" From: Digimer Subject: Single mater replica setup for an existing DB Message-ID: Date: Sun, 15 Aug 2021 15:16:50 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 Content-Type: text/html; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk

Hi all,

=C2=A0 Could I get recommendations on how to convert an existing database to a single-master replica setup?

=C2=A0 I'm running on RHEL 8 (pgsql version 10.17). I'd like to replicate the existing database to 1 (maybe 2) other hosts, synchronously ideally though async might be OK.

=C2=A0 Any pointers / advice documentation links would be much appreciated. :)

--=20
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of Einstei=
n=E2=80=99s brain than in the near certainty that people of equal talent =
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould=
From vijaykumarjain.github@gmail.com Mon Aug 16 20:39:54 2021 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFjP3-0001TE-Fd for pgsql-general@arkaria.postgresql.org; Mon, 16 Aug 2021 20:40:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mFjP1-0007UI-Ls for pgsql-general@arkaria.postgresql.org; Mon, 16 Aug 2021 20:40:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFjP1-0007Tt-B6 for pgsql-general@lists.postgresql.org; Mon, 16 Aug 2021 20:40:11 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mFjOy-0005Aw-EV for pgsql-general@lists.postgresql.org; Mon, 16 Aug 2021 20:40:10 +0000 Received: by mail-lj1-x241.google.com with SMTP id h17so29139236ljh.13 for ; Mon, 16 Aug 2021 13:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J7kvbAjGsdCSMm/IFq1Y4ExcrotmpPgmSlZH24jNVO8=; b=aeSgddLI9bwzQKv8FqowENiDP/l1QzUdEScRklaWxz3FsPYceoeeraFaaFSAuUKpwg Z8CbWarTSrItnGdmhYSvH/Dl6UnyTVC4geAWxICi1EPOc85JfFRzggaUCLLCKBCKxW0E sKqi1KHolPrtTjomWQGPhB719Somi6Q8jIT6IwpVIlEok8cy1Ybq2uzbgAgcraioQo1y uFhiGHhH58cn5zgsuk534UM4ztGFCgjkjbmpxsZ4aOhPvE4BjiitfoJBJLu1+cfTtTXo UTdsPLm0lvlIHfAi4JXLvvSnAOu18dAamp/HVLFW/ZA8KwlJ71I/kwzvmPzWw57S2Rdx iXHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J7kvbAjGsdCSMm/IFq1Y4ExcrotmpPgmSlZH24jNVO8=; b=JcFUTQoE3alCNKqNmt6w7lYxN9NBu2Qe+HghXPs8qvPqMCdDk90tlktgJzpDKLNi5C 5S8fuUY3SIhnOgpn9KY78H4BVJwl0UXOotAehrAJXfxeAEKKO9MLW9Yz4VU9SQO0uq86 FHmkrEKas/mCjbj1K5LmmAwbFtHAYrkMAAy8VWcYYW5fOiTuHbdeCuxNLQNHOV/5n9Aw dQNNMH9uWioaSyXuSGptS4EkguMERnljsiSU8N00zEDYysFTjNdGgbw0I4pe1SEBd8kE bSoIS/RwXSXEq+0BIiuaPSAws4RFYQT3JWW5cqp/jf6/Da8c+VAdY0cXDmLXibgaonmz +iEw== X-Gm-Message-State: AOAM5329Ht+1XxPQQivHCz7OugEv12S+Vq2K+TnGZEAf+jEP4LPkRc8H a1iv2GM4Y2v81W/cEjOAIYeNBgpDiKTPs29zb3VrSqgPEOk= X-Google-Smtp-Source: ABdhPJzYIu1/ffqHf1dYGzbCVW+yrqlvcC5YBjMkNHkR1ae8qiRD/Kaxr4iwDIUqEWA1F7BVafSFjpnqR5I2JxHEyaQ= X-Received: by 2002:a2e:b8c9:: with SMTP id s9mr50927ljp.339.1629146405272; Mon, 16 Aug 2021 13:40:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Vijaykumar Jain Date: Tue, 17 Aug 2021 02:09:54 +0530 Message-ID: Subject: Re: Single mater replica setup for an existing DB To: Digimer Cc: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000c6015405c9b33412" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c6015405c9b33412 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 16 Aug 2021 at 00:47, Digimer wrote: > Hi all, > > Could I get recommendations on how to convert an existing database to a > single-master replica setup? > > I'm running on RHEL 8 (pgsql version 10.17). I'd like to replicate the > existing database to 1 (maybe 2) other hosts, synchronously ideally thoug= h > async might be OK. > hands on using katakoda: CrunchyData Interactive Learning Portal blogs: Setting up Streaming Replication in PostgreSQL 13 and Streaming Replication Internals - MigOps There are many blogs for versions 11, 12 also. -- i moved from manual to patroni, so found patroni simple to set up. ymmv postgres HA using patroni. There is an option to add an existing node to the patroni cluster. Convert a Standalone to a Patroni Cluster =E2=80=94 Patroni 2.1.0 documenta= tion official reference (especially for tuning config): PostgreSQL: Documentation: 12: Part III. Server Administration -- Thanks, Vijay Mumbai, India --000000000000c6015405c9b33412 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Mo= n, 16 Aug 2021 at 00:47, Digimer <li= sts@alteeve.ca> wrote:
=20 =20 =20

Hi all,

=C2=A0 Could I get recommendations on how to convert an existing database to a single-master replica setup?

=C2=A0 I'm running on RHEL 8 (pgsql version 10.17). I'd like= to replicate the existing database to 1 (maybe 2) other hosts, synchronously ideally though async might be OK.


hands on using katakoda:

blogs:
Setting up Streaming Replicati= on in PostgreSQL 13 and Streaming Replication Internals - MigOps
There are many blogs for versions 11, 12 also.=C2=A0

=
-- i moved from manual to patroni, so found=C2=A0patroni simple = to set up. ymmv
postgres HA using patroni.
There is an = option to add an existing=C2=A0node to the patroni cluster.=C2=A0
Co= nvert a Standalone to a Patroni Cluster =E2=80=94 Patroni 2.1.0 documentati= on

official reference (especially for tuni= ng config):

--
Thanks,
Vijay
M= umbai, India
--000000000000c6015405c9b33412--