Hi,

IMO I think that commit 31966b1
<https://github.com/postgres/postgres/commit/31966b151e6ab7a6284deab6e8fe5faddaf2ae4c>
has an oversight.

All the logic of the changes are based on the "extend_by" variable, which
is a uint32, but in some places it is using "int", which can lead to an
overflow at some point.

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.

Patch attached.

regards,
Ranier Vilela

Attachment: 001-fix-bufmgr-extend-variable-index.patch
Description: Binary data

Reply via email to