@@ -458,6 +458,21 @@ def get_child_processes(self):
458
458
def get_auxiliary_pids (self ):
459
459
''' Returns dict with pids of auxiliary processes '''
460
460
461
+ alternative_names = {
462
+ ProcessType .LogicalReplicationLauncher : [
463
+ 'postgres: bgworker: logical replication launcher'
464
+ ],
465
+ ProcessType .BackgroundWriter : [
466
+ 'postgres: writer' ,
467
+ ],
468
+ ProcessType .WalWriter : [
469
+ 'postgres: wal writer' ,
470
+ ],
471
+ ProcessType .WalReceiver : [
472
+ 'postgres: wal receiver' ,
473
+ ],
474
+ }
475
+
461
476
children = self .get_child_processes ()
462
477
if children is None :
463
478
return None
@@ -467,11 +482,20 @@ def get_auxiliary_pids(self):
467
482
line = child .cmdline ()[0 ]
468
483
for ptype in ProcessType :
469
484
if ptype == ProcessType .WalSender \
470
- and line .startswith (ptype .value ):
485
+ and (line .startswith (ptype .value )or
486
+ line .startswith ('postgres: wal sender' )):
471
487
result .setdefault (ptype , [])
472
488
result [ptype ].append (child .pid )
489
+ break
473
490
elif line .startswith (ptype .value ):
474
491
result [ptype ]= child .pid
492
+ break
493
+ elif ptype in alternative_names :
494
+ names = alternative_names [ptype ]
495
+ for name in names :
496
+ if line .startswith (name ):
497
+ result [ptype ]= child .pid
498
+ break
475
499
476
500
return result
477
501