Re: set_config(‘search_path’) does not truncate names over 63 bytes, unlike SET

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: Manav Kumar <mkumar(at)yugabyte(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: set_config(‘search_path’) does not truncate names over 63 bytes, unlike SET
Date: 2026-11-04 12:13:38
Message-ID: 3538A21B-9257-42A9-A363-058DD5AE51D3@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On 4 Nov 2026, at 04:46, shihao zhong <zhong950419(at)gmail(dot)com> wrote:

> I am not sure if this is a bug.

It's not a bug, but it's not ideal that it can be used to force the server to
send a message which triggers an errorpath leading to fatal error shutdown in
the protocol code.

postgres=# SELECT set_config('search_path', repeat('a', 10000000) || ', public', false);
lost synchronization with server: got message type "S", length 10000025
The connection to the server was lost. Attempting reset: Succeeded.

Everything works as intended but it would be nice to handle this in a more
graceful way.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dilip Kumar 2026-11-04 12:28:02 Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
Previous Message Robins Tharakan 2026-11-04 11:30:34 Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input