Re: Lowering the ever-growing heap->pd_lower

Поиск
Список
Период
Сортировка
От Matthias van de Meent
Тема Re: Lowering the ever-growing heap->pd_lower
Дата
Msg-id CAEze2WiSfL7GEw+rhHn_UTuPo0fvB9q_bW6K2PyYL8M7e8n6uA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Lowering the ever-growing heap->pd_lower  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Ответы Re: Lowering the ever-growing heap->pd_lower  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Wed, 16 Feb 2022 at 21:14, Matthias van de Meent
<boekewurm+postgres@gmail.com> wrote:
>
> On Wed, 16 Feb 2022 at 20:54, Peter Geoghegan <pg@bowt.ie> wrote:
> >
> > On Tue, Feb 15, 2022 at 10:48 AM Matthias van de Meent
> > <boekewurm+postgres@gmail.com> wrote:
> > > Peter Geoghegan asked for good arguments for the two changes
> > > implemented. Below are my arguments detailed, with adversarial loads
> > > that show the problematic behaviour of the line pointer array that is
> > > fixed with the patch.
> >
> > Why is it okay that lazy_scan_prune() still calls
> > PageGetMaxOffsetNumber() once for the page, before it ever calls
> > heap_page_prune()? Won't lazy_scan_prune() need to reestablish maxoff
> > now, if only so that its scan-page-items loop doesn't get confused
> > when it goes on to read "former line pointers"? This is certainly
> > possible with the CLOBBER_FREED_MEMORY stuff in place (which will
> > memset the truncated line pointer space with a 0x7F7F7F7F pattern).
>
> Good catch, it is not. Attached a version that re-establishes maxoff
> after each prune operation.

I double-checked the changes, and to me it seems like that was the
only place in the code where PageGetMaxOffsetNumber was not handled
correctly. This was fixed in the latest patch (v8).

Peter, would you have time to further review this patch and/or commit it?

- Matthias



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Daniel Westermann (DWE)"
Дата:
Сообщение: Re: Changing "Hot Standby" to "hot standby"
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints