Re: [HACKERS] BUG #14825: enum type: unsafe use?

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Stephen Frost <sfrost@snowman.net>, Bruce Momjian <bruce@momjian.us>, "David E. Wheeler" <david@justatheory.com>, Christophe Pettus <christophe.pettus@pgexperts.com>, Postgres-Bugs <pgsql-bugs@postgresql.org>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-10-05T13:45:14Z
Lists: pgsql-bugs, pgsql-hackers
On Tue, Oct 3, 2017 at 9:38 PM, Andres Freund <andres@anarazel.de> wrote:
>> Do you have any suggestion as to how we should transmit the blacklist to
>> parallel workers?
>
> How about storing them in the a dshash table instead of dynahash?
> Similar to how we're now dealing with the shared typmod registry stuff?
> It should be fairly simple to now simply add a new struct Session member
> shared_enum_whatevs_table.

Yeah, that approach seems worth exploring.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Commits

  1. Revert to 9.6 treatment of ALTER TYPE enumtype ADD VALUE.

  2. Remove heuristic same-transaction test from check_safe_enum_use().

  3. Use a blacklist to distinguish original from add-on enum values.

  4. Add support for coordinating record typmods among parallel workers.