Query stuck in mattermost postgresql communication
The query has already ended 9 minutes ago. PostgreSQL is sitting idle and waiting for the next statement on this connection, which isn't coming.

The block must be somewhere else in your startup process.