Hi, On Thu, Aug 28, 2025 at 05:53:23PM -0500, Sami Imseih wrote: > Just a few things that were discussed earlier, that I incorporated now. > > 1/ We should be checking that tranche_name is NOT NULL when > LWLockNewTrancheId or RequestNamedLWLockTranche is called.
Right, if not strlen() does segfault. In addition to checking for NULL, should we also check for empty string? Currently, the patch does accept strlen(tranche_name) == 0. > Also check for the length of the tranche name inside > RequestNamedLWLockTranche, instead of relying on an Assert to check > the length. I think that is much safer. Same remark as above but in RequestNamedLWLockTranche(). Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
