On Mon, 5 Jan 2026 at 13:39, Andrey Borodin <[email protected]> wrote: > > > > > On 4 Jan 2026, at 00:25, Kirill Reshke <[email protected]> wrote: > > > > PFA v6 > > Would it be theoretically possible to unite functions for different GIN page > types? > e.g. merge gin_entrypage_items + gin_datapage_items -> gin_tree_items? Or is > it an awkward API? > > The patch adds whitespace errors. > x4mmm@x4mmm-osx postgres % git am > ~/Downloads/v6-0001-GIN-pageinspect-support-for-entry-tree-and-postin.patch > Applying: GIN pageinspect support for entry tree and posting tree internal > pages > .git/rebase-apply/patch:236: trailing whitespace. > .git/rebase-apply/patch:242: trailing whitespace. > .git/rebase-apply/patch:243: trailing whitespace. > .git/rebase-apply/patch:249: trailing whitespace. > .git/rebase-apply/patch:284: trailing whitespace. > warning: squelched 8 whitespace errors > warning: 13 lines add whitespace errors.
Thanks
v7 should not suffer from this.
> Docs build fail [0]:
> [08:01:48.343] pageinspect.sgml:775: parser error : Opening and ending tag
> mismatch: varlistentry line 722 and variablelist
> [08:01:48.343] </variablelist>
> [08:01:48.343] ^
> [08:01:48.343] pageinspect.sgml:776: parser error : Opening and ending tag
> mismatch: variablelist line 637 and sect2
> [08:01:48.343] </sect2>
> [08:01:48.343] ^
> [08:01:48.343] pageinspect.sgml:1016: parser error : Opening and ending tag
> mismatch: sect2 line 634 and sect1
> [08:01:48.343] </sect1>
> [08:01:48.343] ^
> [08:01:48.343] pageinspect.sgml:1017: parser error : Premature end of data in
> tag sect1 line 3
> [08:01:48.343]
> [08:01:48.343] ^
> [08:01:48.343] pageinspect.sgml:1017: parser error : chunk is not well
> balanced
> [08:01:48.343]
> [08:01:48.343] ^
> [08:01:48.343] contrib.sgml:152: parser error : Entity 'pageinspect' failed
> to parse
> [08:01:48.343] &pageinspect;
> [08:01:48.343] ^
> [08:01:48.343] contrib.sgml:239: parser error : chunk is not well balanced
> [08:01:48.343]
> [08:01:48.343] ^
> [08:01:48.344] postgres.sgml:279: parser error : Entity 'contrib' failed to
> parse
> [08:01:48.344] &contrib;
In v7 this is fixed, I believe, (/varlistentry was missing)
> And 32-bit build fail [1]:
> SELECT * FROM gin_entrypage_items(get_raw_page('test1_y_idx', 1),
> 'test1_y_idx'::regclass);
> -[ RECORD 1 ]--------------
> itemoffset | 1
> -downlink | (2147483664,1)
> +downlink | (2147483660,1)
> tids | {"(0,1)"}
> keys | y=11
> -[ RECORD 2 ]--------------
> itemoffset | 2
> -downlink | (2147483664,1)
> +downlink | (2147483660,1)
> tids | {"(0,1)"}
> keys | y=111
>
>
> Thanks!
>
>
> Best regards, Andrey Borodin.
>
> [0] https://github.com/x4m/postgres_g/runs/59444268144
> [1] https://cirrus-ci.com/task/6255878661210112
This is because GIN on-disk format is platform-dependent, see [0]. We
align the offset where to start the Compressed GIN tuples list, that's
where the difference comes from. So, GinSetPostingOffset(itup,
newsize) on line 93 sets offset to 12 | GIN_ITUP_COMPRESSED on 32 bit
and 16 | GIN_ITUP_COMPRESSED on 64-bit. I added alternative regression
output gin_1.out to v7.
PFA v7.
[0]
https://github.com/postgres/postgres/blob/master/src/backend/access/gin/ginentrypage.c#L91
--
Best regards,
Kirill Reshke
v7-0001-GIN-pageinspect-support-for-entry-tree-and-postin.patch
Description: Binary data
