Re: Establishing a local connection to PostgreSQL 9.6 takes seconds

2021-06-16 Thread Tom Lane
Marcin Barczynski writes: > It turned out to be pg_attribute. It was bloated probably due to the large > number of temp tables created. > Are there any recommendations on how to prevent such a bloat from happening? You could perhaps apply more aggressive autovacuum settings to that catalog. That

Re: Establishing a local connection to PostgreSQL 9.6 takes seconds

2021-06-16 Thread Marcin Barczynski
Thanks for the immediate reply. It turned out to be pg_attribute. It was bloated probably due to the large number of temp tables created. Are there any recommendations on how to prevent such a bloat from happening? On Wed, Jun 16, 2021 at 4:10 PM Tom Lane wrote: > Marcin Barczynski writes: > >

Re: Establishing a local connection to PostgreSQL 9.6 takes seconds

2021-06-16 Thread Tom Lane
Marcin Barczynski writes: > It's always /opt/prod/pg/9.6/base/18370/1108887031. Unfortunately, no trace > of it in pg_class: It's probably a mapped system catalog, which will have relfilenode = 0. Try SELECT relname FROM pg_class WHERE pg_relation_filenode(oid) = 1108887031; My guess is that wh