Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tIHuV-00DQaq-Se for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Dec 2024 01:41:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tIHuT-005raP-6b for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Dec 2024 01:41:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tIHuS-005rZ6-UH for pgsql-bugs@lists.postgresql.org; Tue, 03 Dec 2024 01:41:06 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tIHuR-000kFE-JW for pgsql-bugs@lists.postgresql.org; Tue, 03 Dec 2024 01:41:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4B31f1381710260; Mon, 2 Dec 2024 20:41:01 -0500 From: Tom Lane To: Bruce Momjian cc: Thomas Munro , Bertrand Drouvot , Nathan Bossart , 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: References: <1865227.1732723416@sss.pgh.pa.us> <2094158.1732812306@sss.pgh.pa.us> <1692919.1733181379@sss.pgh.pa.us> Comments: In-reply-to Bruce Momjian message dated "Mon, 02 Dec 2024 18:37:47 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1710258.1733190061.1@sss.pgh.pa.us> Date: Mon, 02 Dec 2024 20:41:01 -0500 Message-ID: <1710259.1733190061@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian writes: > On Mon, Dec 2, 2024 at 06:16:19PM -0500, Tom Lane wrote: >> Reality is that using multiple encodings in shared catalogs just plain >> doesn't work very well. Even something as simple as "select datname >> from pg_database" is likely to give garbage if there are entries in >> encodings that don't match your current database's encoding. What >> Thomas is proposing is to formalize and then enforce the two usage >> patterns that we know work okay. > I have not heard of anyone complaining about the problem of viewing the > shared catalog columns so I didn't consider that benefit. That's probably because they've learned the hard way to use one of the two usage patterns that actually work. Also, I think we have some code around pg_stat_activity that suppresses possibly-wrongly-encoded data from other DBs (in query text, not only user/DB names). That suppression could be relaxed in the only-one-encoding mode, which would be a genuinue benefit. regards, tom lane