pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Kluge slot_compile_deform() to ignore incorrect attnotnull marki
2+ messages / 1 participants
[nested] [flat]

* pgsql: Kluge slot_compile_deform() to ignore incorrect attnotnull marki
@ 2020-07-20 19:54  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-07-20 19:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Kluge slot_compile_deform() to ignore incorrect attnotnull markings.

Since we mustn't force an initdb in released branches, there is no
simple way to correct the markings of pg_subscription.subslotname
and pg_subscription_rel.srsublsn as attnotnull in existing pre-v13
installations.

Fortunately, released branches don't rely on attnotnull being correct
for much.  The planner looks at it in relation_excluded_by_constraints,
but it'd be difficult to get that to matter for a query on a system
catalog.  The only place where it's really problematic is in JIT's
slot_compile_deform(), which can produce incorrect code that crashes
if there are NULLs in an allegedly not-null column.

Hence, hack up slot_compile_deform() to be specifically aware of
these two incorrect markings and not trust them.

This applies to v11 and v12; the JIT code didn't exist before that,
and we've fixed the markings in v13.

Discussion: https://postgr.es/m/229396.1595191345@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/798b4faefd205a8527afb82c9a87a419d2e06098

Modified Files
--------------
src/backend/jit/llvm/llvmjit_deform.c      | 24 ++++++++++++++++++++----
src/test/regress/expected/subscription.out |  7 +++++++
src/test/regress/sql/subscription.sql      |  2 ++
3 files changed, 29 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Kluge slot_compile_deform() to ignore incorrect attnotnull marki
@ 2020-07-20 19:54  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-07-20 19:54 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Kluge slot_compile_deform() to ignore incorrect attnotnull markings.

Since we mustn't force an initdb in released branches, there is no
simple way to correct the markings of pg_subscription.subslotname
and pg_subscription_rel.srsublsn as attnotnull in existing pre-v13
installations.

Fortunately, released branches don't rely on attnotnull being correct
for much.  The planner looks at it in relation_excluded_by_constraints,
but it'd be difficult to get that to matter for a query on a system
catalog.  The only place where it's really problematic is in JIT's
slot_compile_deform(), which can produce incorrect code that crashes
if there are NULLs in an allegedly not-null column.

Hence, hack up slot_compile_deform() to be specifically aware of
these two incorrect markings and not trust them.

This applies to v11 and v12; the JIT code didn't exist before that,
and we've fixed the markings in v13.

Discussion: https://postgr.es/m/229396.1595191345@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/855195a7ba9875648f958c42aba91ad382e82edd

Modified Files
--------------
src/backend/jit/llvm/llvmjit_deform.c      | 24 ++++++++++++++++++++----
src/test/regress/expected/subscription.out |  7 +++++++
src/test/regress/sql/subscription.sql      |  2 ++
3 files changed, 29 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-07-20 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 19:54 pgsql: Kluge slot_compile_deform() to ignore incorrect attnotnull marki Tom Lane <tgl@sss.pgh.pa.us>
2020-07-20 19:54 pgsql: Kluge slot_compile_deform() to ignore incorrect attnotnull marki Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox