public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jeremy Schneider <[email protected]>
To: Will Storey <[email protected]>
To: [email protected]
Subject: Re: Disabling vacuum truncate for autovacuum
Date: Thu, 26 Dec 2024 12:21:08 -0800
Message-ID: <20241226122108.33e906a3@jeremy-ThinkPad-T430s> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Mon, 16 Dec 2024 16:25:06 -0800
Will Storey <[email protected]> wrote:
> I would like to disable vacuum's truncate behaviour for autovacuum.
> Previously I had an outage due to its access exclusive lock when it
> was replicated to a hot standby.
>
> When that outage happened it was from a VACUUM call in a cronjob
> rather than autovacuum. I now run such VACUUMs with TRUNCATE false
> which avoids the issue for these. However I've realized that
> autovacuum could cause this as well. This is of interest to me
> because I'm looking at tuning autovacuum and getting rid of the
> cronjob, but I've realized relying on autovacuum could be dangerous
> because of the truncates.
Can you tell us a little bit more about the outage? Autovacuum is
designed to quickly relinquish this lock if there is any contention, and
the dangers of disabling autovacuum are significant, so your statement
about autovac being "dangerous" will raise a lot of eyebrows.
Did your outage involve hot standbys serving read-only traffic, or did
it only involve a read-write database?
What was the exact nature of the outage and how did you narrow down the
cause to the exclusive lock held specifically during an autovacuum
truncation?
-Jeremy
view thread (3+ messages) latest in thread
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], [email protected]
Subject: Re: Disabling vacuum truncate for autovacuum
In-Reply-To: <20241226122108.33e906a3@jeremy-ThinkPad-T430s>
* 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