Remove redundant Assert(PgArchPID == 0); in PostmasterStateMachine
Hi,
It looks like the commit d75288fb [1]commit d75288fb27b8fe0a926aaab7d75816f091ecdc27 Author: Fujii Masao <fujii@postgresql.org> Date: Mon Mar 15 13:13:14 2021 +0900 added an unnecessary
Assert(PgArchPID == 0); in PostmasterStateMachine as the if block code
gets hit only when PgArchPID == 0. PSA small patch.
[1]: commit d75288fb27b8fe0a926aaab7d75816f091ecdc27 Author: Fujii Masao <fujii@postgresql.org> Date: Mon Mar 15 13:13:14 2021 +0900
commit d75288fb27b8fe0a926aaab7d75816f091ecdc27
Author: Fujii Masao <fujii@postgresql.org>
Date: Mon Mar 15 13:13:14 2021 +0900
Make archiver process an auxiliary process.
Regards,
Bharath Rupireddy.
Attachments:
v1-0001-Remove-redundant-Assert-PgArchPID-0-inPostmasterS.patchapplication/octet-stream; name=v1-0001-Remove-redundant-Assert-PgArchPID-0-inPostmasterS.patchDownload
From f0699c6cd83e8bbee6b8f8f7c96dc45d8ae4ae87 Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: Wed, 14 Jul 2021 17:26:16 +0000
Subject: [PATCH v1] Remove redundant Assert(PgArchPID == 0);
in PostmasterStateMachine
The commit d75288fb added an unnecessary Assert(PgArchPID == 0);
as the if block code gets hit only when PgArchPID == 0. Remove that
assertion.
---
src/backend/postmaster/postmaster.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 5a050898fe..122c2b05bd 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -3934,7 +3934,6 @@ PostmasterStateMachine(void)
Assert(CheckpointerPID == 0);
Assert(WalWriterPID == 0);
Assert(AutoVacPID == 0);
- Assert(PgArchPID == 0);
/* syslogger is not considered here */
pmState = PM_NO_CHILDREN;
}
--
2.25.1
On Wed, Jul 14, 2021 at 11:38:59PM +0530, Bharath Rupireddy wrote:
It looks like the commit d75288fb [1] added an unnecessary
Assert(PgArchPID == 0); in PostmasterStateMachine as the if block code
gets hit only when PgArchPID == 0. PSA small patch.
Agreed that there is no need to keep that around. Will fix.
--
Michael
On 2021/07/15 11:21, Michael Paquier wrote:
On Wed, Jul 14, 2021 at 11:38:59PM +0530, Bharath Rupireddy wrote:
It looks like the commit d75288fb [1] added an unnecessary
Assert(PgArchPID == 0); in PostmasterStateMachine as the if block code
gets hit only when PgArchPID == 0. PSA small patch.
Good catch, Thanks!
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION