Re: Establishing a local connection to PostgreSQL 9.6 takes seconds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marcin Barczynski <mbarczynski(at)starfishstorage(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Establishing a local connection to PostgreSQL 9.6 takes seconds
Date: 2021-06-16 14:55:13
Message-ID: 648424.1623855313@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marcin Barczynski <mbarczynski(at)starfishstorage(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martin Mueller 2021-06-16 15:02:25 A simple question about text fields
Previous Message Marcin Barczynski 2021-06-16 14:47:33 Re: Establishing a local connection to PostgreSQL 9.6 takes seconds