On Fri, Nov 22, 2024 at 03:07:46PM -0500, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.com> writes:
>> I think we'll also want to do something about MyProcPort->database_name
>
> Huh, isn't that getting filled from InitPostgres's out_dbname?
I think ProcessStartupPacket() sets it. That's called by
BackendInitialize(), which is called before PostgresMain() (which is what
ultimately calls InitPostgres()). The truncation used to happen within
ProcessStartupPacket(), and it updated MyProcPort directly.
--
nathan