From: | Romain MAZIÈRE <romain(dot)maziere(at)sigmaz-consilium(dot)fr> |
---|---|
To: | Ashok Patil <ashokrpatil(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Query regarding managing Replication |
Date: | 2023-06-27 14:09:46 |
Message-ID: | d5282922-506c-027d-98bd-276fef90bed4@sigmaz-consilium.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)maziere(at)sigmaz-consilium(dot)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 <http://172.20.32.63/32> scram-sha-256
> host replication 172.20.32.43/32 <http://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
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2023-06-27 14:33:03 | Re: When will trusted PL/Python be supported? |
Previous Message | Ashok Patil | 2023-06-27 14:04:00 | Query regarding managing Replication |