From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Hitoshi Harada <umi.tanuki@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6172: DROP EXTENSION error without CASCADE
Date: Mon, 22 Aug 2011 09:52:40 -0400
Message-ID: <3115.1314021160@sss.pgh.pa.us> (raw)
In-Reply-To: <878vqla87u.fsf@hi-media-techno.com>
References: <201108211644.p7LGibJ1064013@wwwmaster.postgresql.org>
<m2wre6v9z8.fsf@2ndQuadrant.fr>
<m2aab2v6wq.fsf@2ndQuadrant.fr>
<10160.1313967820@sss.pgh.pa.us>
<878vqla87u.fsf@hi-media-techno.com>
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> But in makeOperatorDependencies() we find the following piece of code:
> /* In case we are updating a shell, delete any existing entries */
> deleteDependencyRecordsFor(myself.classId, myself.objectId, false);
> false is for bool skipExtensionDeps.
> And now at the end of the same function, dependency is recorded back,
> except in some case:
> oldext = getExtensionOfObject(object->classId, object->objectId);
> if (OidIsValid(oldext))
> {
> /* If already a member of this extension, nothing to do */
> if (oldext == CurrentExtensionObject)
> return;
> The problem lies in catalog scans and SnapshotNow, I think.
[ light goes on... ] We need a CommandCounterIncrement in there.
Else, the code that looks to see if the object is already part of the
extension does not see the pg_depend row as deleted (yet).
Not sure offhand where the cleanest place to put it is.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dimitri@2ndQuadrant.fr, umi.tanuki@gmail.com
Subject: Re: BUG #6172: DROP EXTENSION error without CASCADE
In-Reply-To: <3115.1314021160@sss.pgh.pa.us>
References: <201108211644.p7LGibJ1064013@wwwmaster.postgresql.org> <m2wre6v9z8.fsf@2ndQuadrant.fr> <m2aab2v6wq.fsf@2ndQuadrant.fr> <10160.1313967820@sss.pgh.pa.us> <878vqla87u.fsf@hi-media-techno.com> <3115.1314021160@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox