@@ -1271,21 +1271,6 @@ heap_endscan(TableScanDesc sscan)
1271
1271
pfree (scan );
1272
1272
}
1273
1273
1274
- #ifdef HEAPDEBUGALL
1275
- #define HEAPDEBUG_1 \
1276
- elog(DEBUG2, "heap_getnext([%s,nkeys=%d],dir=%d) called", \
1277
- RelationGetRelationName(scan->rs_rd), scan->rs_nkeys, (int) direction)
1278
- #define HEAPDEBUG_2 \
1279
- elog(DEBUG2, "heap_getnext returning EOS")
1280
- #define HEAPDEBUG_3 \
1281
- elog(DEBUG2, "heap_getnext returning tuple")
1282
- #else
1283
- #define HEAPDEBUG_1
1284
- #define HEAPDEBUG_2
1285
- #define HEAPDEBUG_3
1286
- #endif /* !defined(HEAPDEBUGALL) */
1287
-
1288
-
1289
1274
HeapTuple
1290
1275
heap_getnext (TableScanDesc sscan , ScanDirection direction )
1291
1276
{
@@ -1305,8 +1290,6 @@ heap_getnext(TableScanDesc sscan, ScanDirection direction)
1305
1290
1306
1291
/* Note: no locking manipulations needed */
1307
1292
1308
- HEAPDEBUG_1 ; /* heap_getnext( info ) */
1309
-
1310
1293
if (scan -> rs_base .rs_flags & SO_ALLOW_PAGEMODE )
1311
1294
heapgettup_pagemode (scan , direction ,
1312
1295
scan -> rs_base .rs_nkeys , scan -> rs_base .rs_key );
@@ -1315,53 +1298,32 @@ heap_getnext(TableScanDesc sscan, ScanDirection direction)
1315
1298
scan -> rs_base .rs_nkeys , scan -> rs_base .rs_key );
1316
1299
1317
1300
if (scan -> rs_ctup .t_data == NULL )
1318
- {
1319
- HEAPDEBUG_2 ; /* heap_getnext returning EOS */
1320
1301
return NULL ;
1321
- }
1322
1302
1323
1303
/*
1324
1304
* if we get here it means we have a new current scan tuple, so point to
1325
1305
* the proper return buffer and return the tuple.
1326
1306
*/
1327
- HEAPDEBUG_3 ; /* heap_getnext returning tuple */
1328
1307
1329
1308
pgstat_count_heap_getnext (scan -> rs_base .rs_rd );
1330
1309
1331
1310
return & scan -> rs_ctup ;
1332
1311
}
1333
1312
1334
- #ifdef HEAPAMSLOTDEBUGALL
1335
- #define HEAPAMSLOTDEBUG_1 \
1336
- elog(DEBUG2, "heapam_getnextslot([%s,nkeys=%d],dir=%d) called", \
1337
- RelationGetRelationName(scan->rs_base.rs_rd), scan->rs_base.rs_nkeys, (int) direction)
1338
- #define HEAPAMSLOTDEBUG_2 \
1339
- elog(DEBUG2, "heapam_getnextslot returning EOS")
1340
- #define HEAPAMSLOTDEBUG_3 \
1341
- elog(DEBUG2, "heapam_getnextslot returning tuple")
1342
- #else
1343
- #define HEAPAMSLOTDEBUG_1
1344
- #define HEAPAMSLOTDEBUG_2
1345
- #define HEAPAMSLOTDEBUG_3
1346
- #endif
1347
-
1348
1313
bool
1349
1314
heap_getnextslot (TableScanDesc sscan , ScanDirection direction , TupleTableSlot * slot )
1350
1315
{
1351
1316
HeapScanDesc scan = (HeapScanDesc ) sscan ;
1352
1317
1353
1318
/* Note: no locking manipulations needed */
1354
1319
1355
- HEAPAMSLOTDEBUG_1 ; /* heap_getnextslot( info ) */
1356
-
1357
1320
if (sscan -> rs_flags & SO_ALLOW_PAGEMODE )
1358
1321
heapgettup_pagemode (scan , direction , sscan -> rs_nkeys , sscan -> rs_key );
1359
1322
else
1360
1323
heapgettup (scan , direction , sscan -> rs_nkeys , sscan -> rs_key );
1361
1324
1362
1325
if (scan -> rs_ctup .t_data == NULL )
1363
1326
{
1364
- HEAPAMSLOTDEBUG_2 ; /* heap_getnextslot returning EOS */
1365
1327
ExecClearTuple (slot );
1366
1328
return false;
1367
1329
}
@@ -1370,7 +1332,6 @@ heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *s
1370
1332
* if we get here it means we have a new current scan tuple, so point to
1371
1333
* the proper return buffer and return the tuple.
1372
1334
*/
1373
- HEAPAMSLOTDEBUG_3 ; /* heap_getnextslot returning tuple */
1374
1335
1375
1336
pgstat_count_heap_getnext (scan -> rs_base .rs_rd );
1376
1337
0 commit comments