Re: [REASSIGN confusion]

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Michael Anderson <michael(dot)anderson(at)elegosoft(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: [REASSIGN confusion]
Date: 2015-12-16 09:47:55
Message-ID: CAECtzeU6UYkMiF2QgzyksWScLiUJbzGz0zVY7dKpXWUhWf3WwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

2015-12-15 14:05 GMT+01:00 Michael Anderson <michael(dot)anderson(at)elegosoft(dot)com>
:

> I'm confused about the usage (or purpose) of REASSIGN.
>

Reassign ownership to make it easy to drop a role.

> If I've understood the docs correctly, REASSIGN changes the ownership of
> all database owned by old_role to new_role, as well as all objects on the
> *currently* connected database.
>
>
Correct.

> It seems to me that the most common task for an administrator would be to
> either:
>
> change ownership of all objects on a single database owned by old_role
> without affecting any other databases
> or
> change ownership of all objects on all databases owned by old_role.
>
> As I understand it, I can't use REASSIGN to perform either of these tasks.
> Or am I missing something?
>
>
Nope, that's it. You need to execute REASSIGN on each database to change
ownership of all objects on all databases.

--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Shreeyansh Dba 2015-12-16 10:44:38 Re: semop hanging - Postgres 9.4.4
Previous Message Gustav Karlsson 2015-12-16 07:30:06 Re: Proper way to restore from a basebackup without the WAL-files?