pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Mention pg_dump version portability
7+ messages / 4 participants
[nested] [flat]

* Mention pg_dump version portability
@ 2006-05-13 16:21 Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-15 20:23 ` Re: Mention pg_dump version portability Jim C. Nasby <jnasby@pervasive.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Bruce Momjian @ 2006-05-13 16:21 UTC (permalink / raw)
  To: pgsql-docs

I have applied this patch that mentions pg_dump portability to 8.1.X and
CVS HEAD.

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Attachments:

/rtmp/diff (text/x-diff, 1008B) download Index: pg_dump.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v retrieving revision 1.84 diff -c -r1.84 pg_dump.sgml *** pg_dump.sgml 6 May 2006 23:25:37 -0000 1.84 --- pg_dump.sgml 13 May 2006 16:19:04 -0000 *************** *** 645,650 **** --- 645,661 ---- ensure good performance. </para> + <para> + Because <application>pg_dump</application> is used to tranfer data + to newer versions of <productname>PostgreSQL</>, the output of + <application>pg_dump</application> can be loaded into + newer versions of <productname>PostgreSQL</>. It also can read older + <productname>PostgreSQL</> databases. However, it usually cannot + read newer <productname>PostgreSQL</> databases or produce dump output + that can be loaded into older database versions. To do this, manual + editing of the dump file might be required. + </para> + </refsect1> <refsect1 id="pg-dump-examples">
^ permalink raw reply [nested|flat] 7+ messages in thread

* Re: Mention pg_dump version portability
  2006-05-13 16:21 Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
@ 2006-05-15 20:23 ` Jim C. Nasby <jnasby@pervasive.com>
  2006-05-15 23:43   ` Re: Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Jim C. Nasby @ 2006-05-15 20:23 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-docs

On Sat, May 13, 2006 at 12:21:06PM -0400, Bruce Momjian wrote:
> I have applied this patch that mentions pg_dump portability to 8.1.X and
> CVS HEAD.

Would it be worth recommending using the custom format over plain? I see
plenty of issues with incompatabilities in the plain version, but I
don't think I've ever seen problem with the custom format (though this
could just be because everyone uses the default...)
-- 
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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Mention pg_dump version portability
  2006-05-13 16:21 Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-15 20:23 ` Re: Mention pg_dump version portability Jim C. Nasby <jnasby@pervasive.com>
@ 2006-05-15 23:43   ` Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-16 18:46     ` Re: Mention pg_dump version portability Jim C. Nasby <jnasby@pervasive.com>
  2006-05-17 15:41     ` Re: Mention pg_dump version portability Jim C. Nasby <decibel@decibel.org>
  0 siblings, 2 replies; 7+ messages in thread

From: Bruce Momjian @ 2006-05-15 23:43 UTC (permalink / raw)
  To: Jim C. Nasby <jnasby@pervasive.com>; +Cc: pgsql-docs

Jim C. Nasby wrote:
> On Sat, May 13, 2006 at 12:21:06PM -0400, Bruce Momjian wrote:
> > I have applied this patch that mentions pg_dump portability to 8.1.X and
> > CVS HEAD.
> 
> Would it be worth recommending using the custom format over plain? I see
> plenty of issues with incompatabilities in the plain version, but I
> don't think I've ever seen problem with the custom format (though this
> could just be because everyone uses the default...)

Right, it is just because it is the default.

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Mention pg_dump version portability
  2006-05-13 16:21 Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-15 20:23 ` Re: Mention pg_dump version portability Jim C. Nasby <jnasby@pervasive.com>
  2006-05-15 23:43   ` Re: Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
@ 2006-05-16 18:46     ` Jim C. Nasby <jnasby@pervasive.com>
  2006-05-16 23:18       ` Re: Mention pg_dump version portability Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 7+ messages in thread

From: Jim C. Nasby @ 2006-05-16 18:46 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-docs

On Mon, May 15, 2006 at 07:43:20PM -0400, Bruce Momjian wrote:
> Jim C. Nasby wrote:
> > On Sat, May 13, 2006 at 12:21:06PM -0400, Bruce Momjian wrote:
> > > I have applied this patch that mentions pg_dump portability to 8.1.X and
> > > CVS HEAD.
> > 
> > Would it be worth recommending using the custom format over plain? I see
> > plenty of issues with incompatabilities in the plain version, but I
> > don't think I've ever seen problem with the custom format (though this
> > could just be because everyone uses the default...)
> 
> Right, it is just because it is the default.

But shouldn't the custom format deal better with version changes, or
does the format of custom change just as often? Though, even if it did
change just as often, pg_restore should be able to deal better with it
than psql, since pg_restore knows it's a dump and knows what version
it's coming from...
-- 
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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Mention pg_dump version portability
  2006-05-13 16:21 Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-15 20:23 ` Re: Mention pg_dump version portability Jim C. Nasby <jnasby@pervasive.com>
  2006-05-15 23:43   ` Re: Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-16 18:46     ` Re: Mention pg_dump version portability Jim C. Nasby <jnasby@pervasive.com>
