diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/pgstat.h | 65 | ||||
| -rw-r--r-- | src/include/postmaster/autovacuum.h | 4 |
2 files changed, 33 insertions, 36 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 9cdeb2ee909..2f53fdcd7c8 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -5,7 +5,7 @@ * * Copyright (c) 2001-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.66 2007/09/20 17:56:32 tgl Exp $ + * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.67 2007/09/24 03:12:23 tgl Exp $ * ---------- */ #ifndef PGSTAT_H @@ -452,11 +452,8 @@ typedef struct PgBackendStatus * GUC parameters * ---------- */ -extern bool pgstat_collect_startcollector; -extern bool pgstat_collect_resetonpmstart; -extern bool pgstat_collect_tuplelevel; -extern bool pgstat_collect_blocklevel; -extern bool pgstat_collect_querystring; +extern bool pgstat_track_activities; +extern bool pgstat_track_counts; /* * BgWriter statistics counters are updated directly by bgwriter and bufmgr @@ -510,40 +507,40 @@ extern void pgstat_initstats(Relation rel); /* nontransactional event counts are simple enough to inline */ -#define pgstat_count_heap_scan(rel) \ - do { \ - if (pgstat_collect_tuplelevel && (rel)->pgstat_info != NULL) \ - (rel)->pgstat_info->t_counts.t_numscans++; \ +#define pgstat_count_heap_scan(rel) \ + do { \ + if (pgstat_track_counts && (rel)->pgstat_info != NULL) \ + (rel)->pgstat_info->t_counts.t_numscans++; \ } while (0) -#define pgstat_count_heap_getnext(rel) \ - do { \ - if (pgstat_collect_tuplelevel && (rel)->pgstat_info != NULL) \ - (rel)->pgstat_info->t_counts.t_tuples_returned++; \ +#define pgstat_count_heap_getnext(rel) \ + do { \ + if (pgstat_track_counts && (rel)->pgstat_info != NULL) \ + (rel)->pgstat_info->t_counts.t_tuples_returned++; \ } while (0) -#define pgstat_count_heap_fetch(rel) \ - do { \ - if (pgstat_collect_tuplelevel && (rel)->pgstat_info != NULL) \ - (rel)->pgstat_info->t_counts.t_tuples_fetched++; \ +#define pgstat_count_heap_fetch(rel) \ + do { \ + if (pgstat_track_counts && (rel)->pgstat_info != NULL) \ + (rel)->pgstat_info->t_counts.t_tuples_fetched++; \ } while (0) -#define pgstat_count_index_scan(rel) \ - do { \ - if (pgstat_collect_tuplelevel && (rel)->pgstat_info != NULL) \ - (rel)->pgstat_info->t_counts.t_numscans++; \ +#define pgstat_count_index_scan(rel) \ + do { \ + if (pgstat_track_counts && (rel)->pgstat_info != NULL) \ + (rel)->pgstat_info->t_counts.t_numscans++; \ } while (0) -#define pgstat_count_index_tuples(rel, n) \ - do { \ - if (pgstat_collect_tuplelevel && (rel)->pgstat_info != NULL) \ - (rel)->pgstat_info->t_counts.t_tuples_returned += (n); \ +#define pgstat_count_index_tuples(rel, n) \ + do { \ + if (pgstat_track_counts && (rel)->pgstat_info != NULL) \ + (rel)->pgstat_info->t_counts.t_tuples_returned += (n); \ } while (0) -#define pgstat_count_buffer_read(rel) \ - do { \ - if (pgstat_collect_blocklevel && (rel)->pgstat_info != NULL) \ - (rel)->pgstat_info->t_counts.t_blocks_fetched++; \ +#define pgstat_count_buffer_read(rel) \ + do { \ + if (pgstat_track_counts && (rel)->pgstat_info != NULL) \ + (rel)->pgstat_info->t_counts.t_blocks_fetched++; \ } while (0) -#define pgstat_count_buffer_hit(rel) \ - do { \ - if (pgstat_collect_blocklevel && (rel)->pgstat_info != NULL) \ - (rel)->pgstat_info->t_counts.t_blocks_hit++; \ +#define pgstat_count_buffer_hit(rel) \ + do { \ + if (pgstat_track_counts && (rel)->pgstat_info != NULL) \ + (rel)->pgstat_info->t_counts.t_blocks_hit++; \ } while (0) extern void pgstat_count_heap_insert(Relation rel); diff --git a/src/include/postmaster/autovacuum.h b/src/include/postmaster/autovacuum.h index 27a982aafc5..d3e9ebe6c88 100644 --- a/src/include/postmaster/autovacuum.h +++ b/src/include/postmaster/autovacuum.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/postmaster/autovacuum.h,v 1.11 2007/06/25 16:09:03 alvherre Exp $ + * $PostgreSQL: pgsql/src/include/postmaster/autovacuum.h,v 1.12 2007/09/24 03:12:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -31,7 +31,7 @@ extern int autovacuum_vac_cost_limit; /* autovacuum launcher PID, only valid when worker is shutting down */ extern int AutovacuumLauncherPid; -extern int Log_autovacuum; +extern int Log_autovacuum_min_duration; /* Status inquiry functions */ extern bool AutoVacuumingActive(void); |
