pgsql: Fix datatype confusion in logtape.c's right_offset(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix datatype confusion in logtape.c's right_offset().
Date
Msg-id E1mxAxD-0005SN-Rs@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix datatype confusion in logtape.c's right_offset().

This could only matter if (a) long is wider than int, and (b) the heap
of free blocks exceeds UINT_MAX entries, which seems pretty unlikely.
Still, it's a theoretical bug, so backpatch to v13 where the typo came
in (in commit c02fdc922).

In passing, also make swap_nodes() use consistent datatypes.

Ma Liangzhu

Discussion: https://postgr.es/m/17336-fc4e522d26a750fd@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2de3c1015cb2556af501c630b1768a20f111fe95

Modified Files
--------------
src/backend/utils/sort/logtape.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Check that we have a working tar before trying to use it
Next
From: Tom Lane
Date:
Subject: pgsql: Improve sift up/down code in binaryheap.c and logtape.c.