Re: Query regarding managing Replication

From: Ashok Patil <ashokrpatil(at)gmail(dot)com>
To: Romain MAZIÈRE <romain(dot)maziere(at)sigmaz-consilium(dot)fr>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Query regarding managing Replication
Date: 2023-06-30 08:17:29
Message-ID: CALdbwZy5_c62Z8V9rUqJE7ZexbC0-HpaR3VoscW8T_zB6BrwLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello MAZIÈRE,

I tried update by

listen_addresses = '*' and listen_addresses = 'server_address' but still
i am getting same error.

Searched on internet for probable solution but does not get any proper
answer.

Will you please reply me for this issue?

Regards,
Ashok

On Tue, Jun 27, 2023 at 7:39 PM Romain MAZIÈRE <
romain(dot)maziere(at)sigmaz-consilium(dot)fr> wrote:

> 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ÈREromain(dot)maziere(at)sigmaz-consilium(dot)fr
> +33.535.545.085
> +33.781.46.36.96https://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
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Julien Rouhaud 2023-06-30 08:31:53 Re: Query regarding managing Replication
Previous Message shveta malik 2023-06-30 07:06:07 Re: Support logical replication of DDLs