From: | Stepan Neretin <sndcppg(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Assertion failure when autovacuum drops orphan temp indexes. |
Date: | 2024-10-28 03:44:59 |
Message-ID: | CAMaYL5ZjT5v1PKbjrfVGg67vjQ6-mrY+kJ-8DEvJukMx2GRv0w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> The assertion failure happens in an autovacuum worker. So if you are
> looking for a test that can be integrated in the tree, you could get
> some inspiration from 006_signal_autovacuum.pl and rely on an
> injection point wait with the existing autovacuum-worker-start. My
> 2c, as it looks easy enough to avoid the hardcoded waits.
> --
>
Greetings, I appreciate your proposal. I have attempted to implement your
suggestion, but unfortunately it did not yield the desired results.
```
use strict;
use warnings;
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
if ($ENV{enable_injection_points} ne 'yes') {
plan skip_all => 'Injection points not supported by this build';
}
my $node = PostgreSQL::Test::Cluster->new('main');
$node->init;
$node->append_conf(
'postgresql.conf', qq[
autovacuum = on
autovacuum_naptime = 1
autovacuum_max_workers = 1
]);
$node->start;
if (!$node->check_extension('injection_points')) {
plan skip_all => 'Extension injection_points not installed';
}
my $psql1 = $node->interactive_psql('postgres');
$psql1->query("create temp table test (a int primary key);");
$node->stop('immediate');
$node->start;
$node->restart;
my $psql2 = $node->interactive_psql('postgres');
$psql2->query('CREATE EXTENSION injection_points;');
$psql2->query("SELECT injection_points_attach('autovacuum-worker-start',
'wait');");
$node->wait_for_event('autovacuum worker', 'autovacuum-worker-start');
$psql2->query('select 1');
my $regexp = qr/autovacuum:/;
my $offset = 0;
ok( $node->log_contains(
$regexp,
$offset),
"autovacuum not started");
done_testing();
```
Best Regards, Stepan Neretin!
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2024-10-28 04:36:38 | Re: Assertion failure when autovacuum drops orphan temp indexes. |
Previous Message | Hayato Kuroda (Fujitsu) | 2024-10-28 03:17:23 | RE: Pgoutput not capturing the generated columns |