Standby ahead of master?

SOLVED
Highlighted
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 :)

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

 

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

Archived Discussions


Effective March 31st, we will no longer engage on PostgresRocks.


How to engage with us further?


  • Thought Leadership: EDB Blogs

  • Tips and Tricks: Postgres Tutorials

  • Customer Support: Create a Case Please note: Only customers with an active EDB support subscription and support portal authorization can create support ticket

  • Engage on Stackoverflow While engaging on Stackoverflow tag the question with EDB or EnterpriseDB.

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.

Regards,
Dhananjay

View solution in original post

3 REPLIES 3
Highlighted
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.

Regards,
Dhananjay
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.

Regards,
Dhananjay

View solution in original post

Highlighted
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

© 2019 EnterpriseDB Corporation. All rights reserved.   |   Privacy Policy   |  Terms of Use   |   Trademarks