Search Postgresql Archives

Version upgrades and replication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux