setting up streaming replication - Mailing list pgsql-general

From Brad White
Subject setting up streaming replication
Date
Msg-id CAA_1=90OkN-U96eeiHE0=wC218gqYDdzEwcNxPaPGwtcE7+zfg@mail.gmail.com
Whole thread Raw
Responses Re: setting up streaming replication
Re: setting up streaming replication
Re: setting up streaming replication
List pgsql-general
I'm stumped.

Using this command to set up the slave and replication on PG v 15:
"C:\Program Files\PostgreSQL\15\bin\pg_basebackup" -h 192.168.1.126 -U pgrep_user -p 5433 -D "C:\Program Files\PostgreSQL\15\data" -Fp -Xs -R

If I have PG running on the remote server and the data directory is intact, then I get an error, Data exists and is not empty.

If I shut down PG, delete data\*, restart PG, then it fails to start because the conf files are missing.

If I leave PG shut down and run pg_basebackup, it times out and asks if pg is running and listening on the port. Of course it is not.

I see lots of posts on how to use pg_basebackup, but apparently this isn't interesting because no one mentions whether pg should be running on the remote server. Just that the data dir must be empty.

I know this works because I've done it before. But I don't see the trick I'm missing.

Thanks,
Brad.

pgsql-general by date:

Previous
From: pf@pfortin.com
Date:
Subject: Re: Disk wait problem... 15.4
Next
From: Adrian Klaver
Date:
Subject: Re: Disk wait problem...