@@ -458,6 +458,21 @@ def get_child_processes(self):
458458def get_auxiliary_pids (self ):
459459''' Returns dict with pids of auxiliary processes '''
460460
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+
461476children = self .get_child_processes ()
462477if children is None :
463478return None
@@ -467,11 +482,20 @@ def get_auxiliary_pids(self):
467482line = child .cmdline ()[0 ]
468483for ptype in ProcessType :
469484if ptype == ProcessType .WalSender \
470- and line .startswith (ptype .value ):
485+ and (line .startswith (ptype .value )or
486+ line .startswith ('postgres: wal sender' )):
471487result .setdefault (ptype , [])
472488result [ptype ].append (child .pid )
489+ break
473490elif line .startswith (ptype .value ):
474491result [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
475499
476500return result
477501