On 2018-02-12 09:54:29 +1030, Andrew Dunstan wrote:
> The idea is to have an append-only list of labels
> which would not obey transactional semantics, and would thus help us
> avoid the pitfalls of enums - there wouldn't be any rollback of an
FWIW, I think we can resolve the issues of enum transactionality. While
not trivial I think the solution is to allow to make additions of enum
values non-transactional (by basically inserting them with immediate
visibility) *while* in a transaction, and to change deletion of values
to set a 'deleted' column to true.
With some additional effort we could even make additions transactional
by storing the xid that added the enum label along the row. Visibility
for index comparisons would regard labels as visible regardless of that
xid, but when creating new values we'd make a visibility check. The big
issue with that is that autovacuum has to know about it...