Skip to content

[#240] Using of node.psql with other host and port #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 28, 2025

Conversation

dmitry-lipetsk
Copy link
Collaborator

@dmitry-lipetsk dmitry-lipetsk commented Apr 25, 2025

This patch adds the support of using other host and port in the following methods:

  • PostgresNode.psql (explicit new args: host and port)
  • PostgresNode.safe_psql (indirectly through **kwargs)

It allows to run psql utility from one PostgreSQL instance to work with another one.

If explicit host and port are not defined (are None), PostgresNode will use own ones.

This patch closes #240.

When we do not have root __init__.py tests must to import testgres through

"import testgres"

not through

"from <relative_path> import testgres"
This patch adds the support of using other host and port in the following methods:

- PostgresNode.psql (explicit new args: host and port)
- PostgresNode.safe_psql (indirectly through **kwargs)

It allows to run psql utility from one PostgreSQL instance to work with another one.

If explicit host and port are not defined (are None), PostgresNode will use own ones.

This patch closes postgrespro#240.
@dmitry-lipetsk
Copy link
Collaborator Author

Patch was tested with probackup2 - ok.

@dmitry-lipetsk dmitry-lipetsk merged commit 94d7572 into postgrespro:master Apr 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant