Re: pg_rewind: Fix buffer size passed when building WAL file name

From: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_rewind: Fix buffer size passed when building WAL file name
Date: 2026-11-25 17:47:33
Message-ID: CAJTYsWWi1phQ-6Eabqnorn9wO5+-G5=_QPjHqibXHQTSz5H_+g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, 25 Nov 2026 at 22:34, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> In pg_rewind findLastCheckpoint() there is a buffer size mismatch when
> composing a WAL file name. You can't actually overflow the buffer, so
> it's harmless, but when playing with compiler annotations, I see this
> getting flagged, because it's rather obviously incorrect on some level,
> so I think it's worth fixing. See attached patch for details.

+1, patch Lgtm.

(Could not find any other place doing the same offset trick)

Regards,
Ayush

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-11-25 17:51:56 Re: use indnkeyatts not indnatts in loops that read rd_indcollation
Previous Message Tom Lane 2026-11-25 17:43:09 Re: OOM kill in xmlelement() with large arrays