practical effect of not validating FKs in Postgres? I need to add a foreign key definition to a very large table in Postgres.  (Let's assume for the moment that I'm positive that every FK value is actually valid.)
I know that I can specify NOT VALID in order to prevent Postgres from taking aggressive locks on the table while validating the foreign key.  Then I can go back &quot;at leisure&quot; and run VALIDATE CONSTRAINT as a cleanup.
What if I never bothered going back to run VALIDATE CONSTRAINT?  Is there any practical effect of not doing so?
It is conceivable that the planner could use valid foreign key constraints to optimize query plans.  I don't think that it does that today, though. I know people had been working on such things, but I don't think anything has been accepted into released code, or is likely to be in the near future.