mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Revert "Show index search count in EXPLAIN ANALYZE."
This reverts commit 5ead85fbc8.
This commit shows test failures with debug_parallel_query=regress. The
underlying issue needs to be debugged, so revert for now.
This commit is contained in:
@@ -591,7 +591,6 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
|
||||
opaque = (BrinOpaque *) scan->opaque;
|
||||
bdesc = opaque->bo_bdesc;
|
||||
pgstat_count_index_scan(idxRel);
|
||||
scan->nsearches++;
|
||||
|
||||
/*
|
||||
* We need to know the size of the table so that we know how long to
|
||||
|
||||
@@ -437,7 +437,6 @@ ginNewScanKey(IndexScanDesc scan)
|
||||
MemoryContextSwitchTo(oldCtx);
|
||||
|
||||
pgstat_count_index_scan(scan->indexRelation);
|
||||
scan->nsearches++;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -625,7 +625,6 @@ gistgettuple(IndexScanDesc scan, ScanDirection dir)
|
||||
GISTSearchItem fakeItem;
|
||||
|
||||
pgstat_count_index_scan(scan->indexRelation);
|
||||
scan->nsearches++;
|
||||
|
||||
so->firstCall = false;
|
||||
so->curPageData = so->nPageData = 0;
|
||||
@@ -751,7 +750,6 @@ gistgetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
|
||||
return 0;
|
||||
|
||||
pgstat_count_index_scan(scan->indexRelation);
|
||||
scan->nsearches++;
|
||||
|
||||
/* Begin the scan by processing the root page */
|
||||
so->curPageData = so->nPageData = 0;
|
||||
|
||||
@@ -298,7 +298,6 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
|
||||
HashScanPosItem *currItem;
|
||||
|
||||
pgstat_count_index_scan(rel);
|
||||
scan->nsearches++;
|
||||
|
||||
/*
|
||||
* We do not support hash scans with no index qualification, because we
|
||||
|
||||
@@ -119,7 +119,6 @@ RelationGetIndexScan(Relation indexRelation, int nkeys, int norderbys)
|
||||
scan->ignore_killed_tuples = !scan->xactStartedInRecovery;
|
||||
|
||||
scan->opaque = NULL;
|
||||
scan->nsearches = 0;
|
||||
|
||||
scan->xs_itup = NULL;
|
||||
scan->xs_itupdesc = NULL;
|
||||
|
||||
@@ -70,7 +70,6 @@ typedef struct BTParallelScanDescData
|
||||
BTPS_State btps_pageStatus; /* indicates whether next page is
|
||||
* available for scan. see above for
|
||||
* possible states of parallel scan. */
|
||||
uint64 btps_nsearches; /* tracked for IndexScanDescData.nsearches */
|
||||
slock_t btps_mutex; /* protects above variables, btps_arrElems */
|
||||
ConditionVariable btps_cv; /* used to synchronize parallel scan */
|
||||
|
||||
@@ -558,7 +557,6 @@ btinitparallelscan(void *target)
|
||||
bt_target->btps_nextScanPage = InvalidBlockNumber;
|
||||
bt_target->btps_lastCurrPage = InvalidBlockNumber;
|
||||
bt_target->btps_pageStatus = BTPARALLEL_NOT_INITIALIZED;
|
||||
bt_target->btps_nsearches = 0;
|
||||
ConditionVariableInit(&bt_target->btps_cv);
|
||||
}
|
||||
|
||||
@@ -585,7 +583,6 @@ btparallelrescan(IndexScanDesc scan)
|
||||
btscan->btps_nextScanPage = InvalidBlockNumber;
|
||||
btscan->btps_lastCurrPage = InvalidBlockNumber;
|
||||
btscan->btps_pageStatus = BTPARALLEL_NOT_INITIALIZED;
|
||||
/* deliberately don't reset btps_nsearches (matches index_rescan) */
|
||||
SpinLockRelease(&btscan->btps_mutex);
|
||||
}
|
||||
|
||||
@@ -679,7 +676,6 @@ _bt_parallel_seize(IndexScanDesc scan, BlockNumber *next_scan_page,
|
||||
{
|
||||
/* Can start scheduled primitive scan right away, so do so */
|
||||
btscan->btps_pageStatus = BTPARALLEL_ADVANCING;
|
||||
btscan->btps_nsearches++;
|
||||
for (int i = 0; i < so->numArrayKeys; i++)
|
||||
{
|
||||
BTArrayKeyInfo *array = &so->arrayKeys[i];
|
||||
@@ -716,11 +712,6 @@ _bt_parallel_seize(IndexScanDesc scan, BlockNumber *next_scan_page,
|
||||
*/
|
||||
btscan->btps_pageStatus = BTPARALLEL_ADVANCING;
|
||||
Assert(btscan->btps_nextScanPage != P_NONE);
|
||||
if (btscan->btps_nextScanPage == InvalidBlockNumber)
|
||||
{
|
||||
Assert(first);
|
||||
btscan->btps_nsearches++;
|
||||
}
|
||||
*next_scan_page = btscan->btps_nextScanPage;
|
||||
*last_curr_page = btscan->btps_lastCurrPage;
|
||||
exit_loop = true;
|
||||
@@ -819,12 +810,6 @@ _bt_parallel_done(IndexScanDesc scan)
|
||||
btscan->btps_pageStatus = BTPARALLEL_DONE;
|
||||
status_changed = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't use local nsearches counter -- overwrite it with the nsearches
|
||||
* counter that we've been maintaining in shared memory
|
||||
*/
|
||||
scan->nsearches = btscan->btps_nsearches;
|
||||
SpinLockRelease(&btscan->btps_mutex);
|
||||
|
||||
/* wake up all the workers associated with this parallel scan */
|
||||
|
||||
@@ -950,7 +950,6 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
|
||||
* _bt_search/_bt_endpoint below
|
||||
*/
|
||||
pgstat_count_index_scan(rel);
|
||||
scan->nsearches++;
|
||||
|
||||
/*----------
|
||||
* Examine the scan keys to discover where we need to start the scan.
|
||||
|
||||
@@ -421,7 +421,6 @@ spgrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys,
|
||||
|
||||
/* count an indexscan for stats */
|
||||
pgstat_count_index_scan(scan->indexRelation);
|
||||
scan->nsearches++;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user