1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

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.
This commit is contained in:
Tom Lane
2007-09-24 03:12:23 +00:00
parent 02138357ff
commit 48f7e64395
14 changed files with 182 additions and 351 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.108 2007/05/30 20:11:56 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.109 2007/09/24 03:12:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -202,10 +202,10 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt,
}
/* measure elapsed time iff autovacuum logging requires it */
if (IsAutoVacuumWorkerProcess() && Log_autovacuum >= 0)
if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration >= 0)
{
pg_rusage_init(&ru0);
if (Log_autovacuum > 0)
if (Log_autovacuum_min_duration > 0)
starttime = GetCurrentTimestamp();
}
@ -472,11 +472,11 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt,
relation_close(onerel, NoLock);
/* Log the action if appropriate */
if (IsAutoVacuumWorkerProcess() && Log_autovacuum >= 0)
if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration >= 0)
{
if (Log_autovacuum == 0 ||
if (Log_autovacuum_min_duration == 0 ||
TimestampDifferenceExceeds(starttime, GetCurrentTimestamp(),
Log_autovacuum))
Log_autovacuum_min_duration))
ereport(LOG,
(errmsg("automatic analyze of table \"%s.%s.%s\" system usage: %s",
get_database_name(MyDatabaseId),