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