From: Tom Lane <tgl@sss.pgh.pa.us>
To: Roger Sunny <947035276@qq.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_upgrade fails to restore function
Date: Sat, 03 Mar 2018 10:30:12 -0500
Message-ID: <30744.1520091012@sss.pgh.pa.us> (raw)
In-Reply-To: <tencent_53B2FD8658615DD49A364A89C190656E0E06@qq.com>
References: <tencent_53B2FD8658615DD49A364A89C190656E0E06@qq.com>
"=?gb18030?B?Um9nZXIgU3Vubnk=?=" <947035276@qq.com> writes:
> During the pg_upgrade from PostgreSQL 9.4 to PostgreSQL 10.0, the error¡±[archiver (db)] Error while PROCESSING TOC:¡± happened, The upgrade failed. OS is RHEL 6.5 , The error is as below:
> <pg_upgrade log>pg_restore: connecting to database for restorepg_restore: creating pg_largeobject "pg_largeobject"pg_restore: creating pg_largeobject_metadata "pg_largeobject_metadata"pg_restore: creating SCHEMA "bo_user0300"pg_restore: creating SCHEMA "d0007359_bex2018"pg_restore: creating SCHEMA "d0007359_dan2014" ---- omit ---------- omit ---------- omit ------
> pg_restore: creating PROCEDURE "zchuo_ult18.kp_delkakeihyo(character)"
> pg_restore: creating FOREIGN DATA WRAPPER "dblink_fdw"
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 470023; 2328 777028 FOREIGN DATA WRAPPER dblink_fdw postgrespg_restore: [archiver (db)] could not execute query: ERROR: function dblink_fdw_validator(text[], oid) does not exist
> Command was: CREATE FOREIGN DATA WRAPPER "dblink_fdw" VALIDATOR "dblink_fdw_validator";
Is that really the first error, or did you "omit" some? What it
looks like is that dblink_fdw_validator had previously failed to
be created, probably because you don't have dblink.so installed
in the destination database. Or maybe it's not the right version
of dblink.so.
regards, tom lane
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: tgl@sss.pgh.pa.us, 947035276@qq.com
Subject: Re: pg_upgrade fails to restore function
In-Reply-To: <30744.1520091012@sss.pgh.pa.us>
References: <tencent_53B2FD8658615DD49A364A89C190656E0E06@qq.com> <30744.1520091012@sss.pgh.pa.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