From: John Scalia <jayknowsunix@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Trying to change the owner of some tables
Date: Wed, 24 Jun 2015 20:42:11 -0700
Message-ID: <558B7893.5000407@gmail.com> (raw)
In-Reply-To: <CAKFQuwZk02dnR86vB73opbSb2H0Uu3_9HX5VAk9zvOHwk1CeyQ@mail.gmail.com>
References: <558B6B19.1050305@gmail.com>
<CAKFQuwZk02dnR86vB73opbSb2H0Uu3_9HX5VAk9zvOHwk1CeyQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Thanks guys, I was not aware of that command, but it did NOT succeed in changing these strangely missing tables. The tables appear, when I try to drop the old owner as:
second_schema.partition_table_name_one;
then two, three, etc., I've only been successful using
alter table second_schema.partition_table_name_one owner to userB;
But I'd rather not do that for 2000+ entries.
On 6/24/2015 8:01 PM, David G. Johnston wrote:
> On Wed, Jun 24, 2015 at 10:44 PM, John Scalia <jayknowsunix@gmail.com <mailto:jayknowsunix@gmail.com>>wrote:
>
> Hi all,
>
> I'm trying to build a new server from a copy of one of our live Dbs, and I imported the schema from there and am now trying to get this new server setup with the right ownership
> and permissions. All the tables are/were owned by user A, and I've changed most of them to user B (names changed to protect the innocent, etc.,) However, some tables from the
> pg_dump I used to grab the schema, do not show up using \d nor can I see them in pg_class. I only found them when I tried to drop user A and psql complained. They appear to
> be in a
> different schema and I could change them one at a time, but there are more than 2200 of these. For the tables I've already changed, I just performed an update on pg_class where
> relowner = numeric ID of user A to set that to the numeric ID of user B.
>
> Now, this is a 9.2 server on CentOS, but I've not seen this behavior anywhere before. Where else should I see these? The only success I've had is \d+ new_schema.* and that
> doesn't
> help me change them.
>
>
> Possibly this...
>
> http://www.postgresql.org/docs/9.4/static/sql-reassign-owned.html
>
> David J.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jayknowsunix@gmail.com, david.g.johnston@gmail.com
Subject: Re: Trying to change the owner of some tables
In-Reply-To: <558B7893.5000407@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox