Re: Problems starting slave - Mailing list pgsql-general

From Ron
Subject Re: Problems starting slave
Date
Msg-id 5f7267fe-de7f-7e94-eed3-88d385099cea@gmail.com
Whole thread Raw
In response to Re: Problems starting slave  (Douglas Reed <dougreed765@yahoo.com>)
List pgsql-general
On 10/3/23 09:37, Douglas Reed wrote:
Hi the full pg_basebackup command was;

    pg_basebackup -h 172.110.6.5 -D /var/lib/pgsql/12/data -R -U postgres --wal-method=stream

I get consistently successful results in v15 using this set of commands (where the service options reference the primary server in .pg_service_conf):

psql service=primary -c "select pg_drop_replication_slot(slot_name) from pg_replication_slots where slot_name = 'pgstandby1';"

/usr/bin/rm -r $PGDATA/*

pg_basebackup --dbname=service=basebackup -D $PGDATA --progress --checkpoint=fast -v \
        --write-recovery-conf --wal-method=stream --create-slot --slot=pgstandby1 --compress=server-zstd

pg_ctl start -wt90

zstd compression might not be supported by v12.

--
Born in Arizona, moved to Babylonia.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [EXT]Re: Connection not allowed because of an error 'Not in pg_hba.conf'
Next
From: Don Seiler
Date:
Subject: Logical Replication vs. Free Replication Slots