From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Wienhold <ewie@ewie.name>
Cc: Murat Efendioğlu <mrtdmrts001@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Error when setting default_text_search_config
Date: Sun, 06 Oct 2024 14:39:50 -0400
Message-ID: <1381066.1728239990@sss.pgh.pa.us> (raw)
In-Reply-To: <9c480df9-720b-4419-85c6-09113f5d6f0a@ewie.name>
References: <CACbCzujQ4zS8MM1bx-==+tr+D3Hk5G1cjN4XkUQ+Q=cEpwhzqg@mail.gmail.com>
<26c28873-85ca-4360-a5e9-1cc691a05451@ewie.name>
<9c480df9-720b-4419-85c6-09113f5d6f0a@ewie.name>
Erik Wienhold <ewie@ewie.name> writes:
>> I can reproduce a segfault on my Arch machine with 17.0, but only by
>> also connecting to that database afterwards:
>>
>> postgres=# create database regress;
>> postgres=# alter database regress set default_text_search_config to 'german';
>> postgres=# \c regress
>> connection to server at "localhost" (::1), port 15432 failed: server closed the connection unexpectedly
>> This probably means the server terminated abnormally
>> before or while processing the request.
Yeah, I see that too (with any value of default_text_search_config).
The problem is that InitPostgres does
/* Process pg_db_role_setting options */
process_settings(MyDatabaseId, GetSessionUserId());
before it calls InitializeSearchPath(), and recomputeNamespacePath
isn't ready for that. Evidently broken in f26c2368d.
I suppose we could just move the InitializeSearchPath call up
a bit (the comments in postinit.c are misleading about what it
actually does), but I wonder whether the cache-is-valid assumptions
in namespace.c ought to be rethought. It seems unduly fragile
as-is.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, ewie@ewie.name, mrtdmrts001@gmail.com, pgsql@j-davis.com, pgsql-bugs@lists.postgresql.org
Subject: Re: Error when setting default_text_search_config
In-Reply-To: <1381066.1728239990@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox