Re: pgsql: Add various assertions to heap pruning code.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add various assertions to heap pruning code.
Date: 2021-11-05 06:48:25
Message-ID: YYTTuYykpVXEfnOr@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Hi Peter,

On Fri, Nov 05, 2021 at 02:09:47AM +0000, Peter Geoghegan wrote:
> Add various assertions to heap pruning code.
>
> These assertions document (and verify) our high level assumptions about
> how pruning can and cannot affect existing items from target heap pages.
> For example, one of the new assertions verifies that pruning does not
> set a heap-only tuple to LP_DEAD.

This generates some warnings on Windows without asserts:
pruneheap.c(847): warning C4101: 'htup' unreferenced local variable
pruneheap.c(859): warning C4101: 'tolp' unreferenced local variable

You could move those two variables within their USE_ASSERT_CHECKING
blocks, for example.

Thanks,
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2021-11-05 12:06:50 Re: pgsql: Fix WAL replay in presence of an incomplete record
Previous Message Michael Paquier 2021-11-05 06:27:34 pgsql: Improve psql tab completion for COMMENT