public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: [email protected] <[email protected]>
Subject: Re: Autovacuum and visibility maps
Date: Tue, 3 Dec 2024 12:57:28 -0500
Message-ID: <CANzqJaC03VrGRJxU_c29YdX48byH1n71dGNRP7y21_dDjMJ5Ww@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <BN8PR04MB6289F7099F7B38E5B08D85B7D0362@BN8PR04MB6289.namprd04.prod.outlook.com>
	<[email protected]>

On Tue, Dec 3, 2024 at 11:57 AM Adrian Klaver <[email protected]>
wrote:
[snip]

>
> I have to believe it is due to this:
>
>
> https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-SPACE-RECOVERY
>
> "If you have a table whose entire contents are deleted on a periodic
> basis, consider doing it with TRUNCATE rather than using DELETE followed
> by VACUUM. TRUNCATE removes the entire content of the table immediately,
> without requiring a subsequent VACUUM or VACUUM FULL to reclaim the
> now-unused disk space. The disadvantage is that strict MVCC semantics
> are violated."
>
> Combined with this:
>
>
> https://www.postgresql.org/docs/current/runtime-config-autovacuum.html#GUC-AUTOVACUUM-VACUUM-INSERT-...
>
> "autovacuum_vacuum_threshold
>
> Specifies the minimum number of updated or deleted tuples needed to
> trigger a VACUUM in any one table. ...
>
> "
>
> I'm going to say the TRUNCATE itself does not trigger an autovacuum. I
> would suggest throwing a manual VACUUM in the table population script.
>

Shouldn't autovacuum_vacuum_insert_threshold kick off an autovacuum if
you're doing a lot of inserts?

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


view thread (3+ messages)

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Autovacuum and visibility maps
  In-Reply-To: <CANzqJaC03VrGRJxU_c29YdX48byH1n71dGNRP7y21_dDjMJ5Ww@mail.gmail.com>

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

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