Re: Error when setting default_text_search_config - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Error when setting default_text_search_config
Date
Msg-id 1381066.1728239990@sss.pgh.pa.us
Whole thread Raw
In response to Re: Error when setting default_text_search_config  (Erik Wienhold <ewie@ewie.name>)
Responses Re: Error when setting default_text_search_config
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Erik Wienhold
Date:
Subject: Re: Error when setting default_text_search_config
Next
From: Murat Efendioğlu
Date:
Subject: Re: Error when setting default_text_search_config