Skip to content

Conversation

@dmitry-lipetsk
Copy link
Collaborator

@dmitry-lipetsk dmitry-lipetsk commented Jan 4, 2026

PostgresNode::is_started provides information about a manually started node.

It is "set" in start method and is "reset" in stop, kill methods.

These methods do not verify this flag and do not use for other aims - for example to ignore the second start or stop of a node.

So we cannot stop and start our node twice.

An updated implementation of kill method raises InvalidOperationException when our node is not running.

This patch allows to use testgres in code where a node started or stopped explicitly, not via start/stop/kill methods.

PostgresNode::is_started provides information about a manually started node.

It is "set" in start method and is reset in stop, kill methods.

These methods do not verify this flag.

So we cannot stop and start our node twice.

An updated implementation of kill method raises InvalidOperationException when our node is not running.
@dmitry-lipetsk dmitry-lipetsk changed the title PostgresNode::is_started is read-only and does not used internally PostgresNode::is_started is read-only and is not used internally Jan 5, 2026
@dmitry-lipetsk dmitry-lipetsk merged commit bfe3456 into postgrespro:master Jan 8, 2026
1 check 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