Re: Changing owner of pg_toast tables

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Changing owner of pg_toast tables
Дата
Msg-id 20090129191121.GB15455@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Changing owner of pg_toast tables  (Mark Styles <postgres@lambic.co.uk>)
Список pgsql-general
Mark Styles wrote:
> On Thu, Jan 29, 2009 at 12:29:07PM -0500, Tom Lane wrote:
> > Mark Styles <postgres@lambic.co.uk> writes:
> > > On Thu, Jan 29, 2009 at 10:46:08AM -0500, Tom Lane wrote:
> > >> I guess the interesting question to me is what happened to the tables
> > >> those toast tables are/were attached to? They should have the same
> > >> owners as their parent tables.
> >
> > > They did have the same owner, I changed the owner to postgres so I could
> > > drop the role, but the corresponding pg_toast tables did not change.
> >
> > Well, that's just weird.  Can you reproduce such a behavior?  In my
> > tests 8.1 definitely does change the toast table's owner along with the
> > parent.  One can imagine that step failing, but if so the whole
> > ALTER OWNER transaction should roll back.
>
> Actually, pgadmin3 may have given me an error on that operation (which I
> ignored, it did what I wanted, I thought), I believe it was something
> like 'OID not found'.

I agree with Tom -- this is pretty weird.  If it failed, it should have
failed all the way and rollback the other changes.

On other news, I noticed the other day while playing with reloptions
that if you run an ALTER TABLE command that rewrites the table, the
toast table seems to be misnamed, i.e. the same bug we fixed on CLUSTER
not long ago.  I very much doubt this explains your problem, but still ...

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

В списке pgsql-general по дате отправления:

Предыдущее
От: Mark Styles
Дата:
Сообщение: Re: Changing owner of pg_toast tables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Changing owner of pg_toast tables