Alvaro Herrera <alvhe...@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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to