contrib/amcheck: Add heapam CHECK_FOR_INTERRUPTS().
authorPeter Geoghegan <pg@bowt.ie>
Fri, 27 Aug 2021 01:42:20 +0000 (18:42 -0700)
committerPeter Geoghegan <pg@bowt.ie>
Fri, 27 Aug 2021 01:42:20 +0000 (18:42 -0700)
Add a CHECK_FOR_INTERRUPTS() call to make heap relation verification
responsive to query cancellations.

Author: Mark Dilger <mark.dilger@enterprisedb.com>
Discussion: https://postgr.es/m/CAH2-Wzk-9RtQgb2QiuLv8j2O0j9tSFKPmmch5nWSZhguUxvbrw%40mail.gmail.com
Backpatch: 14-, where amcheck heap verification was introduced.

contrib/amcheck/verify_heapam.c

index 226271923a89b41970e8d8f1c7e14916ef2fb34d..173f99d787099d18c1ea1da8c189f3c687636cc9 100644 (file)
@@ -395,6 +395,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)
        {