Re: [GENERAL] How to check streaming replication status - Mailing list pgsql-general

From Glyn Astill
Subject Re: [GENERAL] How to check streaming replication status
Date
Msg-id 1794705147.238827.1504167892037@mail.yahoo.com
Whole thread Raw
In response to [GENERAL] How to check streaming replication status  (Condor <condor@stz-bg.com>)
Responses Re: [GENERAL] How to check streaming replication status  (Condor <condor@stz-bg.com>)
List pgsql-general

> From: Condor <condor@stz-bg.com>
> To: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
> Sent: Thursday, 31 August 2017, 08:36:19 GMT+1
>
> after a hour I get error message on slave server:
>
> LOG:  restored log file "000000010000008B000000DC" from archive
> LOG:  restored log file "000000010000008B000000DD" from archive
> cp: can get attribute '/archive/000000010000008B000000DE': No such file or directory
> LOG:  started streaming WAL from primary at 8B/DD000000 on timeline 1

So it read all the log from the archive then started streaming, if there are no futrher messages you're ok.

...

> and after I did it, got:
>
> STATEMENT:  SELECT pg_current_xlog_location()
> ERROR:  recovery is in progress
> HINT:  WAL control functions cannot be executed during recovery.
>
> My question is: How I can check the replication status when the slave
> does not accept connections ?

That's right for a server in recovery you need to call pg_last_xlog_receive_location() or pg_last_xlog_replay_location() to get the current xlog position.

pgsql-general by date:

Previous
From: Condor
Date:
Subject: [GENERAL] How to check streaming replication status
Next
From: Condor
Date:
Subject: Re: [GENERAL] How to check streaming replication status