pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Correctly mark pg_subscription.subslotname as nullable.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Correctly mark pg_subscription.subslotname as nullable.
@ 2020-07-19 16:37  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

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

Correctly mark pg_subscription.subslotname as nullable.

Due to the layout of this catalog, subslotname has to be explicitly
marked BKI_FORCE_NULL, else initdb will default to the assumption
that it's non-nullable.  Since, in fact, CREATE/ALTER SUBSCRIPTION
will store null values there, the existing marking is just wrong,
and has been since this catalog was invented.

We haven't noticed because not much in the system actually depends
on attnotnull being truthful.  However, JIT'ed tuple deconstruction
does depend on that in some cases, allowing crashes or wrong answers
in queries that inspect pg_subscription.  Commit 9de77b545 quite
accidentally exposed this on the buildfarm members that force JIT
activation.

Back-patch to v13.  The problem goes further back, but we cannot
force initdb in released branches, so some klugier solution will
be needed there.  Before working on that, push this simple fix
to try to get the buildfarm back to green.

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/914d2383ae91918b359311a90d23c0d5862781ac

Modified Files
--------------
doc/src/sgml/catalogs.sgml                 | 5 +++--
src/include/catalog/catversion.h           | 2 +-
src/include/catalog/pg_subscription.h      | 2 +-
src/test/regress/expected/subscription.out | 7 +++++++
src/test/regress/sql/subscription.sql      | 2 ++
5 files changed, 14 insertions(+), 4 deletions(-)



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

* pgsql: Correctly mark pg_subscription.subslotname as nullable.
@ 2020-07-19 16:37  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

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

Correctly mark pg_subscription.subslotname as nullable.

Due to the layout of this catalog, subslotname has to be explicitly
marked BKI_FORCE_NULL, else initdb will default to the assumption
that it's non-nullable.  Since, in fact, CREATE/ALTER SUBSCRIPTION
will store null values there, the existing marking is just wrong,
and has been since this catalog was invented.

We haven't noticed because not much in the system actually depends
on attnotnull being truthful.  However, JIT'ed tuple deconstruction
does depend on that in some cases, allowing crashes or wrong answers
in queries that inspect pg_subscription.  Commit 9de77b545 quite
accidentally exposed this on the buildfarm members that force JIT
activation.

Back-patch to v13.  The problem goes further back, but we cannot
force initdb in released branches, so some klugier solution will
be needed there.  Before working on that, push this simple fix
to try to get the buildfarm back to green.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/72eab84a565cbc0677bf8907cd4bfaddf064bd64

Modified Files
--------------
doc/src/sgml/catalogs.sgml            | 3 ++-
src/include/catalog/catversion.h      | 2 +-
src/include/catalog/pg_subscription.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)



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


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

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19 16:37 pgsql: Correctly mark pg_subscription.subslotname as nullable. Tom Lane <tgl@sss.pgh.pa.us>
2020-07-19 16:37 pgsql: Correctly mark pg_subscription.subslotname as nullable. 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