Re: Moving a database AND changing the superuser

From: Rich Cullingford <rculling(at)sysd(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Moving a database AND changing the superuser
Date: 2003-12-15 17:17:09
Message-ID: 3FDDEC95.9080506@sysd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tom Lane wrote:
> Rich Cullingford <rculling(at)sysd(dot)com> writes:
>
>>Hmmm, how do you use 7.4 utilities against a 7.3 DB?
>
>
> pg_dump can dump from prior-release DBs (back to 7.0 at the moment).
> Just point it at the older DB's port.
>
> This is a bit tricky when installing from RPMs, since there's no really
> easy way to install just pg_dump and libpq without overwriting your old
> server executable, which you don't want to do just yet.
>
>
>>I'm assuming that you don't mean:
>>--superuser=username
>>which seems to be for disabling triggers, but perhaps the following as a
>>parameter to pg_dumpall:
>>--use-set-session-authorization
>
>
> Yeah, the latter is really the important part I think. In 7.4 that is
> the default (and only) behavior, but you can get it in 7.3 by using the
> switch. So the 7.3 pg_dump should be good enough for this purpose.

Well, I was gonna use pg_dumpall to avoid the tedium of individual
dumps, but (gotcha!) pg_dumpall doesn't accept
--use-set-session-authorization (tho' it does run pg_dump!). If I use
pg_dumpall, will pg_restore (with --use-set-session-authorization) be
smart enough to ignore the \connect calls in the dump?

I would try all this stuff myself, but unfortunately my PG 7.4 machine
isn't available yet, so I'm grasping at straws...
Thanks,
Rich Cullingford

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jeremy Buchmann 2003-12-15 17:29:03 Re: FoxPro Vs. PostgreSQL
Previous Message Grzegorz Dostatni 2003-12-15 17:16:04 Postgresql on Windows.