Re: Fix incorrect assignment of InvalidXLogRecPtr to a non-LSN variable.

2025-11-12 Thread Fujii Masao
On Wed, Nov 12, 2025 at 6:14 PM Xuneng Zhou wrote: > Good catch! I checked that no other similar misuses of > InvalidXLogRecPtr assigned to non-LSN variables were found in > logicalfuncs.c. Thanks, Steven and Xuneng, for the reviews! I've pushed the patch. Regards, -- Fujii Masao

Re: Fix incorrect assignment of InvalidXLogRecPtr to a non-LSN variable.

2025-11-12 Thread Xuneng Zhou
Hi, On Wed, Nov 12, 2025 at 4:23 PM Fujii Masao wrote: > > Hi, > > I noticed that pg_logical_slot_get_changes_guts() assigns InvalidXLogRecPtr > to the local variable upto_nchanges, even though it's not LSN variable > (i.e., its type is int32, not XLogRecPtr). While this causes no functional > i

Re: Fix incorrect assignment of InvalidXLogRecPtr to a non-LSN variable.

2025-11-12 Thread Steven Niu
Agreed. The definitions of upto_lsn and upyo_nchanges are different, so they should not be assigned the same form of value.   XLogRecPtr  upto_lsn;   int32   upto_nchanges; ..   if (PG_ARGISNULL(1)) upto_lsn = InvalidXLogRecPtr;   else upto_lsn = P