citus/src
Jelte Fennema-Nio f711dfe8ae Greatly speed up "\d tablename" on servers with many tables
We introduce a filter to every query on pg_class to automatically remove
shards. This is useful to make sure \d and PgAdmin are not cluttered
with shards. However, the way we were introducing this filter was using
`securityQuals` which can have negative impact on query performance.

On clusters with 100k+ tables this could cause a simple "\d tablename"
command to take multiple seconds, because a skipped optimization by
Postgres causes a full table scan. This changes the code to introduce
this filter in the regular `quals` list instead of in `securityQuals`.
Which causes Postgres to use the intended optimization again.

For reference this was initially reported as a Postgres issue by me:
https://www.postgresql.org/message-id/flat/4189982.1712785863%40sss.pgh.pa.us#b87421293b362d581ea8677e3bfea920
2024-04-15 10:37:07 +02:00
..
backend Greatly speed up "\d tablename" on servers with many tables 2024-04-15 10:37:07 +02:00
include Fix crash caused by some form of ALTER TABLE ADD COLUMN statements. (#7522) 2024-03-20 11:06:05 +03:00
test Use expecteddir option when running vanilla tests (#7573) 2024-04-10 16:08:54 +00:00