Restoring a database as another user

From: "David Garamond" <davidgaramond(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Restoring a database as another user
Date: 2006-04-28 07:17:30
Message-ID: 7c33d060604280017v43b0e35au2662bd9a9b40350@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

My goal is to restore someone's (e.g. Jim's) database by the superuser to be
owned by a new user (e.g. Bob). Jim and Bob connects using password and I
(the superuser) do not know their passwords.

Is it possible to do pg_restore, connecting as the superuser, specifying
--no-owner, but making so that all objects now be owned by the new user (e.g.
Bob)? Or do I have to resort to other tricks (like doing ALTER OWNER later,
or modifying pg_hba.conf temporarily so the superuser can connect as Jim
without a password)?

Regards,
Dave

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Szabolcs BALLA 2006-04-28 09:07:29 Autovacuum probably not working?
Previous Message Robin Iddon 2006-04-28 06:47:52 Re: Orphan files