Professional Documents
Culture Documents
conf
/opt/PostgreSQL/9.6/bin/pg_basebackup -U postgres
-h 192.168.56.24 --xlog-method=stream -R -D /opt/postgres..../data
Select pg_current_xlog_location();
SELECT pg_last_xlog_receive_location();
Création slot :
config master : max_replication_slot>0 et égal a max_wal_senders
Select pg_create_physical_replication_slot('nom_slot');
primary_slot_name='nom_slot'
commandes supplémentaire :
SELECT
client_hostname,client_addr,pg_xlog_location_diff(sent_location, replay_location)
AS difference_in _bytes FROM pg_stat_replication;
configuration :
listen_addresses = '*'
wal_level = hot_standby
archive_mode = on
archive_command = 'cd .'
max_wal_senders = 10
hot_standby = on
max_replication_slots = 10
recovery : primary_slot_name='tarek'