pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: pg_upgrade: Preserve relfilenodes and tablespace OIDs.
Date: Sun, 13 Feb 2022 12:51:10 +0100
Message-ID: <YgjwrkEvNEqoz4Vm@msg.df7cb.de> (raw)
In-Reply-To: <E1n9XJu-0004j2-8W@gemulon.postgresql.org>
References: <E1n9XJu-0004j2-8W@gemulon.postgresql.org>

Re: Robert Haas
> pg_upgrade: Preserve relfilenodes and tablespace OIDs.

> src/bin/pg_dump/pg_dumpall.c                       |   3 +

inline patch 1: src/bin/pg_dump/pg_dumpall.c (+2/-0 lines) download inline-1.patch--- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -1066,6 +1066,9 @@ dumpTablespaces(PGconn *conn) /* needed for buildACLCommands() */ fspcname = pg_strdup(fmtId(spcname)); + appendPQExpBufferStr(buf, "\n-- For binary upgrade, must preserve pg_table + appendPQExpBuffer(buf, "SELECT pg_catalog.binary_upgrade_set_next_pg_table
This needs to be guarded with "if (binary_upgrade)". Error message during a Debian pg_upgradecluster (-m dump) from 14 to 15: 2022-02-13 12:44:01.272 CET [168032] postgres@template1 LOG: statement: SELECT pg_catalog.binary_upgrade_set_next_pg_tablespace_oid('16408'::pg_catalog.oid); 2022-02-13 12:44:01.272 CET [168032] postgres@template1 ERROR: function can only be called when server is in binary upgrade mode 2022-02-13 12:44:01.272 CET [168032] postgres@template1 STATEMENT: SELECT pg_catalog.binary_upgrade_set_next_pg_tablespace_oid('16408'::pg_catalog.oid); Christoph

view thread (4+ messages)  latest in thread

Message-ID: <YgjwrkEvNEqoz4Vm@msg.df7cb.de>
Permalink:  ../YgjwrkEvNEqoz4Vm@msg.df7cb.de/
Also on:    postgresql.org/message-id/YgjwrkEvNEqoz4Vm@msg.df7cb.de

 ·  · 

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-committers@postgresql.org
  Cc: myon@debian.org, rhaas@postgresql.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: pg_upgrade: Preserve relfilenodes and tablespace OIDs.
  In-Reply-To: <YgjwrkEvNEqoz4Vm@msg.df7cb.de>
  References: <E1n9XJu-0004j2-8W@gemulon.postgresql.org> <YgjwrkEvNEqoz4Vm@msg.df7cb.de>

* 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