pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Martín Marqués <martin@2ndquadrant.com>
Cc: DEGLAVE Remi <remi.deglave@lyreco.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Cc: Michael Paquier <michael.paquier@gmail.com>
Subject: Re: [PG_UPGRADE] 9.6 to 10.5
Date: Thu, 16 Aug 2018 13:58:35 -0400
Message-ID: <20180816175835.GF4634@momjian.us> (raw)
In-Reply-To: <20180816163620.GE4634@momjian.us>
References: <AM6PR02MB3782E6A52BDA2A806B6A587AFE240@AM6PR02MB3782.eurprd02.prod.outlook.com>
	<20180810161245.GA7815@momjian.us>
	<15fa3462-a3da-2134-1c4e-8127f50ed304@2ndquadrant.com>
	<20180814212335.GD23476@momjian.us>
	<CAPdiE1xYCow-reLjrhJ9DqrMu-ppNq0ChUUEvVdxhdjGRD5_eA@mail.gmail.com>
	<20180816163620.GE4634@momjian.us>

On Thu, Aug 16, 2018 at 12:36:20PM -0400, Bruce Momjian wrote:
> I think we just need to add an error message to say the server must be
> shut down as a _primary_ server, not as a standby server, and we can
> recommend to read the documentation on the use of rsync.

Attached is a proposed patch.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

Attachments:

upgrade.diff (text/x-diff, 1.2K) download diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c new file mode 100644 index f2f3ac5..c76de2c *** a/src/bin/pg_upgrade/controldata.c --- b/src/bin/pg_upgrade/controldata.c *************** get_control_data(ClusterInfo *cluster, b *** 150,157 **** /* remove leading spaces */ while (*p == ' ') p++; ! if (strcmp(p, "shut down\n") != 0 && ! strcmp(p, "shut down in recovery\n") != 0) { if (cluster == &old_cluster) pg_fatal("The source cluster was not shut down cleanly.\n"); --- 150,163 ---- /* remove leading spaces */ while (*p == ' ') p++; ! if (strcmp(p, "shut down in recovery\n") == 0) ! { ! if (cluster == &old_cluster) ! pg_fatal("The source cluster was shut down while in recovery mode. To upgrade it, use \"rsync\" or shut it down as a primary.\n"); ! else ! pg_fatal("The target cluster was shut down while in recovery mode. To upgrade it, use \"rsync\" or shut it down as a primary.\n"); ! } ! else if (strcmp(p, "shut down\n") != 0) { if (cluster == &old_cluster) pg_fatal("The source cluster was not shut down cleanly.\n");

view thread (20+ messages)  latest in thread

Message-ID: <20180816175835.GF4634@momjian.us>
Permalink:  ../20180816175835.GF4634@momjian.us/
Also on:    postgresql.org/message-id/20180816175835.GF4634@momjian.us

 ·  · 

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-bugs@postgresql.org
  Cc: bruce@momjian.us, martin@2ndquadrant.com, remi.deglave@lyreco.com, michael.paquier@gmail.com
  Subject: Re: [PG_UPGRADE] 9.6 to 10.5
  In-Reply-To: <20180816175835.GF4634@momjian.us>
  References: <AM6PR02MB3782E6A52BDA2A806B6A587AFE240@AM6PR02MB3782.eurprd02.prod.outlook.com> <20180810161245.GA7815@momjian.us> <15fa3462-a3da-2134-1c4e-8127f50ed304@2ndquadrant.com> <20180814212335.GD23476@momjian.us> <CAPdiE1xYCow-reLjrhJ9DqrMu-ppNq0ChUUEvVdxhdjGRD5_eA@mail.gmail.com> <20180816163620.GE4634@momjian.us> <20180816175835.GF4634@momjian.us>

* 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