amcheck/verify_heapam doesn't check for interrupts

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: amcheck/verify_heapam doesn't check for interrupts
Date: 2021-08-26 21:38:18
Message-ID: CAH2-Wzk-9RtQgb2QiuLv8j2O0j9tSFKPmmch5nWSZhguUxvbrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I just noticed that the new heapam amcheck verification code can take
a very long time to respond to cancellations from pg_amcheck -- I saw
that it took over 2 minutes on a large database on my workstation.

It looks like we neglect to call CHECK_FOR_INTERRUPTS() anywhere
inside verify_heapam.c. Is there any reason for this? Can't we just
put a CHECK_FOR_INTERRUPTS() at the top of the outermost loop, inside
verify_heapam()?

Not sure if pg_amcheck itself is a factor here too -- didn't get that far.

Thanks
--
Peter Geoghegan

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2021-08-26 22:01:24 Re: row filtering for logical replication
Previous Message Andrew Dunstan 2021-08-26 21:10:39 Re: Mark all GUC variable as PGDLLIMPORT