agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Update JIT tuple deforming code for virtual generated columns 2+ messages / 1 participants [nested] [flat]
* pgsql: Update JIT tuple deforming code for virtual generated columns @ 2026-06-19 03:26 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: David Rowley @ 2026-06-19 03:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Update JIT tuple deforming code for virtual generated columns The JIT deforming code contains an optimization that determines which columns are guaranteed to exist in the tuple. That's used to allow skipping of reading the tuple's natts when the code only needs to deform attributes that are guaranteed to always exist in all tuples. 83ea6c540 missed updating this code to account for VIRTUAL generated columns. These are stored as NULLs in the tuple, but may be defined as NOT NULL. This could result in the code thinking more columns are guaranteed to exist than actually do. Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Backpatch-through: 18 Discussion: https://postgr.es/m/1151393.1781734980@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/dc5116780846951a409d788479a9e9fa6edd9f07 Modified Files -------------- src/backend/jit/llvm/llvmjit_deform.c | 36 ++++++++++++++++--------- src/test/regress/expected/generated_stored.out | 14 ++++++++++ src/test/regress/expected/generated_virtual.out | 32 ++++++++++++++++++++++ src/test/regress/sql/generated_stored.sql | 14 ++++++++++ src/test/regress/sql/generated_virtual.sql | 15 +++++++++++ 5 files changed, 99 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Update JIT tuple deforming code for virtual generated columns @ 2026-06-19 03:27 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: David Rowley @ 2026-06-19 03:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Update JIT tuple deforming code for virtual generated columns The JIT deforming code contains an optimization that determines which columns are guaranteed to exist in the tuple. That's used to allow skipping of reading the tuple's natts when the code only needs to deform attributes that are guaranteed to always exist in all tuples. 83ea6c540 missed updating this code to account for VIRTUAL generated columns. These are stored as NULLs in the tuple, but may be defined as NOT NULL. This could result in the code thinking more columns are guaranteed to exist than actually do. Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Backpatch-through: 18 Discussion: https://postgr.es/m/1151393.1781734980@sss.pgh.pa.us Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e9692de1d6f617031be73251949eae31b29275bd Modified Files -------------- src/backend/jit/llvm/llvmjit_deform.c | 36 ++++++++++++++------- src/test/regress/expected/generated_virtual.out | 42 +++++++++++++++++++++++++ src/test/regress/sql/generated_virtual.sql | 21 +++++++++++++ 3 files changed, 87 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-06-19 03:27 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-06-19 03:26 pgsql: Update JIT tuple deforming code for virtual generated columns David Rowley <drowley@postgresql.org> 2026-06-19 03:27 pgsql: Update JIT tuple deforming code for virtual generated columns David Rowley <drowley@postgresql.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox