agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Nathan Bossart <nathandbossart@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_stat_get_autovacuum_scores ignores the main table's reloptions for TOAST tables
Date: Fri, 28 Aug 2026 13:50:06 -0500
Message-ID: <apHYXnOIckxM37BQ@nathan> (raw)
In-Reply-To: <CAD21AoC4JF+YdptSLpJSqo8sytMSDiptg0p4i9H2+6PpqA+smg@mail.gmail.com>
References: <CAD21AoB1CJRVfCDh8qYuD3eueiygXxk7F3nybgjN0RZXSD-QUw@mail.gmail.com>
<apGJqfd2xyAcUGKZ@nathan>
<apGjEvo15Z5oKHEM@nathan>
<apGmOZeIlyW-Y1f6@nathan>
<CAD21AoC4JF+YdptSLpJSqo8sytMSDiptg0p4i9H2+6PpqA+smg@mail.gmail.com>
On Fri, Aug 28, 2026 at 11:12:34AM -0700, Masahiko Sawada wrote:
> Thank you for making the patch quickly! The patch looks good to me. A nitpick:
Thanks for reviewing.
> + if (found && hentry->ar_hasrelopts)
> + avopts = &hentry->ar_reloptions;
>
> ar_hasrelopts is always true here, since entries are only created when
> extract_autovac_opts() returns non-NULL, so the second conjunct is
> redundant actually. Having said that, it seems safer for future
> changes and keeping it for symmetry with do_autovacuum() seems fine to
> me.
Yeah, this is about what I was thinking.
> Do we want to have regression tests for it? FWIW no test exercises
> pg_stat_get_autovacuum_scores(). The only reference in the tree is the
> view definition in rules.out. That's presumably why this went
> unnoticed.
It might be worth adding a test or two for this view, but I doubt it
would've caught this issue. IIRC I held off adding tests originally
because I was worried about test stability.
--
nathan
view thread (8+ messages) latest in thread
Message-ID: <apHYXnOIckxM37BQ@nathan>
Permalink: ../apHYXnOIckxM37BQ@nathan/
Also on: postgresql.org/message-id/apHYXnOIckxM37BQ@nathan
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: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, sawada.mshk@gmail.com
Subject: Re: pg_stat_get_autovacuum_scores ignores the main table's reloptions for TOAST tables
In-Reply-To: <apHYXnOIckxM37BQ@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