From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, jeff <jeff(at)pgexperts(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #6704: ALTER EXTENSION postgis SET SCHEMA leaves dangling relations |
Date: | 2012-09-25 16:29:17 |
Message-ID: | m2zk4e6p7m.fsf@2ndQuadrant.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
> Side note: as soon as we have CREATE EXTENSION AS $$ script $$; we will
> be able to add those cases as regression tests. That's not the main
> usage of that feature, by far, but I can't resits the occasion :)
Oh, I did already mention it :)
> I have some local failures in `make check` that I'm not sure originate
> from that patch. Still wanted to have an opinion about the idea before
> cleaning up.
Sorry for sending unfinished preliminary version, I just had the
opportunity to look at what happened: views will create a composite type
that needs its pg_class row updated when doing ALTER VIEW SET SCHEMA.
That means that we need proper tracking for that operation even when it
happens outside of an extension update script, as in the attached
version 4 of the patch.
I think the way forward is to use the simplest one for back branches and
this one for master only, unless it is appreciated of light enough
impact, right? (provided it's ok, too)
git diff --stat
src/backend/commands/alter.c | 14 +----
src/backend/commands/extension.c | 48 +++++++++------
src/backend/commands/tablecmds.c | 122 +++++++++++++++++++++++++++-----------
src/backend/commands/typecmds.c | 33 +++++++++-
src/include/commands/alter.h | 4 +-
src/include/commands/tablecmds.h | 7 ++-
src/include/commands/typecmds.h | 6 +-
7 files changed, 161 insertions(+), 73 deletions(-)
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
Attachment | Content-Type | Size |
---|---|---|
alter-extension-schema.4.patch | text/x-patch | 20.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Freddie Burgess | 2012-09-25 20:12:21 | Postgres Partitions not working with hibernate 4.1.6.Final |
Previous Message | Tom Lane | 2012-09-25 16:08:47 | Re: BUG #7567: Sequences not properly replicated |