From: Adrian Klaver <adrian.klaver@aklaver.com>
To: James Sewell <james.sewell@jirotech.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Upgrade 96 -> 11
Date: Mon, 2 Sep 2019 06:56:49 -0700
Message-ID: <5fcbcde1-8807-17ee-029f-c99f924e024e@aklaver.com> (raw)
In-Reply-To: <CAANVwEtAAN=1gY+QUVidpcO_mr87kne8=ovQciKRjxxwV7EEjg@mail.gmail.com>
References: <CAANVwEtAAN=1gY+QUVidpcO_mr87kne8=ovQciKRjxxwV7EEjg@mail.gmail.com>
On 9/1/19 9:03 PM, James Sewell wrote:
> Hi,
>
> I'm in the process of upgrading from 96 -> 11 (on RHEL 7.3) . Both the
> versions have PostGIS 2.5.1 installed and working.
>
> pg_upgrade fails with:
>
> pg_restore: [archiver (db)] Error from TOC entry 440; 1259 537086 TABLE
> tablename databasename
> pg_restore: [archiver (db)] could not execute query: ERROR: relation
> "public.spatial_ref_sys" does not exist
> LINE 39: "location_pt" "public"."geography"(Point,4283),
>
You used the 11 version of pg_upgrade, correct?
> On looking further at the sequence of events I can see that:
>
> 1. The PostGIS extension is created (but somehow the related tables
> such as spatial_ref_sys do not get created)
> 2. The tablename table gets created causing the above error
> 3. At some point later in the upgrade spatial_ref_sys is to be created
Questions:
1) How was PostGIS installed on the 9.6.? and 11.? versions?
Where extensions used or was the manual method used?
2) Did you end up with a working install in 11.?
>
>
> Is there any way round this type of issue (I guess forcing
> spatial_ref_sys to be created either with the extension as normal or
> just before any tables which rely on it).
>
> Cheers,
> James Sewell,
>
>
> ------------------------------------------------------------------------
> The contents of this email are confidential and may be subject to legal
> or professional privilege and copyright. No representation is made that
> this email is free of viruses or other defects. If you have received
> this communication in error, you may not copy or distribute any part of
> it or otherwise disclose its contents to anyone. Please advise the
> sender of your incorrect receipt of this correspondence.
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, james.sewell@jirotech.com
Subject: Re: Upgrade 96 -> 11
In-Reply-To: <5fcbcde1-8807-17ee-029f-c99f924e024e@aklaver.com>
References: <CAANVwEtAAN=1gY+QUVidpcO_mr87kne8=ovQciKRjxxwV7EEjg@mail.gmail.com> <5fcbcde1-8807-17ee-029f-c99f924e024e@aklaver.com>
* 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