pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Martín Fernández <fmartin91@gmail.com>
Cc: Hellmuth Vargas <hivs77@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: PG Upgrade with hardlinks, when to start/stop master and replicas
Date: Tue, 19 Feb 2019 11:37:06 -0500
Message-ID: <20190219163706.GV6197@tamriel.snowman.net> (raw)
In-Reply-To: <5c6c2c3e3ec218380d000001@polymail.io>
References: <CAN3Qy4oDNdRDeD0UoipmK9aMRxeKftnr67NW1v+zu0uPGJR7Nw@mail.gmail.com>
	<5c6c2c3e3ec218380d000001@polymail.io>

Greetings,

* Martín Fernández (fmartin91@gmail.com) wrote:
> Thanks for information! I've refactor our migration scripts to follow the suggestions. 

Please don't top-post on these mailing lists.

> One extra question that popped up. As long as we don't start the standby (after running rsync), we can always `rm -f $PGDATA_10` and promote the standby if necessary for failover right ? We also need to `mv` pg_control.old to pg_control in the old data directory.

Not sure which standby we're talking about here, but in general, yes, as
long as you haven't actually started the system after the
pg_upgrade/rsync, you should be able to blow away the new cluster that
pg_upgrade/rsync created and start the old cluster back up and promote
it (if necessary) and use it.

Note that you should *not* need to do anything with pg_control, I have
no idea what you're referring to there, but the old cluster should have
the pg_control file and all the catalog tables in place from before the
pg_upgrade/rsync (those aren't touched during the pg_upgrade/rsync
process) and you would just need to start up the old binaries pointing
at the old PG data directory and everything should just work.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (17+ messages)  latest in thread

Message-ID: <20190219163706.GV6197@tamriel.snowman.net>
Permalink:  ../20190219163706.GV6197@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20190219163706.GV6197@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, fmartin91@gmail.com, hivs77@gmail.com
  Subject: Re: PG Upgrade with hardlinks, when to start/stop master and replicas
  In-Reply-To: <20190219163706.GV6197@tamriel.snowman.net>
  References: <CAN3Qy4oDNdRDeD0UoipmK9aMRxeKftnr67NW1v+zu0uPGJR7Nw@mail.gmail.com> <5c6c2c3e3ec218380d000001@polymail.io> <20190219163706.GV6197@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox