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/tcop/postgres.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/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 59ab812d2e8..aec1b194424 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -3259,7 +3259,7 @@ ProcessInterrupts(void) ereport(FATAL, (errcode(ERRCODE_QUERY_CANCELED), errmsg("canceling authentication due to timeout"))); - else if (IsAutoVacuumWorkerProcess()) + else if (AmAutoVacuumWorkerProcess()) ereport(FATAL, (errcode(ERRCODE_ADMIN_SHUTDOWN), errmsg("terminating autovacuum process due to administrator command"))); @@ -3278,7 +3278,7 @@ ProcessInterrupts(void) */ proc_exit(1); } - else if (IsBackgroundWorker) + else if (AmBackgroundWorkerProcess()) ereport(FATAL, (errcode(ERRCODE_ADMIN_SHUTDOWN), errmsg("terminating background worker \"%s\" due to administrator command", @@ -3378,7 +3378,7 @@ ProcessInterrupts(void) (errcode(ERRCODE_QUERY_CANCELED), errmsg("canceling statement due to statement timeout"))); } - if (IsAutoVacuumWorkerProcess()) + if (AmAutoVacuumWorkerProcess()) { LockErrorCleanup(); ereport(ERROR, |