Remove HEAPDEBUGALL
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 21 Apr 2020 17:57:33 +0000 (19:57 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 22 Apr 2020 06:35:33 +0000 (08:35 +0200)
This has been broken since PostgreSQL 12 and was probably never really
used.  PostgreSQL 12 added an analogous HEAPAMSLOTDEBUGALL, which
still works right now, but it's also not very useful, so remove that
as well.

Discussion: https://www.postgresql.org/message-id/flat/645c0646-4218-d4c3-409a-a7003a0c108d%402ndquadrant.com

src/backend/access/heap/heapam.c
src/include/pg_config_manual.h

index c4a5aa616a340976caa188dd8c38f2900f64d4a2..0d4ed602d764f09a445bdb40fa6f5227bf6c6bc4 100644 (file)
@@ -1271,21 +1271,6 @@ heap_endscan(TableScanDesc sscan)
    pfree(scan);
 }
 
-#ifdef HEAPDEBUGALL
-#define HEAPDEBUG_1 \
-   elog(DEBUG2, "heap_getnext([%s,nkeys=%d],dir=%d) called", \
-        RelationGetRelationName(scan->rs_rd), scan->rs_nkeys, (int) direction)
-#define HEAPDEBUG_2 \
-   elog(DEBUG2, "heap_getnext returning EOS")
-#define HEAPDEBUG_3 \
-   elog(DEBUG2, "heap_getnext returning tuple")
-#else
-#define HEAPDEBUG_1
-#define HEAPDEBUG_2
-#define HEAPDEBUG_3
-#endif                         /* !defined(HEAPDEBUGALL) */
-
-
 HeapTuple
 heap_getnext(TableScanDesc sscan, ScanDirection direction)
 {
@@ -1305,8 +1290,6 @@ heap_getnext(TableScanDesc sscan, ScanDirection direction)
 
    /* Note: no locking manipulations needed */
 
-   HEAPDEBUG_1;                /* heap_getnext( info ) */
-
    if (scan->rs_base.rs_flags & SO_ALLOW_PAGEMODE)
        heapgettup_pagemode(scan, direction,
                            scan->rs_base.rs_nkeys, scan->rs_base.rs_key);
@@ -1315,36 +1298,18 @@ heap_getnext(TableScanDesc sscan, ScanDirection direction)
                   scan->rs_base.rs_nkeys, scan->rs_base.rs_key);
 
    if (scan->rs_ctup.t_data == NULL)
-   {
-       HEAPDEBUG_2;            /* heap_getnext returning EOS */
        return NULL;
-   }
 
    /*
     * if we get here it means we have a new current scan tuple, so point to
     * the proper return buffer and return the tuple.
     */
-   HEAPDEBUG_3;                /* heap_getnext returning tuple */
 
    pgstat_count_heap_getnext(scan->rs_base.rs_rd);
 
    return &scan->rs_ctup;
 }
 
-#ifdef HEAPAMSLOTDEBUGALL
-#define HEAPAMSLOTDEBUG_1 \
-   elog(DEBUG2, "heapam_getnextslot([%s,nkeys=%d],dir=%d) called", \
-        RelationGetRelationName(scan->rs_base.rs_rd), scan->rs_base.rs_nkeys, (int) direction)
-#define HEAPAMSLOTDEBUG_2 \
-   elog(DEBUG2, "heapam_getnextslot returning EOS")
-#define HEAPAMSLOTDEBUG_3 \
-   elog(DEBUG2, "heapam_getnextslot returning tuple")
-#else
-#define HEAPAMSLOTDEBUG_1
-#define HEAPAMSLOTDEBUG_2
-#define HEAPAMSLOTDEBUG_3
-#endif
-
 bool
 heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
 {
@@ -1352,8 +1317,6 @@ heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *s
 
    /* Note: no locking manipulations needed */
 
-   HEAPAMSLOTDEBUG_1;          /* heap_getnextslot( info ) */
-
    if (sscan->rs_flags & SO_ALLOW_PAGEMODE)
        heapgettup_pagemode(scan, direction, sscan->rs_nkeys, sscan->rs_key);
    else
@@ -1361,7 +1324,6 @@ heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *s
 
    if (scan->rs_ctup.t_data == NULL)
    {
-       HEAPAMSLOTDEBUG_2;      /* heap_getnextslot returning EOS */
        ExecClearTuple(slot);
        return false;
    }
@@ -1370,7 +1332,6 @@ heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *s
     * if we get here it means we have a new current scan tuple, so point to
     * the proper return buffer and return the tuple.
     */
-   HEAPAMSLOTDEBUG_3;          /* heap_getnextslot returning tuple */
 
    pgstat_count_heap_getnext(scan->rs_base.rs_rd);
 
index 32f739706d5e04e87ee1e4dbf5687d3d2f9ff591..35d8215a929205f527f5d6999e55ed62a8f3c466 100644 (file)
 /*
  * Other debug #defines (documentation, anyone?)
  */
-/* #define HEAPDEBUGALL */
 /* #define ACLDEBUG */