pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marcin Barczynski <mbarczynski@starfishstorage.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Establishing a local connection to PostgreSQL 9.6 takes seconds
Date: Wed, 16 Jun 2021 10:55:13 -0400
Message-ID: <648424.1623855313@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOhG4weUaCADCMBw_26kNPp5n0_dMsjA02UxGBbnPoaHxocUEA@mail.gmail.com>
References: <CAOhG4wdds=GsnrOK83Fgw2WZQaR7ziF6P5zb-eZ6xogfpAyhTw@mail.gmail.com>
	<646103.1623852611@sss.pgh.pa.us>
	<CAOhG4weUaCADCMBw_26kNPp5n0_dMsjA02UxGBbnPoaHxocUEA@mail.gmail.com>

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





view thread (4+ messages)

Message-ID: <648424.1623855313@sss.pgh.pa.us>
Permalink:  ../648424.1623855313@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/648424.1623855313@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mbarczynski@starfishstorage.com
  Subject: Re: Establishing a local connection to PostgreSQL 9.6 takes seconds
  In-Reply-To: <648424.1623855313@sss.pgh.pa.us>
  References: <CAOhG4wdds=GsnrOK83Fgw2WZQaR7ziF6P5zb-eZ6xogfpAyhTw@mail.gmail.com> <646103.1623852611@sss.pgh.pa.us> <CAOhG4weUaCADCMBw_26kNPp5n0_dMsjA02UxGBbnPoaHxocUEA@mail.gmail.com> <648424.1623855313@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox