Fix potential stack overflow in incremental backup.
Thomas Munro <tmunro@postgresql.org>
Fix potential stack overflow in incremental backup. The user can set RELSEG_SIZE to a high number at compile time, so we can't use it to control the size of an array on the stack: it could be many gigabytes in size. On closer inspection, we don't really need that intermediate array anyway. Let's just write directly into the output array, and then perform the absolute->relative adjustment in place. This fixes new code from commit dc212340058. Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/CA%2BhUKG%2B2hZ0sBztPW4mkLfng0qfkNtAHFUfxOMLizJ0BPmi5%2Bg%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/backup/basebackup_incremental.c | modified | +17 −9 |
Discussion
- Potential stack overflow in incremental base backup 10 messages · 2024-03-06 → 2024-05-17