pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: pg_upgrade: Don't run the not-null inheritance check on v18 clus 3+ messages / 1 participants [nested] [flat]
* pgsql: pg_upgrade: Don't run the not-null inheritance check on v18 clus @ 2026-11-26 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 3+ messages in thread From: Heikki Linnakangas @ 2026-11-26 11:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_upgrade: Don't run the not-null inheritance check on v18 clusters check_for_not_null_inheritance() checks for the situation that a column in a parent table has a not-null constraint, but the corresponding column in a child table does not. That can no longer happen on v18 (since commit 14e87ffa5c5), but because of a mistake in the version guard, we ran the check unnecessarily on a v18 source cluster, too. You would think that's harmless, but starting with version 18, you can have a not-null constraint marked as NO INHERIT on the parent, which the check query didn't take into account. Such constraints would trip the check query, preventing the upgrade unnecessarily. Bug: #19928 Reported-by: Alexander Lakhin <exclusion@gmail.com> Reviewed-by: Raja Sai Pranav <rajasaipranav0@gmail.com> Discussion: https://www.postgresql.org/message-id/19928-c3f1f0dc1c0a44e9@postgresql.org Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/388f2db2994e216f15f004c4addbe4851871f954 Modified Files -------------- src/bin/pg_upgrade/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: pg_upgrade: Don't run the not-null inheritance check on v18 clus @ 2026-11-26 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 3+ messages in thread From: Heikki Linnakangas @ 2026-11-26 11:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_upgrade: Don't run the not-null inheritance check on v18 clusters check_for_not_null_inheritance() checks for the situation that a column in a parent table has a not-null constraint, but the corresponding column in a child table does not. That can no longer happen on v18 (since commit 14e87ffa5c5), but because of a mistake in the version guard, we ran the check unnecessarily on a v18 source cluster, too. You would think that's harmless, but starting with version 18, you can have a not-null constraint marked as NO INHERIT on the parent, which the check query didn't take into account. Such constraints would trip the check query, preventing the upgrade unnecessarily. Bug: #19928 Reported-by: Alexander Lakhin <exclusion@gmail.com> Reviewed-by: Raja Sai Pranav <rajasaipranav0@gmail.com> Discussion: https://www.postgresql.org/message-id/19928-c3f1f0dc1c0a44e9@postgresql.org Backpatch-through: 18 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c224480faebcfc557ed4405fd6c7d12e1f4840f7 Modified Files -------------- src/bin/pg_upgrade/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: pg_upgrade: Don't run the not-null inheritance check on v18 clus @ 2026-11-26 11:50 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 3+ messages in thread From: Heikki Linnakangas @ 2026-11-26 11:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_upgrade: Don't run the not-null inheritance check on v18 clusters check_for_not_null_inheritance() checks for the situation that a column in a parent table has a not-null constraint, but the corresponding column in a child table does not. That can no longer happen on v18 (since commit 14e87ffa5c5), but because of a mistake in the version guard, we ran the check unnecessarily on a v18 source cluster, too. You would think that's harmless, but starting with version 18, you can have a not-null constraint marked as NO INHERIT on the parent, which the check query didn't take into account. Such constraints would trip the check query, preventing the upgrade unnecessarily. Bug: #19928 Reported-by: Alexander Lakhin <exclusion@gmail.com> Reviewed-by: Raja Sai Pranav <rajasaipranav0@gmail.com> Discussion: https://www.postgresql.org/message-id/19928-c3f1f0dc1c0a44e9@postgresql.org Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/85c6640afd7502fa01f6e0877695118dc1e5fa62 Modified Files -------------- src/bin/pg_upgrade/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-11-26 11:50 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-26 11:50 pgsql: pg_upgrade: Don't run the not-null inheritance check on v18 clus Heikki Linnakangas <heikki.linnakangas@iki.fi> 2026-11-26 11:50 pgsql: pg_upgrade: Don't run the not-null inheritance check on v18 clus Heikki Linnakangas <heikki.linnakangas@iki.fi> 2026-11-26 11:50 pgsql: pg_upgrade: Don't run the not-null inheritance check on v18 clus Heikki Linnakangas <heikki.linnakangas@iki.fi>
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