Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fuTvc-00075B-S7 for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Aug 2018 02:40:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fuTvb-0003eE-CS for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Aug 2018 02:40:23 +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.89) (envelope-from ) id 1fuTvb-0003dD-3C for pgsql-bugs@lists.postgresql.org; Tue, 28 Aug 2018 02:40:23 +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.89) (envelope-from ) id 1fuTvY-0000Rb-Ni for pgsql-bugs@lists.postgresql.org; Tue, 28 Aug 2018 02:40:21 +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 w7S2eHtx020463; Mon, 27 Aug 2018 22:40:17 -0400 From: Tom Lane To: Thomas Munro cc: kieran.mccusker@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #15350: Getting invalid cache ID: 11 Errors In-reply-to: References: <153512195228.1489.8545997741965926448@wrigleys.postgresql.org> <12945.1535123753@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Tue, 28 Aug 2018 09:12:14 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20461.1535424017.1@sss.pgh.pa.us> Date: Mon, 27 Aug 2018 22:40:17 -0400 Message-ID: <20462.1535424017@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > We could probably improve that situation by making syscache lookups > (and probably other things too) fail when called from _PG_init() in > regular backends so that extension authors are made aware of this > hazard, or perhaps go the other way and change the order we do things > in parallel workers. Hmm. There's an argument to be made for the latter: we don't really want stuff failing in parallel workers if it works fine normally. On the other hand, it seems clear to me that we *don't* want extensions to be doing stuff like syscache lookups in _PG_init(), because that would prevent them from working as shared_preload_libraries entries. And on the third hand, intentionally breaking code that used to work isn't likely to win us many friends either. So I'm not sure that your first option is really tenable. Perhaps we could get away with doing it in HEAD and not back-patching ... but that does little for existing problems. regards, tom lane