REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it - Mailing list pgsql-general

From Frank van Vugt
Subject REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it
Date
Msg-id 201104181637.17605.ftm.van.vugt@foxi.nl
Whole thread Raw
Responses Re: REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it
List pgsql-general
L.S.


# select version();
                                        version
---------------------------------------------------------------------------------------
 PostgreSQL 8.4.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
4.4.4, 64-bit
(1 row)


In a production database we experienced the following:

* the database contains a number of tables and functions owned by user A

* one is logged in as postgres

* upon issuing 'REASSIGN OWNED BY A TO postgres', all tables and _most_
functions changed ownership, but not all.... a number of functions stay marked
as owned by A, nothing weird in the logs, the reassign looked like it
completed successfully

* there doesn't seem to be anything 'special' about the functions that did not
change ownership

* changing ownership for one of these functions by using 'alter function'
succeeds without any problem


Mind you, we tested the reassign in a trial database first, a freshly restored
dump, and there the reassign worked properly / completely.


Any hints as to what could cause this? We left the production db as-is, so we
still have a number of these functions 'still owned by A' for which we could
check things in pg_* tables or something.





--

Best,




Frank.

pgsql-general by date:

Previous
From: bkwiencien
Date:
Subject: stymied on postgresql upgrade
Next
From: Devrim GÜNDÜZ
Date:
Subject: Re: stymied on postgresql upgrade