- Notifications
You must be signed in to change notification settings - Fork35
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecov-io commentedJun 4, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 beread-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.