Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9ygu-0005l6-Vx for pgsql-admin@arkaria.postgresql.org; Thu, 24 Nov 2016 18:24:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c9ygu-0001YA-2I for pgsql-admin@arkaria.postgresql.org; Thu, 24 Nov 2016 18:24:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c9yfD-0007vC-8e for pgsql-admin@postgresql.org; Thu, 24 Nov 2016 18:22:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c9yf9-0005Ze-V4 for pgsql-admin@postgresql.org; Thu, 24 Nov 2016 18:22:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uAOIMLs0022573; Thu, 24 Nov 2016 13:22:22 -0500 From: Tom Lane To: Marc Fromm cc: "pgsql-admin@postgresql.org" Subject: Re: restore a pg_dumpall only breaks In-reply-to: References: <13942.1479953090@sss.pgh.pa.us> Comments: In-reply-to Marc Fromm message dated "Thu, 24 Nov 2016 06:07:51 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22571.1480011741.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 24 Nov 2016 13:22:21 -0500 Message-ID: <22572.1480011741@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Marc Fromm writes: >> A dump from 9.2 is no sure thing to restore into an 8.1 database; there = may be SQL syntax in it that 8.1 doesn't understand. Have you checked for = errors during the restore? > After the last successful database restore from the pg_dumpall file this = is displayed on the ssh session. > psql:pg_dbs.bkp:1029100: \connect: invalid connection option "-reuse-prev= ious" Ah. That option was introduced quite recently as part of a security fix. It's no surprise 8.x doesn't recognize it. You could probably work around this by using pg_dumpall with -g to just dump roles and tablespaces, and then pg_dump'ing individual databases separately. A mite tedious and error-prone. Or maybe use "sed" to strip out the -reuse-previous options from pg_dumpall's output. But really this is the best answer, because 8.x is long out of support: > I figure the best thing to do is to upgrade postgres 8.4 (not 8.1 as prev= iously mentioned) to 9.2 on this centOS6.4 server, so it's version matches = the other server. I searched for some time on how to do this and every tuto= rial does it a little different and each has different steps that the other= s do not have. Is there a clear step by step procedure to do this upgrade? If you're working with locally-built copies of Postgres, I'd say just follow the recipe given in the pg_upgrade man page. If you are working with someone's packaged version of Postgres, the packager may have provided a script or something for upgrades, in which case follow their recommendation. Either way it's a good idea to make a backup beforehand in case of disaster. regards, tom lane --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin