Re: Avoid a possible overflow (src/backend/utils/sort/logtape.c)

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Peter Geoghegan <pg@bowt.ie>
Cc: David Rowley <dgrowleyml@gmail.com>, Ranier Vilela <ranier.vf@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2023-08-29T23:05:57Z
Lists: pgsql-hackers
On Thu, Aug 24, 2023 at 07:02:40PM -0700, Peter Geoghegan wrote:
> FWIW I'm pretty sure that it's impossible to run into problems here in
> practice -- the minheap is allocated by palloc(), and the high
> watermark number of free pages is pretty small. Even still, I agree
> with your conclusion. There is really no reason to not be consistent
> here.

Postgres 16 RC1 is now tagged, so applied down to 13.
--
Michael

Commits

  1. Avoid possible overflow with ltsGetFreeBlock() in logtape.c