Re: Error when setting default_text_search_config

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: Murat Efendioğlu <mrtdmrts001(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Error when setting default_text_search_config
Date: 2024-10-06 18:39:50
Message-ID: 1381066.1728239990@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Erik Wienhold <ewie(at)ewie(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Murat Efendioğlu 2024-10-06 20:22:34 Re: Error when setting default_text_search_config
Previous Message Erik Wienhold 2024-10-06 18:25:12 Re: Error when setting default_text_search_config