I have a constraint that ensures one of three columns is populated, and I'm adding a new column, so I'm replacing the old constraint with a four-column version. Since I know from the old constraint that one out of three columns must be populated, I can be sure that one out four will be populated and the new constraint is valid.
I know I can add it as NOT VALID
and later validate it concurrently, and that's the kosher thing to do, but it's a bit of a waste of time for Postgres to validate all 5 billion valid rows. Can I mark it as valid without checking all the rows again? Alternatively, is there any downside to leaving it invalid indefinitely?