From: | Martín Fernández <fmartin91(at)gmail(dot)com> |
---|---|
To: | "Laurenz Albe" <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Promote replica before being able to accept connections |
Date: | 2019-02-11 14:59:27 |
Message-ID: | 5c618d9da914d363cd000005@polymail.io |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Laurenz,
That makes sense!
Thanks for the quick reply
Best,
Martín
On Mon, Feb 11th, 2019 at 7:55 AM, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
>
>
> Martín Fernández wrote:
> > We have a 9.2 pg cluster and we are in the process of rebuilding a
> master database in our staging environment.
> > In order to achieve the latter goal, we are restoring our staging
> database using pg_basebackup against one
> > of our production replicas.
> >
> > pg_basebackup has completed and the staging database is configured in
> hot_standby mode, recovering from
> > the WAL archive. The database has not reached the point were it can
> accept connections yet, still
> > investing WAL files.
> >
> > What we are not sure about is, can we attempt promoting the database as
> a master instance before it can
> > accept connections ? We don´t care if the staging database is a few days
> behind the production environment,
> > that is something acceptable in our use case, we just want to promote it
> as soon as we can.
>
> The earliest time to which you can recover is the end of the backup.
>
> Until recovery has reached that point, the database is not consistent
> (that's the "consistent recovery state" the logs are talking about).
>
> You cannot connect to the recovering database or promote it before you
> reach that point, so you have to wait until you can connectio to the
> database
> before you can promote it.
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tiffany Thang | 2019-02-11 16:00:37 | Copy entire schema A to a different schema B |
Previous Message | Pavel Stehule | 2019-02-11 14:47:10 | Re: Implementing pgaudit extension on Microsoft Windows |