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