1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

code: replace 'master' with 'leader' where appropriate.

Leader already is the more widely used terminology, but a few places
didn't get the message.

Author: Andres Freund
Reviewed-By: David Steele
Discussion: https://postgr.es/m/20200615182235.x7lch5n6kcjq4aue@alap3.anarazel.de
This commit is contained in:
Andres Freund
2020-06-14 14:22:47 -07:00
parent 5e7bbb5286
commit e07633646a
18 changed files with 120 additions and 120 deletions

View File

@ -11,7 +11,7 @@
* pages from a relation that is in the process of being dropped.
*
* While prewarming, autoprewarm will use two workers. There's a
* master worker that reads and sorts the list of blocks to be
* leader worker that reads and sorts the list of blocks to be
* prewarmed and then launches a per-database worker for each
* relevant database in turn. The former keeps running after the
* initial prewarm is complete to update the dump file periodically.
@ -88,7 +88,7 @@ PG_FUNCTION_INFO_V1(autoprewarm_dump_now);
static void apw_load_buffers(void);
static int apw_dump_now(bool is_bgworker, bool dump_unlogged);
static void apw_start_master_worker(void);
static void apw_start_leader_worker(void);
static void apw_start_database_worker(void);
static bool apw_init_shmem(void);
static void apw_detach_shmem(int code, Datum arg);
@ -146,11 +146,11 @@ _PG_init(void)
/* Register autoprewarm worker, if enabled. */
if (autoprewarm)
apw_start_master_worker();
apw_start_leader_worker();
}
/*
* Main entry point for the master autoprewarm process. Per-database workers
* Main entry point for the leader autoprewarm process. Per-database workers
* have a separate entry point.
*/
void
@ -716,7 +716,7 @@ autoprewarm_start_worker(PG_FUNCTION_ARGS)
errmsg("autoprewarm worker is already running under PID %lu",
(unsigned long) pid)));
apw_start_master_worker();
apw_start_leader_worker();
PG_RETURN_VOID();
}
@ -786,10 +786,10 @@ apw_detach_shmem(int code, Datum arg)
}
/*
* Start autoprewarm master worker process.
* Start autoprewarm leader worker process.
*/
static void
apw_start_master_worker(void)
apw_start_leader_worker(void)
{
BackgroundWorker worker;
BackgroundWorkerHandle *handle;
@ -801,8 +801,8 @@ apw_start_master_worker(void)
worker.bgw_start_time = BgWorkerStart_ConsistentState;
strcpy(worker.bgw_library_name, "pg_prewarm");
strcpy(worker.bgw_function_name, "autoprewarm_main");
strcpy(worker.bgw_name, "autoprewarm master");
strcpy(worker.bgw_type, "autoprewarm master");
strcpy(worker.bgw_name, "autoprewarm leader");
strcpy(worker.bgw_type, "autoprewarm leader");
if (process_shared_preload_libraries_in_progress)
{