From: | David Rowley <drowley(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Make verify_compact_attribute available in non-assert builds |
Date: | 2025-01-11 00:46:15 |
Message-ID: | E1tWPdn-000uJk-96@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Make verify_compact_attribute available in non-assert builds
6f3820f37 adjusted the assert-enabled validation of the CompactAttribute
to call a new external function to perform the validation. That commit
made it so the function was only available when building with
USE_ASSERT_CHECKING, and because TupleDescCompactAttr() is a static
inline function, the call to verify_compact_attribute() was compiled
into any extension which uses TupleDescCompactAttr(). This caused issues
for such extensions when loading the assert-enabled extension into
PostgreSQL versions without asserts enabled due to that function being
unavailable in core.
To fix this, make verify_compact_attribute() available unconditionally,
but make it do nothing unless building with USE_ASSERT_CHECKING.
Author: Andrew Kane <andrew(at)ankane(dot)org>
Reviewed-by: David Rowley <dgrowleyml(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/CAOdR5yHfMEMW00XGo=v1zCVUS6Huq2UehXdvKnwtXPTcZwXhmg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/34c6e652425fde42c2746f749e31d196fc0d5538
Modified Files
--------------
src/backend/access/common/tupdesc.c | 5 ++---
src/include/access/tupdesc.h | 2 --
2 files changed, 2 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2025-01-11 01:32:27 | pgsql: TupleHashTable: store additional data along with tuple. |
Previous Message | Tatsuo Ishii | 2025-01-10 23:24:42 | pgsql: Add new StringInfo APIs to allow callers to specify the buffer s |