Postgresql errors at startup

I upgraded the postgresql jar from postgresql-42.2.5.jar postgresql-42.7.10.jar and now I get a bunch of errors at startup like this:

SQL Exception while executing the following SQL [ALTER TABLE SUBSCRIPTION_DELIVERY ADD CONSTRAINT SubscriptionDeliveryCommunicationEvent FOREIGN KEY (COMMUNICATION_EVENT_ID) REFERENCES COMMUNICATION_EVENT (COMMUNICATION_EVENT_ID)]: org.postgresql.util.PSQLException: ERROR: constraint "subscriptiondeliverycommunicationevent" for relation "subscription_delivery" already exists

Functionally this is not a problem. It just warns that the relations already exists. I guess Moqui is trying to create missing tables and relations at startup. But it’s still a bit of annoyance, as it pollutes the sentry logs and I get false alerts. Do you get the same errors at startup? Did you find some ways to get rid of them?

Yeah it seems to be a problem introduced by the postgres driver on v4.7.5 PR. I think we need to fix EntityDbMeta.groovy to overcome this breaking change, or we may need to file a bug report. Needs more investigation.