Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i4mpI-0004NE-0s for pgsql-general@arkaria.postgresql.org; Mon, 02 Sep 2019 13:57:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i4mpG-0004x8-UG for pgsql-general@arkaria.postgresql.org; Mon, 02 Sep 2019 13:56:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i4mpF-0004hP-81 for pgsql-general@lists.postgresql.org; Mon, 02 Sep 2019 13:56:58 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i4mpB-0002P6-W5 for pgsql-general@lists.postgresql.org; Mon, 02 Sep 2019 13:56:55 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 0D0802F9; Mon, 2 Sep 2019 09:56:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 02 Sep 2019 09:56:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=g 02ejaDtRmeiRe82oCi2vrAvtk9RdHKbm1snif834Vs=; b=LEPFgxMnH3YC5YLaA nP9n97E5AvTpHYrvTO+KRnU5Xvi2Xg13REoX5MLCeUcrju2rUo1JZQpVOIT28Uey /XQgzAJkKCVwzYcNV5nUPlTxKfAiAfVGaV3bMDEoJbjnWVTuD9KnmiNdCNodoOTW KU7FaR9fjAeeLV0RkLqfbTfLbMdwneEYAaiXJCWZJt8zDB+b94qBZrDmLpk/zzzL FrWkuUlCe17bjtgbko4nNriyq2sR4Qh4XADn+GECnZjdnitFAwEq7idf8XnmffSP pYDQHpfaLewWemn3QvehdUCR22xzHhxougDDyJBZjIAtJFdR5NRb7l6Qf6R/Q145 V6XGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=g02ejaDtRmeiRe82oCi2vrAvtk9RdHKbm1snif834 Vs=; b=TFJgf57+8aJQy5+0ScpC1SqmpqPbKLMtQxzITQQq9pMwcY8DHMIvZWa6l dX0l4nizoQeew15SXbpaBb9iPVGa3MKgLH7wplSEOEHAkB9/keiSv7HpsvcBlR1L Cx6DWDaDxnj8zHL5x/GEdRsccuoBtWSJi+4pMW3d3dX7/U7Sxi9TYPSkPZ13Tn/k znJwvqW50dUHVaOLqNKgu8TuEn2QMVtUnP7YpQ6RMwWH1UdCfk7GyxmpsJsu2l6U SrVInYCo3Uh/ln5z6+KGx1j3128l25PuFblpWAreuO2dOQqYh+bgwoaiTKUklioS Nt9JaMgj9B8BLdILpf4ajiuTcl0eQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudejtddgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 879D98005C; Mon, 2 Sep 2019 09:56:50 -0400 (EDT) Subject: Re: Upgrade 96 -> 11 To: James Sewell , "pgsql-generallists.postgresql.org" References: From: Adrian Klaver Message-ID: <5fcbcde1-8807-17ee-029f-c99f924e024e@aklaver.com> Date: Mon, 2 Sep 2019 06:56:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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