Re: Postgres HA issue - Standby server does not start after Mastercompute host is shut down - Mailing list pgsql-general

From Nagendra Bandi
Subject Re: Postgres HA issue - Standby server does not start after Mastercompute host is shut down
Date
Msg-id CAO8W-N8-8+24_sawh36R7Kwc7GuvO-dkov57fX0QwE-hbgGeyQ@mail.gmail.com
Whole thread Raw
In response to Re: Postgres HA issue - Standby server does not start after Mastercompute host is shut down  ("Jehan-Guillaume (ioguix) de Rorthais" <ioguix@free.fr>)
Responses Re: Postgres HA issue - Standby server does not start after Mastercompute host is shut down
Re: Postgres HA issue - Standby server does not start after Mastercompute host is shut down
List pgsql-general
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 and then restarted the server.
Regards,
Nagendra

On Tue, Sep 3, 2019 at 8:43 PM Jehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr> wrote:
On Tue, 3 Sep 2019 20:27:37 +0530
Nagendra Bandi <nagendra.bandi@gmail.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,

pgsql-general by date:

Previous
From: "Jehan-Guillaume (ioguix) de Rorthais"
Date:
Subject: Re: Postgres HA issue - Standby server does not start after Mastercompute host is shut down
Next
From: Michael Lewis
Date:
Subject: Re: Bad Estimate for multi tenant database queries