Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations - Mailing list pgsql-bugs

From Dimitri Fontaine
Subject Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations
Date
Msg-id m2ipbiuele.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Well, what I saw was that both the table and its SERIAL-generated
> sequence got an DEPENDENCY_EXTENSION row in pg_depend, which is exactly
> what (IMV) causes the problem.  One of my proposals is to tweak the code
> to avoid that row (but if we do that, then we need to do something about
> databases that contain such rows today).

Ah yes, indeed.

I think we shouldn't change the content of pg_depend lightly here, and
that we should rather specialize AlterObjectNamespace_oid() to skip
caring about sequences. The other objects that get moved by
AlterTableNamepace other than the table itself and its sequences are
Indexes and Constraints. Owned Sequence (serial) will get cared of by
the extension dependency walking code.

I'm going to have a try at that.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

pgsql-bugs by date:

Previous
From: Amit Kapila
Date:
Subject: Re: BUG #7533: Client is not able to connect cascade standby incase basebackup is taken from hot standby
Next
From: Robert Haas
Date:
Subject: Re: Re: Probable bug with CreateFakeRelcacheEntry (now with reproducible test case)