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 <[email protected]> Reviewed-by: Raja Sai Pranav <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected] 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(-)
