From: Tom Lane <tgl@sss.pgh.pa.us>
To: Duarte Carreira <DCarreira@edia.pt>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: duplicate OID issue when using pg_upgrade to move from 9.3 to 9.5
Date: Fri, 25 Jan 2019 13:18:56 -0500
Message-ID: <2613.1548440336@sss.pgh.pa.us> (raw)
In-Reply-To: <AM0PR07MB56670C9F7A79509CE3F2DFCFA09B0@AM0PR07MB5667.eurprd07.prod.outlook.com>
References: <AM0PR07MB56679E7CF391A87C9794B78AA09A0@AM0PR07MB5667.eurprd07.prod.outlook.com>
<2957.1548363745@sss.pgh.pa.us>
<AM0PR07MB566740A216E032AB86A5676EA09A0@AM0PR07MB5667.eurprd07.prod.outlook.com>
<AM0PR07MB5667C7FCEBE3B00801BDA831A09B0@AM0PR07MB5667.eurprd07.prod.outlook.com>
<25393.1548426461@sss.pgh.pa.us>
<AM0PR07MB566796BB81AA1B87A25A90BAA09B0@AM0PR07MB5667.eurprd07.prod.outlook.com>
<30594.1548432241@sss.pgh.pa.us>
<AM0PR07MB56670C9F7A79509CE3F2DFCFA09B0@AM0PR07MB5667.eurprd07.prod.outlook.com>
Duarte Carreira <DCarreira@edia.pt> writes:
> So I proceeded with the 2 queries:
> select pg_describe_object(refclassid,refobjid,refobjsubid), deptype from pg_depend where objid = 'sde.st_envelope'::regtype;
> "schema sde";"n"
> "function st_envelope_in(cstring)";"n"
> "function st_envelope_out(st_envelope)";"n"
OK, that looks about like what I'd expect.
> select pg_describe_object(classid,objid,objsubid), deptype from pg_depend where refobjid = 'sde.st_envelope'::regtype;
> "type st_envelope[]";"i"
> "function st_envelope_union(st_envelope,st_envelope)";"n"
> "function st_envelope_union(st_envelope,st_envelope)";"n"
> "function st_envelope_union(st_envelope,st_envelope)";"n"
> "function st_envelope_intersects(st_envelope,st_envelope)";"n"
> "function st_envelope_intersects(st_envelope,st_envelope)";"n"
> "function st_envelope_intersects(st_envelope,st_envelope)";"n"
> "function st_envelope_equal(st_envelope,st_envelope)";"n"
> "function st_envelope_equal(st_envelope,st_envelope)";"n"
> "function st_geo_gist_equal(st_envelope,st_envelope,internal)";"n"
> "function st_geo_gist_equal(st_envelope,st_envelope,internal)";"n"
Ah-hah --- st_envelope_in and st_envelope_out are not mentioned here?
That explains your problem. You'd need to add those two rows to pg_depend,
which could go something like
insert into pg_depend (classid, objid, objsubid,
refclassid, refobjid, refobjsubid, deptype)
values (
'pg_proc'::regclass,
'sde.st_envelope_in(cstring)'::regprocedure,
0,
'pg_type'::regclass,
'sde.st_envelope'::regtype,
0,
'n');
insert into pg_depend (classid, objid, objsubid,
refclassid, refobjid, refobjsubid, deptype)
values (
'pg_proc'::regclass,
'sde.st_envelope_out(sde.st_envelope)'::regprocedure,
0,
'pg_type'::regclass,
'sde.st_envelope'::regtype,
0,
'n');
I suppose the evidence about what happened to those rows is long gone,
so there's not much point in doing anything but patching things up to
the point where you can run pg_upgrade.
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, DCarreira@edia.pt
Subject: Re: duplicate OID issue when using pg_upgrade to move from 9.3 to 9.5
In-Reply-To: <2613.1548440336@sss.pgh.pa.us>
References: <AM0PR07MB56679E7CF391A87C9794B78AA09A0@AM0PR07MB5667.eurprd07.prod.outlook.com> <2957.1548363745@sss.pgh.pa.us> <AM0PR07MB566740A216E032AB86A5676EA09A0@AM0PR07MB5667.eurprd07.prod.outlook.com> <AM0PR07MB5667C7FCEBE3B00801BDA831A09B0@AM0PR07MB5667.eurprd07.prod.outlook.com> <25393.1548426461@sss.pgh.pa.us> <AM0PR07MB566796BB81AA1B87A25A90BAA09B0@AM0PR07MB5667.eurprd07.prod.outlook.com> <30594.1548432241@sss.pgh.pa.us> <AM0PR07MB56670C9F7A79509CE3F2DFCFA09B0@AM0PR07MB5667.eurprd07.prod.outlook.com> <2613.1548440336@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