diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-03-04 10:25:12 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-03-04 10:25:12 +0200 |
commit | 393b5599e5177e456cdce500039813629d370b38 (patch) | |
tree | bafd118d5dd94f63bcc711457a6d9c9248064051 /src/backend/commands/analyze.c | |
parent | 067701f57758f9baed5bd9d868539738d77bfa92 (diff) | |
download | postgresql-393b5599e5177e456cdce500039813629d370b38.tar.gz postgresql-393b5599e5177e456cdce500039813629d370b38.zip |
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
Diffstat (limited to 'src/backend/commands/analyze.c')
-rw-r--r-- | src/backend/commands/analyze.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index a03495d6c95..d105d2fad7b 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -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(); |