Re: Establishing a local connection to PostgreSQL 9.6 takes seconds - Mailing list pgsql-general

From Tom Lane
Subject Re: Establishing a local connection to PostgreSQL 9.6 takes seconds
Date
Msg-id 648424.1623855313@sss.pgh.pa.us
Whole thread Raw
In response to Re: Establishing a local connection to PostgreSQL 9.6 takes seconds  (Marcin Barczynski <mbarczynski@starfishstorage.com>)
List pgsql-general
Marcin Barczynski <mbarczynski@starfishstorage.com> 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 won't be enough to get rid of the existing problem;
you'll likely need to do a VACUUM FULL on it to remove the bloat.
But autovac ought to be able to keep up with things in future,
if tuned right.

My guess is that pg_class has also got a bloat problem, though
perhaps not as severe.

            regards, tom lane



pgsql-general by date:

Previous
From: Marcin Barczynski
Date:
Subject: Re: Establishing a local connection to PostgreSQL 9.6 takes seconds
Next
From: Martin Mueller
Date:
Subject: A simple question about text fields