Re: alter table owner doesn't update acl information

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Madeleine Theile <madeleine(dot)theile(at)cs(dot)uni-dortmund(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: alter table owner doesn't update acl information
Date: 2005-05-11 15:19:18
Message-ID: 200505111519.j4BFJIl01789@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Madeleine Theile wrote:
> Hi,
>
> first of all:
> I use Postgres-version: 7.3.9 and uname -a gives:
> Linux 2.4.21-286-smp4G
>
> Now here's the problem:
> I have several superusers in my database and some normal users that only
> have access to the data by views.
>
> After I've dropped one of the superusers that created and thus
> owns some of the views and reinstalled it again with a different usesysid
> the normal users cannot access their views (that are owned by the
> aforementioned superuser) any longer.
>
> ERROR: pg_class_aclcheck: invalid user id 113
>
> The workaround I tried without dropping the old views and creating new
> views is to alter the owner of the mentioned views. The error stays the same.
>
> I would have expected that the old usesysid that obviousl is the sole
> reference to the owner of the view was then updated to the new usesysid.
> Thus it is impossible to recover from the problem/mistake without
> dropping and creating the views again.
> Probably the problem will be the same with normal tables which I didn't
> check.
>
> Is this intention or a bug? What else could I try?

Recreate the user using the original user id:

test=> \h create user
Command: CREATE USER
Description: define a new database user account
Syntax:
CREATE USER name [ [ WITH ] option [ ... ] ]

where option can be:

SYSID uid
^^^^^
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Franco Bruno Borghesi 2005-05-11 15:23:43 Re: Disabling Triggers
Previous Message Peter Fein 2005-05-11 15:15:48 Re: JOIN on set of rows?