Re: GIN pageinspect support for entry tree and posting tree

From: Japin Li <japinli(at)hotmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Roman Khapov <rkhapov(at)yandex-team(dot)ru>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GIN pageinspect support for entry tree and posting tree
Date: 2026-08-13 03:08:53
Message-ID: SY7PR01MB109210C8E9DEB6BF5FFEA7A81B6DB2@SY7PR01MB10921.ausprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi Kirill

Thanks for updating the patches.

On Mon, 03 Aug 2026 at 17:40, Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
> Hi all,
>
> I have rebased patches and did little polishing for error
> messages/overall style. Posting to see how new CI reacts & also bump
> thread.
>

Commit c456e391138 introduced an assertion Assert(tupleDesc->firstNonCachedOffsetAttr >= 0)
in nocache_index_getattr() to guarantee that TupleDescFinalize() has been invoked prior.
Patch v20260308-0002 overlooked this in gin_entrypage_items(), here is the trivial fix:

diff --git a/contrib/pageinspect/ginfuncs.c b/contrib/pageinspect/ginfuncs.c
index 8433ee507b6..b50807a251e 100644
--- a/contrib/pageinspect/ginfuncs.c
+++ b/contrib/pageinspect/ginfuncs.c
@@ -324,6 +324,8 @@ gin_entrypage_items(PG_FUNCTION_ARGS)
TupleDescInitEntryCollation(tmpTupdesc, (AttrNumber) 2,
attr->attcollation);

+ TupleDescFinalize(tmpTupdesc);
+
attrVal = index_getattr(idxtuple, OffsetNumberNext(FirstOffsetNumber),
tmpTupdesc,
&isnull);
>
> --
> Best regards,
> Kirill Reshke

--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message wenhui qiu 2026-08-13 03:31:00 Re: WAL compression setting after PostgreSQL LZ4 default change
Previous Message Bharath Rupireddy 2026-08-13 02:41:00 Re: Add a pg_wal_preallocate() SQL function to eagerly create future WAL segments