| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
|---|---|
| To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
| Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nikolay Samokhvalov <nik(at)postgres(dot)ai>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: autovacuum: automatically propagate updated parameters |
| Date: | 2026-09-28 13:13:41 |
| Message-ID: | 9424AE68-1EB8-42CF-99B9-15BDC68ED826@yesql.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
> On 26 Sep 2026, at 06:37, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> On Fri, Sep 25, 2026 at 5:32 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>> As for the 0001 patch, it looks good to me.
Agreed, +1 pn 0001.
> Please find the attached v4 patches. 0002 remains the same.
Regarding 0002, ISTM that it will be stable but we could also just commit to
master and hold off on REL_19_STABLE for now. Once proven it can be back-
patched even post GA as it is test-only. That could give us more time while
reducing the risk of unstable tests this very late in the cycle. A few small
comments on 0002:
+ if (pvs->shared->is_autovacuum)
+ INJECTION_POINT("parallel-autovacuum-leader-before-index", NULL);
I think our common coding pattern is to wrap constructions like this (and many
more in the patch) in #ifdef USE_INJECTION_POINTS.
+$node->poll_query_until(
+ 'postgres', q{
+ SELECT count(*) = 0 FROM pg_stat_activity
+ WHERE backend_type = 'autovacuum worker' AND datname = 'regress_db2'
+}) or die "second autovacuum worker did not finish";
I'm not a fan of tests that die() when the condition fails rather than report a
test failure.
+$node->wait_for_log(
+ qr/parallel-autovacuum-leader-after-worker-wait \(reload (?:pending|processed)\)/,
+ $log_offset);
+
+my $log = slurp_file($node->logfile, $log_offset);
+my ($reload_state) =
+ $log =~ /parallel-autovacuum-leader-after-worker-wait \(reload (pending|processed)\)/;
+is($reload_state, 'processed',
+ 'autovacuum leader processes a configuration reload while waiting');
While not a problem with this patch, I wish wait_for_log could either return
the match, or at least the offset of the match, and not just the size of the
file. If we had that we could avoid reading excessive amounts of log data and
reduce the risk of buggy tests matching on the wrong part of the log.
--
Daniel Gustafsson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nitin Motiani | 2026-09-28 13:31:19 | Re: BUG #19724: ALTER TYPE ... ALTER ATTRIBUTE triggers internal error for base type of domain with check |
| Previous Message | shihao zhong | 2026-09-28 07:01:52 | Re: BUG #19705: One NaN box makes a BRIN box_inclusion_ops index omit unrelated rows |