pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Correctly mark pg_subscription.subslotname as nullable.
Date: Sun, 19 Jul 2020 16:37:38 +0000
Message-ID: <E1jxCJm-0006bI-G8@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1jxCJm-0006bI-G8@gemulon.postgresql.org>
Permalink:  ../E1jxCJm-0006bI-G8@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jxCJm-0006bI-G8@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Correctly mark pg_subscription.subslotname as nullable.
  In-Reply-To: <E1jxCJm-0006bI-G8@gemulon.postgresql.org>
  References: <E1jxCJm-0006bI-G8@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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