File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -479,7 +479,7 @@ def get_auxiliary_pids(self):
479479
480480 result = {}
481481 for child in children :
482- line = child .cmdline ()[ 0 ]
482+ line = ' ' . join ( child .cmdline ())
483483 for ptype in ProcessType :
484484 if ptype == ProcessType .WalSender \
485485 and (line .startswith (ptype .value ) or
@@ -513,8 +513,10 @@ def get_walsender_pid(self):
513513 for name , client_port in self ._master .execute (sql ):
514514 if name == self .name :
515515 for child in children :
516- line = child .cmdline ()[0 ]
517- if line .startswith ('postgres: walsender' ) and str (client_port ) in line :
516+ line = ' ' .join (child .cmdline ())
517+ if (line .startswith (ProcessType .WalSender .value ) or
518+ line .startswith ('postgres: wal sender' )) and \
519+ str (client_port ) in line :
518520 return child .pid
519521
520522 return None
Original file line number Diff line number Diff line change @@ -709,15 +709,17 @@ def test_pids(self):
709709 except ImportError :
710710 psutil = None
711711
712- master_processes = (
712+ master_processes = [
713713 ProcessType .Checkpointer ,
714714 ProcessType .BackgroundWriter ,
715715 ProcessType .WalWriter ,
716716 ProcessType .AutovacuumLauncher ,
717717 ProcessType .StatsCollector ,
718- ProcessType .LogicalReplicationLauncher ,
719718 ProcessType .WalSender ,
720- )
719+ ]
720+ if pg_version_ge ('10' ):
721+ master_processes .append (ProcessType .LogicalReplicationLauncher )
722+
721723 repl_processes = (
722724 ProcessType .Startup ,
723725 ProcessType .Checkpointer ,
You can’t perform that action at this time.
0 commit comments