-
Notifications
You must be signed in to change notification settings - Fork 35
Add promote() method #47
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #47 +/- ##
==========================================
+ Coverage 97.12% 97.15% +0.03%
==========================================
Files 17 17
Lines 1529 1547 +18
==========================================
+ Hits 1485 1503 +18
Misses 44 44
Continue to review full report at Codecov.
|
testgres/node.py
Outdated
# for versions below 10 `promote` is asynchronous so we need to wait | ||
# until it actually becomes writable | ||
if self._pg_version < '10': | ||
check_query = "SHOW transaction_read_only" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not safe since transactions might be read-only by default.
@@ -683,14 +683,50 @@ def reload(self, params=[]): | |||
_params = [ | |||
get_bin_path("pg_ctl"), | |||
"-D", self.data_dir, | |||
"-w", # wait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
…UC variable in promote() func
LGTM, merging |
Add missing promote() method which corresponds to pg_ctl's
promote
mode.