mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Revise pgstats stuff to fix the problems with not counting accesses
generated by bitmap index scans. Along the way, simplify and speed up the code for counting sequential and index scans; it was both confusing and inefficient to be taking care of that in the per-tuple loops, IMHO. initdb forced because of internal changes in pg_stat view definitions.
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
*
|
||||
* Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.108 2005/09/24 17:53:14 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.109 2005/10/06 02:29:17 tgl Exp $
|
||||
* ----------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
@ -1159,17 +1159,11 @@ pgstat_initstats(PgStat_Info *stats, Relation rel)
|
||||
* Initialize data not to count at all.
|
||||
*/
|
||||
stats->tabentry = NULL;
|
||||
stats->no_stats = FALSE;
|
||||
stats->heap_scan_counted = FALSE;
|
||||
stats->index_scan_counted = FALSE;
|
||||
|
||||
if (pgStatSock < 0 ||
|
||||
!(pgstat_collect_tuplelevel ||
|
||||
pgstat_collect_blocklevel))
|
||||
{
|
||||
stats->no_stats = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
tsarr = rel->rd_rel->relisshared ? &SharedTabStat : &RegularTabStat;
|
||||
|
||||
|
Reference in New Issue
Block a user