X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 32ACC9FA2C8 for ; Wed, 17 May 2006 17:59:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 10682-02 for ; Wed, 17 May 2006 17:58:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 97E9A9F944D for ; Wed, 17 May 2006 17:58:48 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 774BE56431; Wed, 17 May 2006 15:58:46 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 17 May 2006 15:58:45 -0500 Date: Wed, 17 May 2006 15:58:45 -0500 From: "Jim C. Nasby" To: Tom Lane Cc: "Jim C. Nasby" , Bruce Momjian , pgsql-hackers@postgresql.org Subject: Cross-version dumps (was: [DOCS] Mention pg_dump version portability) Message-ID: <20060517205845.GI26212@pervasive.com> References: <20060515202354.GM26212@pervasive.com> <200605152343.k4FNhK703441@candle.pha.pa.us> <20060517154120.GQ26212@decibel.org> <20775.1147882429@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20775.1147882429@sss.pgh.pa.us> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060517:tgl@sss.pgh.pa.us::e0Hp1lcp1xMZbjkV:00000000000000000000 0000000000000000000000002Vbx X-Hashcash: 1:20:060517:decibel@decibel.org::I+iVkkeckqya9S0Q:000000000000000000 0000000000000000000000000y60 X-Hashcash: 1:20:060517:pgman@candle.pha.pa.us::ANiP/Q80GBiJv1bC:000000000000000 0000000000000000000000002iTc X-Hashcash: 1:20:060517:pgsql-hackers@postgresql.org::wghjvDH/Af0CvLij:000000000 0000000000000000000000002zxp X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/599 X-Sequence-Number: 83464 Moving to -hackers. On Wed, May 17, 2006 at 12:13:49PM -0400, Tom Lane wrote: > "Jim C. Nasby" 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@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461