pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: todd.vernick@gmail.com
Subject: BUG #15806: pg_upgrade failure column pg_stat_replication.sent_location does not exist
Date: Wed, 15 May 2019 18:03:47 +0000
Message-ID: <15806-b937e780ac00160c@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15806
Logged by:          Todd Vernick
Email address:      todd.vernick@gmail.com
PostgreSQL version: 9.6.4
Operating system:   CentOS Linux release 7.4.1708
Description:        

Upgrading from 9.6.4 to 11.3 or 10.3 fails. This was reproduced on another
user on the slack general channel. The check does not catch it.

-bash-4.1$ /usr/pgsql-10/bin/pg_upgrade -d /var/lib/pgsql/9.6/data/ -D
/tmp/data -b /usr/pgsql-9.6/bin/ -B /usr/pgsql-10/bin/ --check
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for invalid "unknown" user columns                 ok
Checking for hash indexes                                   ok
Checking for presence of required libraries                 ok
Checking database user is the install user                  ok
Checking for prepared transactions                          ok
*Clusters are compatible*

-bash-4.1$ /usr/pgsql-10/bin/pg_upgrade -d /var/lib/pgsql/9.6/data/ -D
/tmp/data -b /usr/pgsql-9.6/bin/ -B /usr/pgsql-10/bin/
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for invalid "unknown" user columns                 ok
Creating dump of global objects                             ok
Creating dump of database schemas
                                                            ok
Checking for presence of required libraries                 ok
Checking database user is the install user                  ok
Checking for prepared transactions                          ok
If pg_upgrade fails after this point, you must re-initdb the
new cluster before continuing.
Performing Upgrade
------------------
Analyzing all rows in the new cluster                       ok
Freezing all rows in the new cluster                        ok
Deleting files from new pg_xact                             ok
Copying old pg_clog to new server                           ok
Setting next transaction ID and epoch for new cluster       ok
Deleting files from new pg_multixact/offsets                ok
Copying old pg_multixact/offsets to new server              ok
Deleting files from new pg_multixact/members                ok
Copying old pg_multixact/members to new server              ok
Setting next multixact ID and offset for new cluster        ok
Resetting WAL archives                                      ok
Setting frozenxid and minmxid counters in new cluster       ok
Restoring global objects in the new cluster                 ok
Restoring database schemas in the new cluster
  postgres                                                  
*failure*
Consult the last few lines of "pg_upgrade_dump_13269.log" for
the probable cause of the failure.
Failure, exiting
-bash-4.1$ cat pg_upgrade_dump_13269.log
command: "/usr/pgsql-10/bin/pg_dump" --host /var/lib/pgsql --port 50432
--username postgres --schema-only --quote-all-identifiers --binary-upgrade
--format=custom  --file="pg_upgrade_dump_13269.custom" 'dbname=postgres' >>
"pg_upgrade_dump_13269.log" 2>&1
command: "/usr/pgsql-10/bin/pg_restore" --host /var/lib/pgsql --port 50432
--username postgres --exit-on-error --verbose --dbname 'dbname=postgres'
"pg_upgrade_dump_13269.custom" >> "pg_upgrade_dump_13269.log" 2>&1
pg_restore: connecting to database for restore
pg_restore: creating pg_largeobject "pg_largeobject"
pg_restore: creating pg_largeobject_metadata "pg_largeobject_metadata"
pg_restore: creating COMMENT "DATABASE "postgres""
pg_restore: creating SCHEMA "public"
pg_restore: creating COMMENT "SCHEMA "public""
pg_restore: creating VIEW "public.myview"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 185; 1259 16384 VIEW myview
postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  column
pg_stat_replication.sent_location does not exist
LINE 14:  SELECT "pg_stat_replication"."sent_location"
                 ^
    Command was: 
-- For binary upgrade, must preserve pg_type oid
SELECT
pg_catalog.binary_upgrade_set_next_pg_type_oid('16386'::pg_catalog.oid);
-- For binary upgrade, must preserve pg_type array oid
SELECT
pg_catalog.binary_upgrade_set_next_array_pg_type_oid('16385'::pg_catalog.oid);
-- For binary upgrade, must preserve pg_class oids
SELECT
pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('16384'::pg_catalog.oid);
CREATE VIEW "public"."myview" AS
 SELECT "pg_stat_replication"."sent_location"
   FROM "pg_stat_replication";



Message-ID: <15806-b937e780ac00160c@postgresql.org>
Permalink:  ../15806-b937e780ac00160c@postgresql.org/
Also on:    postgresql.org/message-id/15806-b937e780ac00160c@postgresql.org

 · 

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: noreply@postgresql.org, todd.vernick@gmail.com
  Subject: Re: BUG #15806: pg_upgrade failure column pg_stat_replication.sent_location does not exist
  In-Reply-To: <15806-b937e780ac00160c@postgresql.org>
  References: <15806-b937e780ac00160c@postgresql.org>

* 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