From: | Kevin Grittner <kgrittn(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Don't attempt to limit target database for pg_restore. |
Date: | 2013-12-29 21:24:28 |
Message-ID: | E1VxNqW-0008H0-1f@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Don't attempt to limit target database for pg_restore.
There was an apparent attempt to limit the target database for
pg_restore to version 7.1.0 or later. Due to a leading zero this
was interpreted as an octal number, which allowed targets with
version numbers down to 2.87.36. The lowest actual release above
that was 6.0.0, so that was effectively the limit.
Since the success of the restore attempt will depend primarily on
on what statements were generated by the dump run, we don't want
pg_restore trying to guess whether a given target should be allowed
based on version number. Allow a connection to any version. Since
it is very unlikely that anyone would be using a recent version of
pg_restore to restore to a pre-6.0 database, this has little to no
practical impact, but it makes the code less confusing to read.
Issue reported and initial patch suggestion from Joel Jacobson
based on an article by Andrey Karpov reporting on issues found by
PVS-Studio static code analyzer. Final patch based on analysis by
Tom Lane. Back-patch to all supported branches.
Branch
------
REL8_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/302cbc5fa6f5927a36bf22b5cfb356c1fe4284a6
Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-12-30 12:46:38 | Re: [COMMITTERS] pgsql: Upgrade to Autoconf 2.69 |
Previous Message | Kevin Grittner | 2013-12-29 21:24:27 | pgsql: Don't attempt to limit target database for pg_restore. |