public inbox for [email protected]  
help / color / mirror / Atom feed
From: Gianni Ceccarelli <[email protected]>
To: [email protected]
Subject: Version upgrades and replication
Date: Sat, 23 Nov 2024 19:50:50 +0000
Message-ID: <[email protected]> (raw)

Hello all!

I have a primary+replica PostgreSQL that I think work fine.

I created the replica's data directory using::

    pg_basebackup -D $datadir -h $primary_host -U $replicauser \
                  --write-recovery-conf \
                  --create-slot --slot=$slotname 

after creating the user on the primary (``CREATE ROLE replicauser WITH
REPLICATION PASSWORD 'password' LOGIN``) and allowing connections in
``pg_hba.conf``

Everything looks fine, changes on the primary can be seen on the
replica.

First question: what's the name of this replication mode? Every time I
try to read the documentation I get confused about which is which…

I initially created the replica on PostgreSQL 16. Yesterday I upgraded
to 17: stop the 16 primary, stop the 16 replica, ``pg_upgrade17`` on
the primary, start the 17 primary, re-do the whole base backup with
``pg_basebackup17`` on the replica, start the 17 replica, everything
works like before.

Second question: is there a better way to do that? Without having to
copy the whole cluster data again from scratch?

Thanks in advance!

-- 
	Dakkar - <Mobilis in mobile>
	GPG public key fingerprint = A071 E618 DD2C 5901 9574
	                             6FE2 40EA 9883 7519 3F88
	                    key id = 0x75193F88







reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Version upgrades and replication
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox