Our objective is to create a copy of a PostgreSQL database that is constantly synchronizing with the original one and accepts read-only queries.
This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-create-a-hot-standby-with-postgresql
Hi, it looks good but I think is wrong:
Debian based systems:
$ sudo pg_basebackup -h 192.168.68.64 -U repuser -D /etc/postgresql/16/main/
I think it should be:
sudo pg_basebackup -h 192.168.68.64 -U repuser -D /var/lib/postgresql/16/main/