Re: DB Import Error...

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-admin(at)postgresql(dot)org>,<gnanam(at)zoniac(dot)com>
Cc: <raghuchennuru(at)gmail(dot)com>
Subject: Re: DB Import Error...
Date: 2011-04-05 14:48:37
Message-ID: 4D9AE575020000250003C2F4@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Gnanakumar" <gnanam(at)zoniac(dot)com> wrote:

>> If you're upgrading to 9.0, I would start by following the
>> recommended upgrade procedure and seeing whether these problems
>> then exist in the new database. Fixing old issues like this is
>> one big reason for using the newer version of pg_dump.
>
> How do I use the newer version of pg_dump (9.0.3 in this case) to
> take SQL dump, when v8.2.3 is already installed in my server?

You can install two different versions of PostgreSQL in different
directories, or you can run pg_dump from the machine which is your
conversion target. We do both. We always build from source, and we
use a --prefix on configure which includes the version. For
example:

--prefix=/usr/local/pgsql-9.0.3

To simplify usage we also create a symbolic link from
/usr/local/pgsql to the version we want as the default on the
machine, and we set our PATH to include /usr/local/pgsql/bin. We
never use the symbolic link in our service scripts, though. Anyway,
if you build with a different prefix you can pick your version by
explicitly specifying the full path when you run a client program
like pg_dump.

> Any procedure/steps/advice/suggestion to take dump using latest
> version of pg_dump without disturbing old database cluster is
> appreciated.

When we're moving from an old version on one machine to a newer
version on another machine, we don't need to install the new version
of PostgreSQL on the old machine. On the new machine run:

pg_dump -h oldmachine -U username remotedbname | psql localdbname

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kasia Tuszynska 2011-04-05 23:34:11 ubuntu swap space
Previous Message Gnanakumar 2011-04-05 06:47:22 Re: DB Import Error...