pgsql: Use MyBackendType in more places to check what process this is

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use MyBackendType in more places to check what process this is
Date: 2024-03-04 08:32:38
Message-ID: E1rh3kU-0020br-Ay@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/393b5599e5177e456cdce500039813629d370b38

Modified Files
--------------
src/backend/access/gin/ginfast.c | 2 +-
src/backend/access/gin/ginvacuum.c | 6 +++---
src/backend/access/heap/vacuumlazy.c | 4 ++--
src/backend/commands/analyze.c | 4 ++--
src/backend/commands/vacuum.c | 8 ++++----
src/backend/postmaster/autovacuum.c | 26 --------------------------
src/backend/postmaster/bgworker.c | 2 --
src/backend/postmaster/postmaster.c | 3 ---
src/backend/replication/logical/slotsync.c | 16 +---------------
src/backend/statistics/extended_stats.c | 2 +-
src/backend/storage/ipc/ipc.c | 2 +-
src/backend/storage/lmgr/proc.c | 23 +++++++++++------------
src/backend/tcop/postgres.c | 6 +++---
src/backend/utils/activity/pgstat_relation.c | 4 ++--
src/backend/utils/init/globals.c | 1 -
src/backend/utils/init/miscinit.c | 4 ++--
src/backend/utils/init/postinit.c | 8 ++++----
src/include/miscadmin.h | 6 +++++-
src/include/postmaster/autovacuum.h | 5 -----
src/include/replication/slotsync.h | 1 -
20 files changed, 42 insertions(+), 91 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-03-04 09:59:22 pgsql: doc: Fix datatype for postgres_fdw option
Previous Message Dilip Kumar 2024-03-04 06:14:48 Re: pgsql: Improve performance of subsystems on top of SLRU