Whereas the test which checks if a table exists takes into account the schema with Oracle, nothing is done with PostgreSQL.
The request is to add some code to retrieve the current schema set in the DB connection URL and use it in
metaData.getTables(null, schemaName, ...
Configuration to observe the issue:
nuxeo.db.schema=xxx
nuxeo.db.jdbc.url=jdbc:postgresql://${nuxeo.db.host}:${nuxeo.db.port}/${nuxeo.db.name}?currentSchema=${nuxeo.db.schema}
and if Nuxeo has already been started in another schema of the same database.