Re: Parallel safety tagging of extension functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Parallel safety tagging of extension functions
Date
Msg-id 619.1464024129@sss.pgh.pa.us
Whole thread Raw
In response to Re: Parallel safety tagging of extension functions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Tom Lane wrote:
>> You'd have to alter the index opfamily to disconnect the function from it,
>> drop/recreate the function, then re-add it to the opfamily.  Kind of icky,
>> but probably better than the alternatives.

> What happens if the upgraded database contains indexes using those
> opfamilies?  I suppose getting such indexes dropped because of ALTER
> EXTENSION UPDATE is not very nice.

Sure, that's why we mustn't drop and recreate the whole opfamily.
But we can do ALTER OPERATOR FAMILY ... DROP ... without causing
dependent indexes to be dropped.  Semi-bad things would happen if
someone tried to access such an index partway through; but as long
as the extension upgrade script itself doesn't do that, it should
be okay.  We run extension scripts as single transactions so the
change should appear atomic.
        regards, tom lane



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Calling json_* functions with JSONB data
Next
From: Ryan Pedela
Date:
Subject: Re: Calling json_* functions with JSONB data