Avoid unnecessary GinFormTuple() calls for incompressible posting lists.
Masahiko Sawada <msawada@postgresql.org>
Author:
Masahiko Sawada <msawada@postgresql.org>
Date: 2025-10-06T21:02:01Z
Releases:
19 (unreleased)
Avoid unnecessary GinFormTuple() calls for incompressible posting lists. Previously, we attempted to form a posting list tuple even when ginCompressPostingList() failed to compress the posting list due to its size. While there was no functional failure, it always wasted one GinFormTuple() call when item pointers didn't fit in a posting list tuple. This commit ensures that a GIN index tuple is formed only when all item pointers in the posting list are successfully compressed. Author: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CAE7r3M+C=jcpTD93f_RBHrQp3C+=TAXFs+k4tTuZuuxboK8AvA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/gin/gininsert.c | modified | +13 −9 |
Discussion
- GIN tries to form a tuple with a partial compressedList during insertion 6 messages · 2025-04-30 → 2025-10-07