Re: Query regarding managing Replication

Поиск
Список
Период
Сортировка
От Romain MAZIÈRE
Тема Re: Query regarding managing Replication
Дата
Msg-id d5282922-506c-027d-98bd-276fef90bed4@sigmaz-consilium.fr
обсуждение исходный текст
Ответ на Query regarding managing Replication  (Ashok Patil <ashokrpatil@gmail.com>)
Ответы Re: Query regarding managing Replication
Список pgsql-general

Hello,

You can have a look at the parameter : listen_addresses in the file postgresql.conf.
By default the value is localhost.

Regards

Romain MAZIÈRE
romain.maziere@sigmaz-consilium.fr
+33.535.545.085
+33.781.46.36.96
https://sigmaz-consilium.fr
Le 27/06/2023 à 16:04, Ashok Patil a écrit :
Hello Sir/Madam,

I have to perform task of database replication. For that for testing purpose I have installed Postgress 14 on two different machine. One is primary (We can say it as server) and another one is secondary (stand by).

Below steps i have performed 

On Primary

1. Update Postgres.conf with below settings
wal_level = hot_standby
full_page_writes = on
wal_log_hints = on
max_wal_senders = 6
max_replication_slots = 6
hot_standby = on
hot_standby_feedback = on

2. update pg_hba.conf
host replication 172.20.32.63/32 scram-sha-256
host replication 172.20.32.43/32 scram-sha-256

3. Create a repl_user
psql  -d postgres   -U postgres   -c "CREATE ROLE repl_user LOGIN REPLICATION ENCRYPTED PASSWORD 'xxx';"

4. create the replication slot using below command 
psql -d postgres -U postgres  -c "SELECT * FROM pg_create_physical_replication_slot('standby1', true);"

On Standby

5.Perform a base backup of primary to standby
pg_ctl -D ..\data. stop -mi

6. After stopping the cluster delete the data directory
rmdir /s ..\data

7. run pg_basebackup on the standby to copy primary’s data directory to it.
pg_basebackup -D ..\data -Fp -R -Xs -c fast -l 'initial_clone' -P -v -h  172.20.32.63 y -U repl_user

but here i am getting error as 
pg_basebackup: error: connection to server at "172.20.32.63", port 5432 failed: Connection timed out (0x0000274C/10060)
        Is the server running on that host and accepting TCP/IP connections?

Will you please let me know which steps is wrong.

Also is there any proper steps given in any document, if yes, will you please share that.

Thanks in advance.

Regards,
Ashok


В списке pgsql-general по дате отправления:

Предыдущее
От: Ashok Patil
Дата:
Сообщение: Query regarding managing Replication
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: When will trusted PL/Python be supported?