Re: Postgres HA issue - Standby server does not start after Master compute host is shut down

From: "Jehan-Guillaume (ioguix) de Rorthais" <ioguix(at)free(dot)fr>
To: Nagendra Bandi <nagendra(dot)bandi(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres HA issue - Standby server does not start after Master compute host is shut down
Date: 2019-09-04 08:36:00
Message-ID: 20190904103600.6852e46c@firost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 3 Sep 2019 21:31:23 +0530
Nagendra Bandi <nagendra(dot)bandi(at)gmail(dot)com> wrote:

> Hi Jehan,
> Thanks for your quick response.
> Standby is built from the primary using pg_basebackup. i.e. Initial copy of
> the primary database is taken with pg_basebackup command

pg_basebackup is supposed to make an non-exclusive backup, so this error
shouldn't happen.

Did you check the online backup actually succeed?

> and then restarted the server.

What is this server restart about? Do you restart the primary? Is it a simple
startup of the standby?

There something wrong somewhere in your procedure. Could you share your precise
procedure steps please?

> On Tue, Sep 3, 2019 at 8:43 PM Jehan-Guillaume (ioguix) de Rorthais <
> ioguix(at)free(dot)fr> wrote:
>
> > On Tue, 3 Sep 2019 20:27:37 +0530
> > Nagendra Bandi <nagendra(dot)bandi(at)gmail(dot)com> wrote:
> > ...
> > > *Problem Description :*
> > >
> > > PostgreSQL database is set up for High Availability and *asynchronous
> > > streaming replication* with *hot standby* as described in
> > >
> > https://www.postgresql.org/docs/9.4/warm-standby.html#STREAMING-REPLICATION
> > .
> > > There is only 1 master and 1 standby server set up. The deployment is on
> > > Openstack cloud where master database is running on one compute host and
> > > standby server is running on another compute host. When master is brought
> > > down (*compute host is powered off*), stand by is *not* able to take
> > over.
> > > The PostgreSQL database server on the standby fails to start with errors
> > > messages given below.
> > >
> > > *Error logs from Standby Postgres DB:*
> > >
> > > *Logs form postgres log :
> > > *< 2019-08-22 16:00:04.110 UTC >LOG: invalid record length at C/513BF150
> > >
> > > < 2019-08-22 16:00:04.110 UTC >LOG: redo done at C/513BF118
> > >
> > > < 2019-08-22 16:00:04.115 UTC >FATAL: WAL ends before end of online
> > backup
> >
> > It looks like the standby never received the end of online backup record
> > from
> > the master.
> >
> > Could you describe how you built your standby?
> >
> > Regards,
> >

--
Jehan-Guillaume de Rorthais
Dalibo

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2019-09-04 09:14:32 Re: Postgres HA issue - Standby server does not start after Master compute host is shut down
Previous Message Arnaud L. 2019-09-04 08:28:58 Re: Slow statement using parallelism after 9.6>11 upgrade