Re: Tape backup, 2 versions, same database name, which is pg_dump backing up

From: "Thomas F(dot) O'Connell" <tfo(at)sitening(dot)com>
To: MargaretGillon(at)chromalloy(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Tape backup, 2 versions, same database name, which is pg_dump backing up
Date: 2006-08-02 21:20:15
Message-ID: 5286306E-9C92-4F69-BC51-9559E611FC6E@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Your confirmation is correct with one slight technical exception:
specifying the port doesn't technically cause the system to know
which version of postgres to use.

In my previous post, I forgot to mention a related note: the version
of pg_dump that you're using matters slightly. pg_dump can typically
be used with older postgres installations, but not newer ones. So you
should prefer using the 8.1.4 version of pg_dump to dump at least
your 8.1.4 postmaster, but probably also your 7.3.4 postmaster.

A 7.3.4 pg_dump client will probably not be able to run against an
8.1.4 postmaster.

Otherwise, pg_dump doesn't really care about the version as much as
it cares about being able to connect to a postmaster. That's what
specifying the port helps it do. When you don't specify the port, it
just tries port 5432. If it finds a postmaster listening there,
great, it will try to dump it; otherwise, it will fail with a
complaint that it couldn't connect to anything on 5432.

--
Thomas F. O'Connell
Sitening, LLC

http://www.sitening.com/
3004B Poston Avenue
Nashville, TN 37203-1314
615-469-5150 x802
615-469-5151 (fax)

On Aug 2, 2006, at 4:10 PM, MargaretGillon(at)chromalloy(dot)com wrote:

> "Thomas F. O'Connell" <tfo(at)sitening(dot)com> wrote on 08/02/2006
> 02:04:35 PM:
>
> > You'll need to specify the non-default port explicitly in your
> > pg_dump command in order to back up the postmaster running on 55432.
> >
> > E.g., pg_dump -p 55432 -U postgres -C -D -f /tmp/$(date+%F)
> owl.sql owl
> >
> > By default, the postgres command-line utilities attempt to connect
> > to 5432 (or $PGPORT or whatever is configured as the default port).
> >
> > In the meantime, you're still backing up the 7.3.4 postmaster with
> > that script.
> >
> > --
> > Thomas F. O'Connell
> > Sitening, LLC
>
> To confirm: what you're saying it that by specifying the port in my
> command the system knows which database to backup and which version
> of Postgresql to use.
>
> Thank you for the assistance.
>
> Margaret Gillon

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message MargaretGillon 2006-08-02 21:27:22 Re: Tape backup, 2 versions, same database name, which is pg_dump
Previous Message Nikolay Samokhvalov 2006-08-02 21:17:13 Re: Join Question