Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic

From: Andres Freund <andres(at)anarazel(dot)de>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic
Date: 2021-06-11 00:58:07
Message-ID: 20210611005807.ys4ouuoruy77hblk@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-06-08 19:18:18 -0500, Justin Pryzby wrote:
> I reproduced the issue on a new/fresh cluster like this:
>
> ./postgres -D data -c autovacuum_naptime=1 -c autovacuum_analyze_scale_factor=0.005 -c log_autovacuum_min_duration=-1
> psql -h /tmp postgres -c "CREATE TABLE t(i int); INSERT INTO t SELECT generate_series(1,99999); CREATE INDEX ON t(i);"
> time while psql -h /tmp postgres -qc 'REINDEX (CONCURRENTLY) INDEX t_i_idx'; do :; done&
> time while psql -h /tmp postgres -qc 'ANALYZE pg_attribute'; do :; done&
>
> TRAP: FailedAssertion("restarts == 0", File: "vacuumlazy.c", Line: 1803, PID: 10367)

Has anybody looked at getting test coverage for the retry path? Not with
the goal of triggering an assertion, just to have at least basic
coverage.

The problem with writing a test is likely to find a way to halfway
reliably schedule a transaction abort after pruning, but before the
tuple-removal loop? Does anybody see a trick to do so?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2021-06-11 00:58:17 Re: Race condition in InvalidateObsoleteReplicationSlots()
Previous Message Tom Lane 2021-06-11 00:39:19 Re: doc issue missing type name "multirange" in chapter title