Highlighted
gp_expert
1 Nickel

what is "Standby master too far behind" ? How to fix it?

Jump to solution

When I run  gpstate -f   to check the master and standby hosts infomation.

I get the following infomation:

:--gp_master_mirroring table

:--------------------------------------------------------------

:--Summary state: Not Synchronized

:--Detail state: Standby master too far behind

:--Log time: 2012-11-28 02:31:29+08

But I already run the command  gpinitstandby  -n ..

How to fix it?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
brianoconnell
1 Nickel

Re: what is "Standby master too far behind" ? How to fix it?

Jump to solution

The Standby Master can fall behind if it has been down for a 'long' time.  When you tell it to resynchronize, it looks for the changes on the Master.  However the Master no longer has the changes and this error occurs.

The solution is to remove the standby and to initialize it again.  That will require a small bit of downtime as the Database is stopped during the process.

Regards

Brian O'Connell

4 Replies
banana_hammock
1 Nickel

Re: what is "Standby master too far behind" ? How to fix it?

Jump to solution

This may be a silly question, but have you configured a standby master? If you have, is it configured properly?

What is the full output of 'gpstate -f'? I think there are a few lines missing from the output you supplied.

Is there anything in the GP logs which may indicate a problem?

Our GP instance returns the following.

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:-Starting gpstate with args: -f

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.1.1.8 build 2'

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:-Obtaining Segment details from master...

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:-Standby master instance not configured

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:--------------------------------------------------------------

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:--gp_master_mirroring table

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:--------------------------------------------------------------

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:--Summary state: Not Synchronized

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:--Detail state: Standby master too far behind

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:--Log time: 2011-12-16 05:32:46+11

20121130:08:34:04:gpstate:mdw:gpadmin-[INFO]:--------------------------------------------------------------

We do not have a standby master configured hence the message 'Standby master instance not configured'.

0 Kudos
gp_expert
1 Nickel

Re: what is "Standby master too far behind" ? How to fix it?

Jump to solution

the following is full output :

:-Starting gpstate with args: -f

:-local Greenplum Version: 'postgres (Greenplum Database) 4.2.2.4 build 1'

:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.2.2.4 build 1) on x86

Oct  3 2012 13:06:05'

:-Obtaining Segment details from master...

:-Standby master details

:-----------------------

:-   Standby address          = smdw-1

:-   Standby data directory   = /gpdata/master/gpseg-1

:-   Standby port             = 5432

:-   Standby PID              = 618

:-   Standby status           = Standby host passive

:--------------------------------------------------------------

:--gp_master_mirroring table

:--------------------------------------------------------------

:--Summary state: Not Synchronized

:--Detail state: Standby master too far behind

:--Log time: 2012-11-28 02:31:29+08

:--------------------------------------------------------------

brianoconnell
1 Nickel

Re: what is "Standby master too far behind" ? How to fix it?

Jump to solution

The Standby Master can fall behind if it has been down for a 'long' time.  When you tell it to resynchronize, it looks for the changes on the Master.  However the Master no longer has the changes and this error occurs.

The solution is to remove the standby and to initialize it again.  That will require a small bit of downtime as the Database is stopped during the process.

Regards

Brian O'Connell

gp_expert
1 Nickel

Re: what is "Standby master too far behind" ? How to fix it?

Jump to solution

Thank you very much. you are right.

first to remove the exist standby master :

       gpinitstandby -M fast -r

then to add the standby master  again:

       gpinitstandby -M fast  -s smdw-1