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

From Condor
Subject [GENERAL] How to check streaming replication status
Date
Msg-id 142f748e8e9a3883a99585af496f4008@stz-bg.com
Whole thread Raw
Responses Re: [GENERAL] How to check streaming replication status  (Glyn Astill <glynastill@yahoo.co.uk>)
List pgsql-general
Hello,

I have a question about master - slave replication.
My version on both servers is : PostgreSQL 9.6.4 on
x86_64-slackware-linux-gnu, compiled by x86_64-slackware-linux-gcc (GCC)
7.2.0, 64-bit

Here is the story:

Today I create a table space and move all indexes on nvmi drives. So far
so good.

Master server is configured as replica and start sending replication wal
files to slave server,
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



Question coming in my mind: Did my slave is up to date ?

I read https://wiki.postgresql.org/wiki/Streaming_Replication and know I
can check status with:

$ psql -c "select pg_last_xlog_receive_location()" -h192.168.0.20
(standby host)

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 ?
I know if there have some different in configurations slave does not
accept connections, but in my case
slave have different hardware so is normal to have differences in config
files.


Regards,
Hristo S


pgsql-general by date:

Previous
From: Achilleas Mantzios
Date:
Subject: Re: [GENERAL] Table create time
Next
From: Glyn Astill
Date:
Subject: Re: [GENERAL] How to check streaming replication status