autovacuum: Improve wording in a couple places
A few strings (one WARNING and some memory context names) in the autovacuum code were written in a world where "worker" had no other possible meaning than "autovacuum worker", but that's long time gone. Be more specific about it. Also, change the WARNING from elog() to ereport(), to add translability. Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Nathan Bossart <bossartn@amazon.com> Reviewed-by: Justin Pryzby <pryzby@telsasoft.com> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CALj2ACX2UHp76dqdoZq92a7v4APFuV5wJQ+AUrb+2HURrKN=NQ@mail.gmail.com
This commit is contained in:
parent
67385544ce
commit
042412879e
|
@ -754,7 +754,8 @@ AutoVacLauncherMain(int argc, char *argv[])
|
||||||
dlist_push_head(&AutoVacuumShmem->av_freeWorkers,
|
dlist_push_head(&AutoVacuumShmem->av_freeWorkers,
|
||||||
&worker->wi_links);
|
&worker->wi_links);
|
||||||
AutoVacuumShmem->av_startingWorker = NULL;
|
AutoVacuumShmem->av_startingWorker = NULL;
|
||||||
elog(WARNING, "worker took too long to start; canceled");
|
ereport(WARNING,
|
||||||
|
errmsg("autovacuum worker took too long to start; canceled"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -966,10 +967,10 @@ rebuild_database_list(Oid newdb)
|
||||||
autovac_refresh_stats();
|
autovac_refresh_stats();
|
||||||
|
|
||||||
newcxt = AllocSetContextCreate(AutovacMemCxt,
|
newcxt = AllocSetContextCreate(AutovacMemCxt,
|
||||||
"AV dblist",
|
"Autovacuum database list",
|
||||||
ALLOCSET_DEFAULT_SIZES);
|
ALLOCSET_DEFAULT_SIZES);
|
||||||
tmpcxt = AllocSetContextCreate(newcxt,
|
tmpcxt = AllocSetContextCreate(newcxt,
|
||||||
"tmp AV dblist",
|
"Autovacuum database list (tmp)",
|
||||||
ALLOCSET_DEFAULT_SIZES);
|
ALLOCSET_DEFAULT_SIZES);
|
||||||
oldcxt = MemoryContextSwitchTo(tmpcxt);
|
oldcxt = MemoryContextSwitchTo(tmpcxt);
|
||||||
|
|
||||||
|
@ -992,7 +993,7 @@ rebuild_database_list(Oid newdb)
|
||||||
hctl.keysize = sizeof(Oid);
|
hctl.keysize = sizeof(Oid);
|
||||||
hctl.entrysize = sizeof(avl_dbase);
|
hctl.entrysize = sizeof(avl_dbase);
|
||||||
hctl.hcxt = tmpcxt;
|
hctl.hcxt = tmpcxt;
|
||||||
dbhash = hash_create("db hash", 20, &hctl, /* magic number here FIXME */
|
dbhash = hash_create("autovacuum db hash", 20, &hctl, /* magic number here FIXME */
|
||||||
HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
|
HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
|
||||||
|
|
||||||
/* start by inserting the new database */
|
/* start by inserting the new database */
|
||||||
|
@ -1179,7 +1180,7 @@ do_start_worker(void)
|
||||||
* allocated for the database list.
|
* allocated for the database list.
|
||||||
*/
|
*/
|
||||||
tmpcxt = AllocSetContextCreate(CurrentMemoryContext,
|
tmpcxt = AllocSetContextCreate(CurrentMemoryContext,
|
||||||
"Start worker tmp cxt",
|
"Autovacuum start worker (tmp)",
|
||||||
ALLOCSET_DEFAULT_SIZES);
|
ALLOCSET_DEFAULT_SIZES);
|
||||||
oldcxt = MemoryContextSwitchTo(tmpcxt);
|
oldcxt = MemoryContextSwitchTo(tmpcxt);
|
||||||
|
|
||||||
|
@ -1981,7 +1982,7 @@ do_autovacuum(void)
|
||||||
* relations to vacuum/analyze across transactions.
|
* relations to vacuum/analyze across transactions.
|
||||||
*/
|
*/
|
||||||
AutovacMemCxt = AllocSetContextCreate(TopMemoryContext,
|
AutovacMemCxt = AllocSetContextCreate(TopMemoryContext,
|
||||||
"AV worker",
|
"Autovacuum worker",
|
||||||
ALLOCSET_DEFAULT_SIZES);
|
ALLOCSET_DEFAULT_SIZES);
|
||||||
MemoryContextSwitchTo(AutovacMemCxt);
|
MemoryContextSwitchTo(AutovacMemCxt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue