cancel
Showing results for 
Search instead for 
Did you mean: 

Standby ahead of master?

SOLVED
Level 3 Adventurer

Standby ahead of master?

Ok.. running a large update test on my lab, and I'm seeing that the Standby XLogs are ahead of the master. They were running in sync as of yesterday afternoon, and this is the first I've looked at it today. I thought I was crazy, but here's a screenshot Smiley Happy

mRemoteNG_2018-08-09_14-04-58.png

 

What's a good step toward diagnosing this other than being patient?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
EDB Team Member

Re: Standby ahead of master?

Hi lgwapnitsky,

 

Actually, only segments are different.  Both master and slave are on the same WAL file. and are in sync. 

You can test it manually as well by creating a test table.

Kindly refer below for the details that show that Master and salve is on same XLog file.

 

postgres=# select pg_xlogfile_name('8F/9E1CF668');

     pg_xlogfile_name     

--------------------------

000000010000008F0000009E

(1 row)

 

postgres=# select pg_xlogfile_name('8F/9E24FEB0');

     pg_xlogfile_name     

--------------------------

000000010000008F0000009E

(1 row)

 

We just need to be patient now. However, it will be helpful if you share the outputs of previously requested details.

 

Hope this helps.

3 REPLIES
EDB Team Member

Re: Standby ahead of master?

Hi lgwapnitsky,

 

Can you please share below details. That will help us to understand the issue in more details :

 

1. Slave server logs at the time when you bulk operation was going on.

2. Slave server current log.

3. Execute below command on master and its output.

SELECT * FROM pg_stat_replication ;

 

4. Pg_controdata output for both the master and slave server.

Below is the example for pg_controldata :

/opt/PostgreSQL/9.5/bin/pg_controldata -D /opt/edb/as9.6/data

 

Above logs will help us to analyze this issue in more details.

Highlighted
EDB Team Member

Re: Standby ahead of master?

Hi lgwapnitsky,

 

Actually, only segments are different.  Both master and slave are on the same WAL file. and are in sync. 

You can test it manually as well by creating a test table.

Kindly refer below for the details that show that Master and salve is on same XLog file.

 

postgres=# select pg_xlogfile_name('8F/9E1CF668');

     pg_xlogfile_name     

--------------------------

000000010000008F0000009E

(1 row)

 

postgres=# select pg_xlogfile_name('8F/9E24FEB0');

     pg_xlogfile_name     

--------------------------

000000010000008F0000009E

(1 row)

 

We just need to be patient now. However, it will be helpful if you share the outputs of previously requested details.

 

Hope this helps.

Level 3 Adventurer

Re: Standby ahead of master?

It eventually caught up and we're good.  Just causes me concern if i have an emergency failover.


Thanks, all