Tom Lane <t...@sss.pgh.pa.us> wrote:
> On reflection, I'm not sure that pg_restore as such should be applying any
> server version check at all. pg_restore itself has precious little to do
> with whether there will be a compatibility problem; that's mostly down to
> the DDL that pg_dump put into the archive file. And we don't have enough
> information to be very sure about whether it will work, short of actually
> trying it. So why should the code arbitrarily refuse to try?
>
> So I'm inclined to propose that we set min/max to 0 and 999999 here.
Something like the attached back-patched to 8.4?
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
*** a/src/bin/pg_dump/pg_backup_archiver.c
--- b/src/bin/pg_dump/pg_backup_archiver.c
***************
*** 297,304 **** RestoreArchive(Archive *AHX)
if (AH->version < K_VERS_1_3)
exit_horribly(modulename, "direct database connections are not supported in pre-1.3 archives\n");
! /* XXX Should get this from the archive */
! AHX->minRemoteVersion = 070100;
AHX->maxRemoteVersion = 999999;
ConnectDatabase(AHX, ropt->dbname,
--- 297,308 ----
if (AH->version < K_VERS_1_3)
exit_horribly(modulename, "direct database connections are not supported in pre-1.3 archives\n");
! /*
! * We don't want to guess at whether the dump will successfully
! * restore; allow the attempt regardless of the version of the restore
! * target.
! */
! AHX->minRemoteVersion = 0;
AHX->maxRemoteVersion = 999999;
ConnectDatabase(AHX, ropt->dbname,
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers