public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: Robert Treat <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: Gurjeet Singh <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Will Storey <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Postgres Hackers <[email protected]>
Subject: Re: Disabling vacuum truncate for autovacuum
Date: Thu, 20 Mar 2025 16:31:33 -0500
Message-ID: <Z9yJNZ1C4TJfU-nY@nathan> (raw)
In-Reply-To: <CAKFQuwZJtw7Ojr=Z0xgA0G7BW6qSDkb0fMKgyaQULdOxHg_chA@mail.gmail.com>
References: <CABV9wwNagobmRMCxs0dKqWmKXaQTUQj+oOOTw=fsPAgbBfVhew@mail.gmail.com>
<Z9g8a4HGLUcSo96v@nathan>
<Z9ohFZtDaZnkch7u@nathan>
<[email protected]>
<Z9rlb0jgNLm8ULAB@nathan>
<Z9rsMX5ZOL5E0cQy@nathan>
<Z9wxuP1AY303wAxM@nathan>
<CAKFQuwYKtEUYKS+18gRs-xPhn0qOJgM2KGyyWVCODHuVn9F-XQ@mail.gmail.com>
<Z9xaroJSrS44HyKG@nathan>
<CAKFQuwZJtw7Ojr=Z0xgA0G7BW6qSDkb0fMKgyaQULdOxHg_chA@mail.gmail.com>
On Thu, Mar 20, 2025 at 02:18:33PM -0700, David G. Johnston wrote:
> So my concern about dump/restore seems to be alleviated but then, why can
> we not just do whatever pg_dump is doing to decide whether the current
> value for vacuum_truncate is its default (and thus would not be dumped) or
> not (and would be dumped)?
pg_dump looks at the pg_class.reloptions array directly. In the vacuum
code, we look at the pre-parsed rd_options (see RelationParseRelOptions()
in relcache.c), which will have already resolved vacuum_truncate to its
default value if it was not explicitly set. We could probably look at
pg_class.reloptions directly in the vacuum code if we _really_ wanted to,
but I felt that putting this information into rd_options was much cleaner.
--
nathan
view thread (5+ 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], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Disabling vacuum truncate for autovacuum
In-Reply-To: <Z9yJNZ1C4TJfU-nY@nathan>
* 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