*itupPtr,
                   *itupEnd;
 
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        buffer = ReadBufferExtended(index, MAIN_FORKNUM, blkno,
                                    RBM_NORMAL, info->strategy);
        Buffer      buffer;
        Page        page;
 
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        buffer = ReadBufferExtended(index, MAIN_FORKNUM, blkno,
                                    RBM_NORMAL, info->strategy);
 
    for (;;)
    {
        /* Check for user-requested abort or sleep */
-       vacuum_delay_point();
+       vacuum_delay_point(true);
 
        /* Fetch next row */
        MemoryContextReset(tupcontext);
 
         */
        processPendingPage(&accum, &datums, page, FirstOffsetNumber);
 
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        /*
         * Is it time to flush memory to disk?  Flush if we are at the end of
            {
                ginEntryInsert(ginstate, attnum, key, category,
                               list, nlist, NULL);
-               vacuum_delay_point();
+               vacuum_delay_point(false);
            }
 
            /*
        /*
         * Read next page in pending list
         */
-       vacuum_delay_point();
+       vacuum_delay_point(false);
        buffer = ReadBuffer(index, blkno);
        LockBuffer(buffer, GIN_SHARE);
        page = BufferGetPage(buffer);
 
            UnlockReleaseBuffer(buffer);
        }
 
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        for (i = 0; i < nRoot; i++)
        {
            ginVacuumPostingTree(&gvs, rootOfPostingTree[i]);
-           vacuum_delay_point();
+           vacuum_delay_point(false);
        }
 
        if (blkno == InvalidBlockNumber)    /* rightmost page */
        Buffer      buffer;
        Page        page;
 
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        buffer = ReadBufferExtended(index, MAIN_FORKNUM, blkno,
                                    RBM_NORMAL, info->strategy);
 
    recurse_to = InvalidBlockNumber;
 
    /* call vacuum_delay_point while not holding any buffer lock */
-   vacuum_delay_point();
+   vacuum_delay_point(false);
 
    buffer = ReadBufferExtended(rel, MAIN_FORKNUM, blkno, RBM_NORMAL,
                                info->strategy);
 
        bool        retain_pin = false;
        bool        clear_dead_marking = false;
 
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        page = BufferGetPage(buf);
        opaque = HashPageGetOpaque(page);
 
        update_vacuum_error_info(vacrel, NULL, VACUUM_ERRCB_PHASE_SCAN_HEAP,
                                 blkno, InvalidOffsetNumber);
 
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        /*
         * Regularly check if wraparound failsafe should trigger.
        OffsetNumber offsets[MaxOffsetNumber];
        int         num_offsets;
 
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        blkno = iter_result->blkno;
        vacrel->blkno = blkno;
 
    backtrack_to = P_NONE;
 
    /* call vacuum_delay_point while not holding any buffer lock */
-   vacuum_delay_point();
+   vacuum_delay_point(false);
 
    /*
     * We can't use _bt_getbuf() here because it always applies
 
    Page        page;
 
    /* call vacuum_delay_point while not holding any buffer lock */
-   vacuum_delay_point();
+   vacuum_delay_point(false);
 
    buffer = ReadBufferExtended(index, MAIN_FORKNUM, blkno,
                                RBM_NORMAL, bds->info->strategy);
            continue;           /* ignore already-done items */
 
        /* call vacuum_delay_point while not holding any buffer lock */
-       vacuum_delay_point();
+       vacuum_delay_point(false);
 
        /* examine the referenced page */
        blkno = ItemPointerGetBlockNumber(&pitem->tid);
 
        {
            HeapTuple   heapTuple = rows[rowno];
 
-           vacuum_delay_point();
+           vacuum_delay_point(true);
 
            /*
             * Reset the per-tuple context each time, to reclaim any cruft
    /* Outer loop over blocks to sample */
    while (table_scan_analyze_next_block(scan, stream))
    {
-       vacuum_delay_point();
+       vacuum_delay_point(true);
 
        while (table_scan_analyze_next_tuple(scan, OldestXmin, &liverows, &deadrows, slot))
        {
        Datum       value;
        bool        isnull;
 
-       vacuum_delay_point();
+       vacuum_delay_point(true);
 
        value = fetchfunc(stats, i, &isnull);
 
        int         firstcount1,
                    j;
 
-       vacuum_delay_point();
+       vacuum_delay_point(true);
 
        value = fetchfunc(stats, i, &isnull);
 
        Datum       value;
        bool        isnull;
 
-       vacuum_delay_point();
+       vacuum_delay_point(true);
 
        value = fetchfunc(stats, i, &isnull);
 
 
  * typically once per page processed.
  */
 void
-vacuum_delay_point(void)
+vacuum_delay_point(bool is_analyze)
 {
    double      msec = 0;
 
 
        char       *lexemesptr;
        int         j;
 
-       vacuum_delay_point();
+       vacuum_delay_point(true);
 
        value = fetchfunc(stats, vector_no, &isnull);
 
 
        int         distinct_count;
        bool        count_item_found;
 
-       vacuum_delay_point();
+       vacuum_delay_point(true);
 
        value = fetchfunc(stats, array_no, &isnull);
        if (isnull)
 
                    upper;
        float8      length;
 
-       vacuum_delay_point();
+       vacuum_delay_point(true);
 
        value = fetchfunc(stats, range_no, &isnull);
        if (isnull)
 
                               struct VacuumCutoffs *cutoffs);
 extern bool vacuum_xid_failsafe_check(const struct VacuumCutoffs *cutoffs);
 extern void vac_update_datfrozenxid(void);
-extern void vacuum_delay_point(void);
+extern void vacuum_delay_point(bool is_analyze);
 extern bool vacuum_is_permitted_for_relation(Oid relid, Form_pg_class reltuple,
                                             bits32 options);
 extern Relation vacuum_open_relation(Oid relid, RangeVar *relation,