Re: Error when setting default_text_search_config

From: Murat Efendioğlu <mrtdmrts001(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Error when setting default_text_search_config
Date: 2024-10-06 20:22:34
Message-ID: CACbCzujoMOShER-iZyFDsEP7rBvhxBx=wQi3GgqPfqq2SyqnKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

I checked it again, when I set

*ALTER DATABASE "MyDatabase" SET default_text_search_config TO 'german';*

and I try to connect through psql, I get following:

*>psql postgresql://user1:admin(at)192(dot)168(dot)153(dot)26:5432/MyDatabase
<http://user1:admin(at)192(dot)168(dot)153(dot)26:5432/MyDatabase>*

*psql: Fehler: Verbindung zum Server auf »192.168.153.26«, Port 5432
fehlgeschlagen: Server beendete die Verbindung unerwartet Das heißt
wahrscheinlich, dass der Server abnormal beendete bevor oder während
die Anweisung bearbeitet wurde.*
In english it would be similar like following:

*>psql postgresql://user1:admin(at)192(dot)168(dot)153(dot)26:5432/MyDatabase *
*psql: Error: Connection to server at "192.168.153.26", port 5432 failed:
The server unexpectedly closed the connection This likely means that the
server terminated abnormally before or while processing the request. *

In *pgAdmin *I am loosing the connection to the database and when I click
on the server node in the treeview I am loosing the complete connection to
the server.

Strangely my alter statement has to be like following to prevent the
explained error:

*ALTER DATABASE "MyDatabase" SET default_text_search_config TO
'pg_catalog.german';*

Prefixed with the "*pg_catalog.*" literal.

Well, thats my 2 cents to this topic. I had no issues till version 17 :-)

So my question is: Whats the error? The missing prefix before version 17,
but the PostgreSQL was tolerant OR the new version bcz something changed to
be more stricttly????

best regards murat

Am So., 6. Okt. 2024 um 20:39 Uhr schrieb Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> 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 Jeff Davis 2024-10-06 21:51:17 Re: Error when setting default_text_search_config
Previous Message Tom Lane 2024-10-06 18:39:50 Re: Error when setting default_text_search_config