Re: Alter or rename enum value

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Matthias Kurz <m(dot)kurz(at)irregular(dot)at>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Alter or rename enum value
Date: 2016-03-27 12:57:35
Message-ID: 56F7D8BF.5000000@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/27/2016 12:43 AM, Christophe Pettus wrote:
> On Mar 26, 2016, at 7:40 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> It would be nice if we could find a less broad brush approach to dealing with the issue.
> I don't know how doable this is, but could we use the existing mechanism of marking an index invalid if it contains an enum type to which a value was added, and the transaction was rolled back? For the 90% use case, that would be acceptable, I would expect.
>

The more I think about this the more I bump up against the fact that
almost anything we do might want to do to ameliorate the situation is
going to be rolled back. The only approach I can think of that doesn't
suffer from this is to abort if an insert/update will affect an index on
a modified enum. i.e. we prevent the possible corruption from happening
in the first place, as we do now, but in a much more fine grained way.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2016-03-27 13:31:02 Re: Move PinBuffer and UnpinBuffer to atomics
Previous Message Emre Hasegeli 2016-03-27 12:35:29 Re: [PATCH] we have added support for box type in SP-GiST index