| From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: pg_upgrade: Don't run the not-null inheritance check on v18 clus |
| Date: | 2026-11-26 11:50:14 |
| Message-ID: | E1xWXzS-00000000OKX-2xpF@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reviewed-by: Raja Sai Pranav <rajasaipranav0(at)gmail(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2026-11-26 12:33:40 | pgsql: Fix losing a sinval catchup signal that arrives during catchup |
| Previous Message | Álvaro Herrera | 2026-11-26 10:55:47 | pgsql: Remove OldHeap argument from build_new_indexes() |