mirror of
https://github.com/postgres/postgres.git
synced 2025-09-11 00:12:06 +03:00
Use MyBackendType in more places to check what process this is
Remove IsBackgroundWorker, IsAutoVacuumLauncherProcess(), IsAutoVacuumWorkerProcess(), and IsLogicalSlotSyncWorker() in favor of new Am*Process() macros that use MyBackendType. For consistency with the existing Am*Process() macros. Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/message-id/f3ecd4cb-85ee-4e54-8278-5fabfb3a4ed0@iki.fi
This commit is contained in:
@@ -351,7 +351,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
|
||||
save_nestlevel = NewGUCNestLevel();
|
||||
|
||||
/* measure elapsed time iff autovacuum logging requires it */
|
||||
if (IsAutoVacuumWorkerProcess() && params->log_min_duration >= 0)
|
||||
if (AmAutoVacuumWorkerProcess() && params->log_min_duration >= 0)
|
||||
{
|
||||
if (track_io_timing)
|
||||
{
|
||||
@@ -729,7 +729,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
|
||||
vac_close_indexes(nindexes, Irel, NoLock);
|
||||
|
||||
/* Log the action if appropriate */
|
||||
if (IsAutoVacuumWorkerProcess() && params->log_min_duration >= 0)
|
||||
if (AmAutoVacuumWorkerProcess() && params->log_min_duration >= 0)
|
||||
{
|
||||
TimestampTz endtime = GetCurrentTimestamp();
|
||||
|
||||
|
Reference in New Issue
Block a user