pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: adam@labkey.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails
Date: Wed, 27 Nov 2024 13:17:18 -0500
Message-ID: <1896106.1732731438@sss.pgh.pa.us> (raw)
In-Reply-To: <Z0de/7/6wgGY074a@ip-10-97-1-34.eu-west-3.compute.internal>
References: <659706.1732303427@sss.pgh.pa.us>
	<Z0DjJbJV4ZWkLuQd@nathan>
	<665338.1732306066@sss.pgh.pa.us>
	<Z0Dmw1ryKH8bEkyo@nathan>
	<Z0c9XVU6aTd8neRr@nathan>
	<1865227.1732723416@sss.pgh.pa.us>
	<Z0dKd7bvo3D2NdLt@ip-10-97-1-34.eu-west-3.compute.internal>
	<Z0dNyskuXOCM-dOz@nathan>
	<Z0daSnNI8FrrSvhW@ip-10-97-1-34.eu-west-3.compute.internal>
	<Z0db25rMTSFrK-FN@nathan>
	<Z0de/7/6wgGY074a@ip-10-97-1-34.eu-west-3.compute.internal>

Bertrand Drouvot <bertranddrouvot.pg@gmail.com> writes:
> Indeed, reverting might be the way to go then (without waiting for more 17
> behavior reports).

I have an idea that might salvage something from what we've just
been doing.  The biggest single problem with the old behavior,
AIUI, was the possibility of sending back encoding-corrupt names
in connection failure reports.  How about something like:

* Don't truncate the names on sight (so we keep 562bee0fc1).

* Truncate the names at NAMEDATALEN-1 just before catalog lookup
(this restores the old lookup behavior, solving the current report).

* In lookup-failure messages, be sure to report the un-truncated
name (avoiding the bad-encoding problem).

* Copy the correctly-truncated names from the catalog to any
persistent storage such as MyProcPort, so that those are used
for all post-connection purposes.

			regards, tom lane





view thread (67+ messages)  latest in thread

Message-ID: <1896106.1732731438@sss.pgh.pa.us>
Permalink:  ../1896106.1732731438@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1896106.1732731438@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bertranddrouvot.pg@gmail.com, nathandbossart@gmail.com, bruce@momjian.us, adam@labkey.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails
  In-Reply-To: <1896106.1732731438@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox