diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-24 03:12:23 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-24 03:12:23 +0000 |
| commit | 48f7e6439568e5d665f622e2973becc50a86b64a (patch) | |
| tree | 61e36a6230783a6e8374e72b247fb3597f4d5a3f /src/include | |
| parent | 02138357ffc8c41a3d646035368712a5394f1f5f (diff) | |
Simplify and rename some GUC variables, per various recent discussions:
* stats_start_collector goes away; we always start the collector process,
unless prevented by a problem with setting up the stats UDP socket.
* stats_reset_on_server_start goes away; it seems useless in view of the
availability of pg_stat_reset().
* stats_block_level and stats_row_level are merged into a single variable
"track_counts", which controls all reports sent to the collector process.
* stats_command_string is renamed to track_activities.
* log_autovacuum is renamed to log_autovacuum_min_duration to better reflect
its meaning.
The log_autovacuum change is not a compatibility issue since it didn't exist
before 8.3 anyway. The other changes need to be release-noted.
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); |
