From: Peter Geoghegan Date: Fri, 27 Aug 2021 01:42:18 +0000 (-0700) Subject: contrib/amcheck: Add heapam CHECK_FOR_INTERRUPTS(). X-Git-Tag: REL_14_RC1~85 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba05dfe943046820312eaa20995ffc626936b8be;p=thirdparty%2Fpostgresql.git contrib/amcheck: Add heapam CHECK_FOR_INTERRUPTS(). Add a CHECK_FOR_INTERRUPTS() call to make heap relation verification responsive to query cancellations. Author: Mark Dilger Discussion: https://postgr.es/m/CAH2-Wzk-9RtQgb2QiuLv8j2O0j9tSFKPmmch5nWSZhguUxvbrw%40mail.gmail.com Backpatch: 14-, where amcheck heap verification was introduced. --- diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c index a3caee7cdd3..3648ed8d4e7 100644 --- a/contrib/amcheck/verify_heapam.c +++ b/contrib/amcheck/verify_heapam.c @@ -380,6 +380,8 @@ verify_heapam(PG_FUNCTION_ARGS) { OffsetNumber maxoff; + CHECK_FOR_INTERRUPTS(); + /* Optionally skip over all-frozen or all-visible blocks */ if (skip_option != SKIP_PAGES_NONE) {