Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1bd538f

Browse files
committed
Add older names support for pids
1 parent3a24554 commit1bd538f

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

‎testgres/node.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,21 @@ def get_child_processes(self):
458458
defget_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+
461476
children=self.get_child_processes()
462477
ifchildrenisNone:
463478
returnNone
@@ -467,11 +482,20 @@ def get_auxiliary_pids(self):
467482
line=child.cmdline()[0]
468483
forptypeinProcessType:
469484
ifptype==ProcessType.WalSender \
470-
andline.startswith(ptype.value):
485+
and (line.startswith(ptype.value)or
486+
line.startswith('postgres: wal sender')):
471487
result.setdefault(ptype, [])
472488
result[ptype].append(child.pid)
489+
break
473490
elifline.startswith(ptype.value):
474491
result[ptype]=child.pid
492+
break
493+
elifptypeinalternative_names:
494+
names=alternative_names[ptype]
495+
fornameinnames:
496+
ifline.startswith(name):
497+
result[ptype]=child.pid
498+
break
475499

476500
returnresult
477501

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp