Re: Potential stack overflow in incremental base backup

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Potential stack overflow in incremental base backup
Date: 2024-04-10 12:10:56
Message-ID: CA+Tgmoa1C9ZPT+o79AVOKOsqwQmPYL-p8etn+kAD1MUsM+4XDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 10, 2024 at 6:21 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> 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.

Yeah. This approach makes the name "relative_block_numbers" a bit
confusing, but not running out of memory is nice, too.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2024-04-10 12:19:47 Re: Table AM Interface Enhancements
Previous Message Alexander Lakhin 2024-04-10 12:00:00 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands