My postgres database “lives” in a Docker container FYI.
Same on my end (Tested with both 14 & 14.1)
I’ll do a quick sample database with multiple thousand of records to check if that’s related
I’ll update this response if I’m able to find something.
psql (14.4, server 11.17) => OK
psql (14.4, server 12.12) => KO
psql (14.4, server 13.8) => KO
psql (14.4, server 14.5) => KO
psql (14.4, server 15.0) => KO
So apparently even an upgrade to pg12 makes this very slow.
This is not linked to Docker too.
And I deleted all data from tables. Still KO with pg12+.
Deleted the schema, created a new schema with a dummy table, and here it is OK ().
So the database introspection with pg12+ doesn’t like something in our schema.
Would you like to have a dump of our schema? I can send it to your professional FA e-mail (there is no data inside)
Running this SQL query on any table of any version of pg of your dump gives me ~700ms/table.
Running this SQL query on another database on pg@12 I have on my end gives me ~10ms/table.
I’m still digging the differences, but I guess this could also be interesting to share.