Re: Potential stack overflow in incremental base backup - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Potential stack overflow in incremental base backup
Date
Msg-id CA+hUKGLHmsi_00Ck3RS92o5X_W9Lxnmx7AAdBwh_kMTxEAFYGw@mail.gmail.com
Whole thread Raw
In response to Re: Potential stack overflow in incremental base backup  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Potential stack overflow in incremental base backup
List pgsql-hackers
On Fri, Mar 8, 2024 at 6:53 AM Robert Haas <robertmhaas@gmail.com> wrote:
> ... We could
> avoid transposing relative block numbers to absolute block numbers
> whenever start_blkno is 0,  ...

Could we just write the blocks directly into the output array, and
then transpose them directly in place if start_blkno > 0?  See
attached.  I may be missing something, but the only downside I can
think of is that the output array is still clobbered even if we decide
to return BACK_UP_FILE_FULLY because of the 90% rule, but that just
requires a warning in the comment at the top.

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Transparent column encryption
Next
From: Peter Eisentraut
Date:
Subject: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs