pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Assert that we don't insert nulls into attnotnull catalog column 5+ messages / 1 participants [nested] [flat]
* pgsql: Assert that we don't insert nulls into attnotnull catalog column @ 2020-07-21 16:38 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-07-21 16:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Assert that we don't insert nulls into attnotnull catalog columns. The executor checks for this error, and so does the bootstrap catalog loader, but we never checked for it in retail catalog manipulations. The folly of that has now been exposed, so let's add assertions checking it. Checking in CatalogTupleInsert[WithInfo] and CatalogTupleUpdate[WithInfo] should be enough to cover this. Back-patch to v10; the aforesaid functions didn't exist before that, and it didn't seem worth adapting the patch to the oldest branches. But given the risk of JIT crashes, I think we certainly need this as far back as v11. Pre-v13, we have to explicitly exclude pg_subscription.subslotname and pg_subscription_rel.srsublsn from the checks, since they are mismarked. (Even if we change our mind about applying BKI_FORCE_NULL in the branch tips, it doesn't seem wise to have assertions that would fire in existing databases.) Discussion: https://postgr.es/m/298837.1595196283@sss.pgh.pa.us Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f451029db85acc9dd9856715e5490ade59fda229 Modified Files -------------- doc/src/sgml/bki.sgml | 5 +--- src/backend/catalog/indexing.c | 57 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Assert that we don't insert nulls into attnotnull catalog column @ 2020-07-21 16:38 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-07-21 16:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Assert that we don't insert nulls into attnotnull catalog columns. The executor checks for this error, and so does the bootstrap catalog loader, but we never checked for it in retail catalog manipulations. The folly of that has now been exposed, so let's add assertions checking it. Checking in CatalogTupleInsert[WithInfo] and CatalogTupleUpdate[WithInfo] should be enough to cover this. Back-patch to v10; the aforesaid functions didn't exist before that, and it didn't seem worth adapting the patch to the oldest branches. But given the risk of JIT crashes, I think we certainly need this as far back as v11. Pre-v13, we have to explicitly exclude pg_subscription.subslotname and pg_subscription_rel.srsublsn from the checks, since they are mismarked. (Even if we change our mind about applying BKI_FORCE_NULL in the branch tips, it doesn't seem wise to have assertions that would fire in existing databases.) Discussion: https://postgr.es/m/298837.1595196283@sss.pgh.pa.us Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/43ef3c4c360a10226732b62ab3b2097cdf089dce Modified Files -------------- doc/src/sgml/bki.sgml | 5 +--- src/backend/catalog/indexing.c | 57 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Assert that we don't insert nulls into attnotnull catalog column @ 2020-07-21 16:38 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-07-21 16:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Assert that we don't insert nulls into attnotnull catalog columns. The executor checks for this error, and so does the bootstrap catalog loader, but we never checked for it in retail catalog manipulations. The folly of that has now been exposed, so let's add assertions checking it. Checking in CatalogTupleInsert[WithInfo] and CatalogTupleUpdate[WithInfo] should be enough to cover this. Back-patch to v10; the aforesaid functions didn't exist before that, and it didn't seem worth adapting the patch to the oldest branches. But given the risk of JIT crashes, I think we certainly need this as far back as v11. Pre-v13, we have to explicitly exclude pg_subscription.subslotname and pg_subscription_rel.srsublsn from the checks, since they are mismarked. (Even if we change our mind about applying BKI_FORCE_NULL in the branch tips, it doesn't seem wise to have assertions that would fire in existing databases.) Discussion: https://postgr.es/m/298837.1595196283@sss.pgh.pa.us Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bca409e5b160f81ccd980bef2aeb32f8b731b0fd Modified Files -------------- doc/src/sgml/bki.sgml | 5 +---- src/backend/catalog/indexing.c | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Assert that we don't insert nulls into attnotnull catalog column @ 2020-07-21 16:38 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-07-21 16:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Assert that we don't insert nulls into attnotnull catalog columns. The executor checks for this error, and so does the bootstrap catalog loader, but we never checked for it in retail catalog manipulations. The folly of that has now been exposed, so let's add assertions checking it. Checking in CatalogTupleInsert[WithInfo] and CatalogTupleUpdate[WithInfo] should be enough to cover this. Back-patch to v10; the aforesaid functions didn't exist before that, and it didn't seem worth adapting the patch to the oldest branches. But given the risk of JIT crashes, I think we certainly need this as far back as v11. Pre-v13, we have to explicitly exclude pg_subscription.subslotname and pg_subscription_rel.srsublsn from the checks, since they are mismarked. (Even if we change our mind about applying BKI_FORCE_NULL in the branch tips, it doesn't seem wise to have assertions that would fire in existing databases.) Discussion: https://postgr.es/m/298837.1595196283@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3e66019f15549d3e1e13da665b2549684061d630 Modified Files -------------- doc/src/sgml/bki.sgml | 5 +---- src/backend/catalog/indexing.c | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Assert that we don't insert nulls into attnotnull catalog column @ 2020-07-21 16:38 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2020-07-21 16:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Assert that we don't insert nulls into attnotnull catalog columns. The executor checks for this error, and so does the bootstrap catalog loader, but we never checked for it in retail catalog manipulations. The folly of that has now been exposed, so let's add assertions checking it. Checking in CatalogTupleInsert[WithInfo] and CatalogTupleUpdate[WithInfo] should be enough to cover this. Back-patch to v10; the aforesaid functions didn't exist before that, and it didn't seem worth adapting the patch to the oldest branches. But given the risk of JIT crashes, I think we certainly need this as far back as v11. Pre-v13, we have to explicitly exclude pg_subscription.subslotname and pg_subscription_rel.srsublsn from the checks, since they are mismarked. (Even if we change our mind about applying BKI_FORCE_NULL in the branch tips, it doesn't seem wise to have assertions that would fire in existing databases.) Discussion: https://postgr.es/m/298837.1595196283@sss.pgh.pa.us Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fb71329ad6fcd81dd3fcfb1f21308ccb64f7a834 Modified Files -------------- src/backend/catalog/indexing.c | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-07-21 16:38 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-07-21 16:38 pgsql: Assert that we don't insert nulls into attnotnull catalog column Tom Lane <tgl@sss.pgh.pa.us> 2020-07-21 16:38 pgsql: Assert that we don't insert nulls into attnotnull catalog column Tom Lane <tgl@sss.pgh.pa.us> 2020-07-21 16:38 pgsql: Assert that we don't insert nulls into attnotnull catalog column Tom Lane <tgl@sss.pgh.pa.us> 2020-07-21 16:38 pgsql: Assert that we don't insert nulls into attnotnull catalog column Tom Lane <tgl@sss.pgh.pa.us> 2020-07-21 16:38 pgsql: Assert that we don't insert nulls into attnotnull catalog column 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