Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas
Date
Msg-id 778525.1669682934@sss.pgh.pa.us
Whole thread Raw
In response to Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Michael Paquier <michael@paquier.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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas
Next
From: Robert Haas
Date:
Subject: Re: fixing CREATEROLE