Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas
Date: 2022-11-29 00:48:54
Message-ID: 778525.1669682934@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> I am wondering if it would be worth adding an AssertMacro() like in
> this one, though:
> https://www.postgresql.org/message-id/YkaP64JvZTMgcHtq@paquier.xyz

Kind of doubt it. It'd bloat debug builds with a lot of redundant
checks, and probably never catch anything. For catching problems
in production, the right place to do this (and where we already do
do it) is in _bt_checkpage.

If any of the other AMs lack page-read-time sanity checks like
_bt_checkpage, I'd be in favor of adding that. But I don't
think a whole bunch of additional checks afterwards will buy much.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-11-29 01:33:03 Re: fixing CREATEROLE
Previous Message Michael Paquier 2022-11-29 00:22:22 Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas