Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lzJYo-0006Zu-C1 for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Jul 2021 13:50:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lzJYm-0006Ws-DL for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Jul 2021 13:50:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lzJYm-0006Wj-6l for pgsql-bugs@lists.postgresql.org; Fri, 02 Jul 2021 13:50:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lzJYh-0007Rp-5S for pgsql-bugs@lists.postgresql.org; Fri, 02 Jul 2021 13:50:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 162DoHia807271; Fri, 2 Jul 2021 09:50:18 -0400 From: Tom Lane To: Martin Butter cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17081: Segmentation fault on _PG_init() in a session_preload_library In-reply-to: <5e9f75fd-2886-2b7d-0a8f-0b46049786f5@splendiddata.com> References: <17081-b5a83245fd4e64bb@postgresql.org> <5e9f75fd-2886-2b7d-0a8f-0b46049786f5@splendiddata.com> Comments: In-reply-to Martin Butter message dated "Fri, 02 Jul 2021 09:15:02 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <807269.1625233817.1@sss.pgh.pa.us> Date: Fri, 02 Jul 2021 09:50:17 -0400 Message-ID: <807270.1625233817@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Martin Butter writes: > Extension test_spi_in_preload_session just executes 'select 1' in its > _PG_init() function. > Until Postgres version 14beta1 this works fine, but in version 14beta2 > the process dies. I don't believe we have ever considered that (i.e., execution of general SQL from a _PG_init function) to be a supported case. If it seemed to work before, that was completely accidental. There is no transaction context in place when process_session_preload_libraries runs. regards, tom lane