Re: ProcessStartupPacket(): database_name and user_name truncation

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: ProcessStartupPacket(): database_name and user_name truncation
Date: 2023-07-04 06:06:37
Message-ID: 94712179-b915-abdb-435b-6bcf3bb2f8e3@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 7/3/23 10:34 PM, Nathan Bossart wrote:
> On Sat, Jul 01, 2023 at 04:02:06PM +0200, Drouvot, Bertrand wrote:
>> Please find V2 attached where it's failing as soon as the database name or
>> user name are detected as overlength.
>
> Thanks, Bertrand. I chickened out and ended up committing v1 for now
> (i.e., simply removing the truncation code). I didn't like the idea of
> trying to keep the new error messages consistent with code in faraway
> files, and the startup packet length limit is already pretty aggressive, so
> I'm a little less concerned about lugging around long names. Plus, I think
> v2 had some subtle interactions with db_user_namespace (maybe for the
> better), but I didn't spend too much time looking at that since
> db_user_namespace will likely be removed soon.

Thanks Nathan for the feedback and explanations, I think that makes fully sense.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Palak Chaturvedi 2023-07-04 06:08:04 Re: Extension Enhancement: Buffer Invalidation in pg_buffercache
Previous Message Michael Paquier 2023-07-04 06:03:01 Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?