Postgres

General

creating backup with recovery file and specifying replication slot

pg_basebackup -h $HOST -D $PATH -U $USER -R -P -S replication_slot

check replication

select * from pg_stat_replication;
select * from pg_stat_activity where usename='$REPLIATION_USER';

create replication slot

select * from pg_create_physical_replication_slot('replication_slot');

list users

select * from pg_authid;

References

https://www.postgresqltutorial.com/postgresql-administration/postgresql-create-tablespace/