From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc Fromm <Marc.Fromm@wwu.edu>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: restore a pg_dumpall only breaks
Date: Thu, 24 Nov 2016 13:22:21 -0500
Message-ID: <22572.1480011741@sss.pgh.pa.us> (raw)
In-Reply-To: <CY1PR0201MB1436CFF069435D629954DF1C9DB60@CY1PR0201MB1436.namprd02.prod.outlook.com>
References: <CY1PR0201MB14360D78FE30F98FFAB1E00B9DB60@CY1PR0201MB1436.namprd02.prod.outlook.com>
<13942.1479953090@sss.pgh.pa.us>
<CY1PR0201MB1436CFF069435D629954DF1C9DB60@CY1PR0201MB1436.namprd02.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Marc Fromm <Marc.Fromm@wwu.edu> 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-previous"
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 previously 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 tutorial does it a little different and each has different steps that the others 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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, Marc.Fromm@wwu.edu
Subject: Re: restore a pg_dumpall only breaks
In-Reply-To: <22572.1480011741@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