Re: Error when setting default_text_search_config

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Murat Efendioğlu <mrtdmrts001(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Error when setting default_text_search_config
Date: 2024-10-06 14:49:49
Message-ID: 26c28873-85ca-4360-a5e9-1cc691a05451@ewie.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2024-10-05 19:46 +0200, Murat Efendioğlu wrote:
> I've encountered some strange behavior in the new PostgreSQL 17 version.
> Previously, in versions before 17, I was able to set the
> default_text_search_config like this:
>
> sql
> Copy code
> ALTER DATABASE "MyDatabase" SET default_text_search_config TO 'german';
>
> Everything worked fine. However, after upgrading to PostgreSQL 17, when I
> ran the same ALTER statement on the new database, my database entered
> recovery mode.

Is it entering recovery mode just by running that ALTER DATABASE? Are
you already connected to MyDatabase?

> The solution was to update the statement as follows:
>
> sql
> Copy code
> ALTER DATABASE "MyDatabase" SET default_text_search_config TO
> 'pg_catalog.german';
>
> It turns out I had to prefix the language with pg_catalog to resolve the
> issue.
>
> Environment: Windows Server 2022 Standard 21H2 with PostgreSQL 17 installer

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.

The core dump shows this backtrace:

#0 0x0000619056403314 in MemoryContextReset ()
#1 0x0000619056016faa in spcache_init ()
#2 0x0000619056017706 in recomputeNamespacePath ()
#3 0x000061905601a705 in get_ts_config_oid ()
#4 0x00006190563d5f08 in check_default_text_search_config ()
#5 0x00006190563ee3c0 in call_string_check_hook ()
#6 0x00006190563f107b in parse_and_validate_value ()
#7 0x00006190563f1faa in set_config_with_handle ()
#8 0x00006190563f6545 in ProcessGUCArray ()
#9 0x0000619056027e97 in ApplySetting ()
#10 0x00006190563ea256 in InitPostgres ()
#11 0x000061905629eb66 in PostgresMain ()
#12 0x000061905629ac9f in BackendMain ()
#13 0x000061905620af9b in postmaster_child_launch ()
#14 0x000061905620ea69 in ServerLoop.isra.0 ()
#15 0x000061905621077d in PostmasterMain ()
#16 0x0000619055f4ba03 in main ()

--
Erik

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PetSerAl 2024-10-06 16:15:10 Server crash when selecting from pg_cursors
Previous Message Andy Fan 2024-10-06 04:19:46 Re: what are the things that occupy the session memory.