Re: Potential stack overflow in incremental base backup
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-04-10T10:21:04Z
Lists: pgsql-hackers
Attachments
- v2-0001-Fix-potential-stack-overflow-in-incremental-baseb.patch (application/octet-stream) patch v2-0001
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.
Commits
-
Fix potential stack overflow in incremental backup.
- d8f5acbdb9b2 17.0 landed