Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwujx-0001kA-Nu for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Sep 2017 18:37:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dwujx-00073u-An for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Sep 2017 18:37:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dwujw-00073E-4n; Tue, 26 Sep 2017 18:37:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dwujt-0003YF-Kx; Tue, 26 Sep 2017 18:37:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v8QIbk8e000330; Tue, 26 Sep 2017 14:37:46 -0400 From: Tom Lane To: Andrew Dunstan cc: "David E. Wheeler" , Christophe Pettus , pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: BUG #14825: enum type: unsafe use? In-reply-to: <9666.1506446327@sss.pgh.pa.us> References: <20170922185904.1448.16585@wrigleys.postgresql.org> <15165.1506116768@sss.pgh.pa.us> <3cece400-af56-7145-2e65-f044de1b0b68@2ndQuadrant.com> <28968.1506136792@sss.pgh.pa.us> <24380.1506179805@sss.pgh.pa.us> <16272.1506189656@sss.pgh.pa.us> <928f5974-151f-0273-0221-fac213e7624f@2ndQuadrant.com> <19137.1506196325@sss.pgh.pa.us> <4942e2c0-3302-f496-d4c1-a967f77d0143@2ndQuadrant.com> <25662.1506204381@sss.pgh.pa.us> <9479302a-09b8-4264-f9c4-514b65f18547@2ndQuadrant.com> <18127.1506285450@sss.pgh.pa.us> <2770f70a-5977-3fa1-1065-11b4cc69f07f@2ndQuadrant.com> <23438.1506294409@sss.pgh.pa.us> <25809.1506348877@sss.pgh.pa.us> <27064.1506350579@sss.pgh.pa.us> <5f4f29bf-90b1-e49a-6cf9-069c59bc1067@2ndQuadrant.com> <40FDB1F3-932D-4912-B4C7-F1E26E331079@justatheory.com> <7ca5214d-f981-54e4-c65a-470a87aa665e@2ndQuad! ! ! rant.com> <1090.1506365074@sss.pgh.pa.us> <9666.1506446327@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 26 Sep 2017 13:18:47 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <328.1506451066.1@sss.pgh.pa.us> Date: Tue, 26 Sep 2017 14:37:46 -0400 Message-ID: <329.1506451066@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org I wrote: > Pushed; sorry for the delay. ... and the buildfarm's not too happy. It looks like force_parallel_mode breaks all the regression test cases around unsafe enums; which on reflection is unsurprising, because parallel workers will not have access to the parent's blacklist hash, so they will think unsafe values are safe. Now, as long as parallel workers are read-only, perhaps this matters little; they would not be allowed to write unsafe values into tables anyway. I'm concerned though about whether it might be possible for a parallel worker to return an unsafe value to the parent (in OID form) and then the parent writes it into a table. If we can convince ourselves that's not possible, it might be okay to just turn off force_parallel_mode for these test cases. A safer answer would be to mark enum_in() and other callers of check_safe_enum_use() as parallel-restricted. That'd require a post-RC1 catversion bump, which seems pretty unpleasant, but none of the other answers are nice either. Transmitting the blacklist hash to workers would be a good long-term answer, but I don't want to try to shoehorn it in for v10. Another idea is that maybe the existence of a blacklist hash should be enough to turn off parallel mode altogether ... but ugh. Or maybe we're back to "revert the whole feature, go back to 9.6 behavior". Thoughts? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs