Re: BUG #17081: Segmentation fault on _PG_init() in a session_preload_library

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Butter <martin(dot)butter(at)splendiddata(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17081: Segmentation fault on _PG_init() in a session_preload_library
Date: 2021-07-02 13:50:17
Message-ID: 807270.1625233817@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Martin Butter <martin(dot)butter(at)splendiddata(dot)com> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-07-02 21:17:08 BUG #17082: Status code: 404 for https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/repodata/rep
Previous Message Andrey Lepikhov 2021-07-02 13:24:53 The case when AsyncAppend exists also in the qual of Async ForeignScan