pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Add various assertions to heap pruning code.
3+ messages / 2 participants
[nested] [flat]
* pgsql: Add various assertions to heap pruning code.
@ 2021-11-05 02:09 Peter Geoghegan <pg@bowt.ie>
2021-11-05 06:48 ` Re: pgsql: Add various assertions to heap pruning code. Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 3+ messages in thread
From: Peter Geoghegan @ 2021-11-05 02:09 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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.
Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CAH2-Wz=vhvBx1GjF+oueHh8YQcHoQYrMi0F0zFMHEr8yc4sCoA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5cd7eb1f1c32e1b95894f28b277b4e4b89add772
Modified Files
--------------
src/backend/access/heap/pruneheap.c | 84 +++++++++++++++++++++++++++++++++++--
1 file changed, 80 insertions(+), 4 deletions(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Add various assertions to heap pruning code.
2021-11-05 02:09 pgsql: Add various assertions to heap pruning code. Peter Geoghegan <pg@bowt.ie>
@ 2021-11-05 06:48 ` Michael Paquier <michael@paquier.xyz>
2021-11-05 15:40 ` Re: pgsql: Add various assertions to heap pruning code. Peter Geoghegan <pg@bowt.ie>
0 siblings, 1 reply; 3+ messages in thread
From: Michael Paquier @ 2021-11-05 06:48 UTC (permalink / raw)
To: Peter Geoghegan <pg@bowt.ie>; +Cc: pgsql-committers@lists.postgresql.org
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
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Add various assertions to heap pruning code.
2021-11-05 02:09 pgsql: Add various assertions to heap pruning code. Peter Geoghegan <pg@bowt.ie>
2021-11-05 06:48 ` Re: pgsql: Add various assertions to heap pruning code. Michael Paquier <michael@paquier.xyz>
@ 2021-11-05 15:40 ` Peter Geoghegan <pg@bowt.ie>
0 siblings, 0 replies; 3+ messages in thread
From: Peter Geoghegan @ 2021-11-05 15:40 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
On Thu, Nov 4, 2021 at 11:48 PM Michael Paquier <michael@paquier.xyz> wrote:
> 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.
Why doesn't PG_USED_FOR_ASSERTS_ONLY work on this platform? If it
doesn't work on this platform at all, but I'm required to avoid these
warnings all the same, then why do we even have
PG_USED_FOR_ASSERTS_ONLY? If it works in at least some cases on this
platform, then why not in this particular case?
--
Peter Geoghegan
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-11-05 15:40 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 02:09 pgsql: Add various assertions to heap pruning code. Peter Geoghegan <pg@bowt.ie>
2021-11-05 06:48 ` Michael Paquier <michael@paquier.xyz>
2021-11-05 15:40 ` Peter Geoghegan <pg@bowt.ie>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox