pgsql: Fix datatype confusion in logtape.c's right_offset().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix datatype confusion in logtape.c's right_offset().
Date: 2021-12-14 16:47:03
Message-ID: E1mxAxD-0005SP-SE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/25c7faa1feeeff040242100d61b1f8914db3d3ea

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

Browse pgsql-committers by date

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