@ 2006-05-16 23:18       ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2006-05-16 23:18 UTC (permalink / raw)
  To: Jim C. Nasby <jnasby@pervasive.com>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; pgsql-docs

"Jim C. Nasby" <jnasby@pervasive.com> writes:
> But shouldn't the custom format deal better with version changes, or
> does the format of custom change just as often?

It's completely orthogonal, because the SQL involved is just the same.
One of the tests I periodically run is to compare
	pg_dump >foo
	pg_dump -Fc | pg_restore >bar
and make sure the outputs are word-for-word the same.

What custom or tar format buys you is the flexibility of extracting
different subsets of the dump after-the-fact, using pg_restore's
switches.  Of course you can do that with a text editor on a plain
dump, if the dump's not too large for your editor to handle ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Mention pg_dump version portability
  2006-05-13 16:21 Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-15 20:23 ` Re: Mention pg_dump version portability Jim C. Nasby <jnasby@pervasive.com>
  2006-05-15 23:43   ` Re: Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
@ 2006-05-17 15:41     ` Jim C. Nasby <decibel@decibel.org>
  2006-05-17 16:13       ` Re: Mention pg_dump version portability Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 7+ messages in thread

From: Jim C. Nasby @ 2006-05-17 15:41 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Jim C. Nasby <jnasby@pervasive.com>; pgsql-docs

Grr, deleted Tom's email before I replied...

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?

Or is the custom format the same as the text/SQL dump, just with some
fancy wrappers around it?
-- 
Jim C. Nasby, Database Architect                decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Mention pg_dump version portability
  2006-05-13 16:21 Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-15 20:23 ` Re: Mention pg_dump version portability Jim C. Nasby <jnasby@pervasive.com>
  2006-05-15 23:43   ` Re: Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
  2006-05-17 15:41     ` Re: Mention pg_dump version portability Jim C. Nasby <decibel@decibel.org>
@ 2006-05-17 16:13       ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2006-05-17 16:13 UTC (permalink / raw)
  To: Jim C. Nasby <decibel@decibel.org>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; Jim C. Nasby <jnasby@pervasive.com>; pgsql-docs

"Jim C. Nasby" <decibel@decibel.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.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2006-05-17 16:13 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-13 16:21 Mention pg_dump version portability Bruce Momjian <pgman@candle.pha.pa.us>
2006-05-15 20:23 ` Jim C. Nasby <jnasby@pervasive.com>
2006-05-15 23:43   ` Bruce Momjian <pgman@candle.pha.pa.us>
2006-05-16 18:46     ` Jim C. Nasby <jnasby@pervasive.com>
2006-05-16 23:18       ` Tom Lane <tgl@sss.pgh.pa.us>
2006-05-17 15:41     ` Jim C. Nasby <decibel@decibel.org>
2006-05-17 16:13       ` Tom Lane <tgl@sss.pgh.pa.us>

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