Re: Fixing broken permissions for deleted user - Mailing list pgsql-general

From Tom Lane
Subject Re: Fixing broken permissions for deleted user
Date
Msg-id 19335.1179461730@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixing broken permissions for deleted user  ("Justin Pasher" <justinp@newmediagateway.com>)
List pgsql-general
"Justin Pasher" <justinp@newmediagateway.com> writes:
> Perfect. Just was I was looking for. So is it safe to actually run an update
> on the pg_catalog.pg_type.typowner column to change the user id from 101 to
> another existing user id without causing any other database weirdness?

Should work.  In recent PG versions you would need to worry about
pg_shdepend entries too, but if you had pg_shdepend you would not have
been able to get into this state in the first place (in theory anyway).

Some general suggestions about manual changes to the system catalogs:
Reasonable prudence would suggest making the change inside a BEGIN block
and looking around for problems before you COMMIT.  If you're really
paranoid, you could first stop the postmaster and take a plain tarball
backup of the PGDATA directory tree, which would certainly let you get
back to where you were if things go horribly wrong.

            regards, tom lane

pgsql-general by date:

Previous
From: "Justin Pasher"
Date:
Subject: Re: Fixing broken permissions for deleted user
Next
From: "Albe Laurenz"
Date:
Subject: Re: HowTo SSL probaply with ODBC ?