However, the fix iteself looks good because it unifies the loop variable types in similar loops.
Yeah.
On the other hand, I'm not a fan of changing the signature of smgr_zeroextend to use uint32. I don't think it improves things and the other reason is that I don't like using unnatural integer types unnecessarily in API parameter types.
But ExtendBufferedRelBy calls smgr_zeroextend and carries a uint32 value to int param.
smgr_zeroextend signature must be changed to work with any values from uint32.
ASnyway, the patch causes a type inconsistency between smgr_zserextend and mdzeroextend.
> I also take the opportunity to correct another oversight, regarding the > commit dad50f6 > <https://github.com/postgres/postgres/commit/dad50f677c42de207168a3f08982ba23c9fc6720> > , > for possible duplicate assignment. > GetLocalBufferDescriptor was called twice. > > Taking advantage of this, I promoted a scope reduction for some variables, > which I thought was opportune.
I like the scope reductions.
Yeah.
Regarding the duplicate assignment to existing_hdr, I prefer assigning it in the definition line, but I don't have a strong opinion on this matter.
Closer to where the variable is used is preferable if the assignment is not cheap.