Promote replica before being able to accept connections

From: Martín Fernández <fmartin91(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Promote replica before being able to accept connections
Date: 2019-02-10 17:32:48
Message-ID: CAH0BA3n6=ocXO9T8D5HXnGMMmN838LfKmvCDpMTJZJf2dx3wAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Everyone!

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.

Thanks in advance!

Best,
Martín

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hannes Erven 2019-02-10 22:49:21 Re: Unused files in the database directory after crashed VACUUM FULL
Previous Message Andrew Gierth 2019-02-10 15:53:03 Re: Unused files in the database directory after crashed VACUUM FULL