Skip to content

Detection of zombi postmaster is added (NodeStatus.Zombie)#394

Merged
dmitry-lipetsk merged 2 commits into
postgrespro:masterfrom
dmitry-lipetsk:D20260712_002--zombie
Jul 12, 2026
Merged

Detection of zombi postmaster is added (NodeStatus.Zombie)#394
dmitry-lipetsk merged 2 commits into
postgrespro:masterfrom
dmitry-lipetsk:D20260712_002--zombie

Conversation

@dmitry-lipetsk

@dmitry-lipetsk dmitry-lipetsk commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

When we kill vanila-postmaster (10-18) on remote machine it becomes 'zombie'.

pg_ctl says that node is started, by by fact it is not so.

Now PostgresNode::status checks a postmaster process status (via /proc/<pid>/stat) and if 'Z' (zombie) is detected, this method returns a status: NodeStatus.Zombie.

Just for info: PG ENT does not have a such problem.

dmitry-lipetsk and others added 2 commits July 12, 2026 16:32
When we kill vanila-postmaster (10-18) on remote machine it becomes 'zombie'.

pg_ctl says that node is started, by by fact it is not so.

Now PostgresNode::status() check a postmaster process status (via /proc/<pid>/stat) and if 'Z' (zombie) is detected, this method returns the a status: NodeStatus.Zombie.

Just for info: PG ENT does not have a such problem.

Co-authored-by: Mark G. <mark@google.com>
We may catch a zombie during a node stop:

"FAILED tests/test_testgres_common.py::TestTestgresCommon::test_pg_ctl_wait_option[local] - Exception: Unexpected node status: 3."

It was on astralinux_1_7.
dmitry-lipetsk added a commit to dmitry-lipetsk/testgres that referenced this pull request Jul 12, 2026
@dmitry-lipetsk dmitry-lipetsk merged commit 1ad0a56 into postgrespro:master Jul 12, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant