Re: REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it
Date: 2011-04-20 22:18:40
Message-ID: 20375.1303337920@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl> writes:
> Op woensdag 20 april 2011, schreef Tom Lane:
>> Actually, now that I think about it, 8.4 didn't allow on-the-fly
>> reindexing of shared catalogs anyway. So that couldn't be your problem
>> even if the test had shown the indexes didn't match the catalog. But
>> it seems the rows actually disappeared from the catalog, and I have no
>> idea what would've caused that.

> should we even try to get them back by generating them somehow?

It's not really important --- the only difficulty with not having them
is the one you already hit, that REASSIGN OWNED misses things it should
do. If you're planning an update or dump-and-reload shortly, I wouldn't
worry about it. What's much more worrisome is the question of whether
the same kind of data loss happened anywhere else, and that isn't
something that the available info tells me anything about.

> also: would there be any reason you can think of why using alter function in
> the current version in order to correct this situation would have a negative
> side-effect?

If you do want to go around and do retail ALTER OWNER commands, you
certainly could. I thought for a moment that changeDependencyOnOwner
would complain about the lack of a pre-existing pg_shdepend entry, but I
see it won't, so it should work fine.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-04-20 23:14:22 Re: Different views of remote server
Previous Message Frank van Vugt 2011-04-20 22:03:02 Re: REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it