Re: [WIP]Vertical Clustered Index (columnar store extension) - take2

From: Timur Magomedov <t(dot)magomedov(at)postgrespro(dot)ru>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, "Aya Iwata (Fujitsu)" <iwata(dot)aya(at)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [WIP]Vertical Clustered Index (columnar store extension) - take2
Date: 2025-06-19 18:09:27
Message-ID: 6a6058fc089f89561b2545f024953e4daa0b8561.camel@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2025-06-19 at 14:14 +1000, Peter Smith wrote:
> Here are the v8 patches. The main changes are as follows:
>
> v8-0001 VCI - changes to postgres core
> - same
>
> v8-0002 VCI module - main
> - extracted "compression" related code from this main patch
> - applied Timur's top-up patch [1] re "session_preload_libraries"
> - removed some dead code
>
> v8-0003 VCI module - documentation
> - removed mentions about compression

Hello Peter!

Thank you for working on VCI updates.
Here are some proposals for small improvements:

Since hothash feature lives in separate patch now, vci_hothash.o should
be removed from vci/executor/Makefile of VCI-module-main patch.

0001-Avoid-magic-numbers-in-vci_is_supported_type.patch
I've looked at vci_supported_types.c and tried to rewrite it without
using magic constants. Removed call to vci_check_supported_types() from
SQL code since there is no need now to check that OID constants still
match same types.
Using defined constants for OIDs seems more robust than plain numbers.
There were 23 type OIDs supported by VCI, all of them are there in a
new version of code. I've replaced binary search by simple switch-case
since compilers optimize it into nice binary decision tree. Previous
version was binary searching among 87 structs. New version only
searches among 23 integers.

0002-Updated-supported-funcs-SQL-for-recent-PostgreSQL.patch
I wonder if it is possible to rewrite vci_supported_funcs.c in a
similar way. There is a vci_supported_funcs.sql which I updated so it
can be executed at master version of PostgreSQL.
I don't know if it is intentional, but safe_types list from
vci_supported_funcs.sql have some differences to the types list from
vci_supported_types.c. Specifically, it doesn't include varchar, varbit
and uuid.

--
Regards,
Timur Magomedov

Attachment Content-Type Size
0001-Avoid-magic-numbers-in-vci_is_supported_type.patch text/x-patch 8.8 KB
0002-Updated-supported-funcs-SQL-for-recent-PostgreSQL.patch text/x-patch 2.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Arseniy Mukhin 2025-06-19 18:32:54 Re: amcheck support for BRIN indexes
Previous Message Jeff Davis 2025-06-19 17:41:57 Re: Improve the performance of Unicode Normalization Forms.