information_schema query not working in PostgreSQL version 17 - Mailing list pgsql-bugs

From Jorge Campins
Subject information_schema query not working in PostgreSQL version 17
Date
Msg-id CAN6-wfK7fVS5tpN_zro75rCYX41eZZ1DMiTcX5aYvRxEGypLMw@mail.gmail.com
Whole thread Raw
List pgsql-bugs
Dears Sirs,

You will find attached 2 sql files:
  • select-for-version-16-or-lower.sql
  • select-for-version-17
Both queries return the same result; I've been using the select-for-version-16-or-under query since a few versions ago. Since upgrading to version 17, it doesn't work with a database with many defined constraints. By many, I mean:
  • 9104 rows in table_constraints
  • 2592 rows in referential_constraints
  • 4476 rows in key_column_usage
The original query never completes in version 17; I tried several times and always canceled it after 30 minutes. To make it work in version 17, I had to add redundant search criteria. You can understand what I mean by comparing the attached files. The original query runs in approximately 45 seconds on version 16; the version 17 query runs in approximately 68 seconds, using the same data.

I have never reported an iissue for PostgreSQL before. Ihope this is the proper way to do it.

Regardse,

Jorge Campins
Attachment

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg16 ALTER ROLE [NO]INHERIT has no effect on existing grants
Next
From: PG Bug reporting form
Date:
Subject: BUG #18929: After the view is created, executed query against the view definition, reported syntax error.