Cross-version dumps (was: [DOCS] Mention pg_dump version portability)

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Cross-version dumps (was: [DOCS] Mention pg_dump version portability)
Date: 2006-05-17 20:58:45
Message-ID: 20060517205845.GI26212@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Moving to -hackers.

On Wed, May 17, 2006 at 12:13:49PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <decibel(at)decibel(dot)org> writes:
> > pg_dump -Fc | pg_restore will only match the output of pg_dump if
> > everything's the same version though, right? Or wrong? What happens if
> > pg_dump -Fc is and older version and pg_restore is the current version?
>
> There would probably be some small differences, but 99% of pg_restore's
> output is just regurgitating SQL it finds in the dump file.

Maybe it's time to look at improving pg_restore's ability to deal with
cross-version issues, and make it the default for pg_dump. ISTM there's
been a fair amount of contortions as of late around pg_dump SQL
compatability. If the custom format at least included pg_dump version
information, and pg_restore new what version of PostgreSQL it was
restoring into, it could handle these cases more elegantly than is
possible with just dumping straight into psql. Or it might make more
sense for the custom format to be something that's less sensitive to
some of these compatability issues.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Joachim Wieland 2006-05-18 00:01:41 small doc patch for regexp_replace
Previous Message Tom Lane 2006-05-17 16:13:49 Re: Mention pg_dump version portability

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-05-17 21:03:54 Re: PL/pgSQL 'i = i + 1' Syntax
Previous Message Andrew Dunstan 2006-05-17 20:31:05 Re: PL/pgSQL 'i = i + 1' Syntax