Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Synchronous standbys#46

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

Merged
ildus merged 8 commits intopostgrespro:masterfromzilder:syncrep
Aug 8, 2019
Merged

Synchronous standbys#46

ildus merged 8 commits intopostgrespro:masterfromzilder:syncrep
Aug 8, 2019

Conversation

zilder
Copy link
Collaborator

What

A wrapper forsynchronous_standby_names server option.

Usage

fromtestgresimportget_new_node,Firstmaster=get_new_node().init().start()withmaster.replicate().start()asstandby:master.append_conf("synchronous_commit = remote_apply")master.set_synchronous_standbys(First(1, [standby]))master.restart()

@codecov-io
Copy link

codecov-io commentedJun 1, 2018
edited
Loading

Codecov Report

Merging#46 intomaster willincrease coverage by0.01%.
The diff coverage is97.67%.

Impacted file tree graph

@@            Coverage Diff             @@##           master      #46      +/-   ##==========================================+ Coverage   97.12%   97.13%   +0.01%==========================================  Files          17       18       +1       Lines        1529     1572      +43     ==========================================+ Hits         1485     1527      +42- Misses         44       45       +1
Impacted FilesCoverage Δ
testgres/__init__.py100% <100%> (ø)⬆️
testgres/standby.py100% <100%> (ø)
tests/test_simple.py99.81% <100%> (ø)⬆️
testgres/node.py96.77% <90%> (-0.18%)⬇️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update72d0373...24b0e57. Read thecomment docs.

@@ -24,3 +24,7 @@
get_bin_path, \
get_pg_config, \
get_pg_version

from .standby import \
First, \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

IMHO those names are too generic to be exported at top level.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think names are ok but should be used with the of module, likestandby.First

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@ildus I agree.

@funbringer
Copy link
Collaborator

I think we should replaceFirst andAny with aEnum-based class.

@funbringer
Copy link
Collaborator

Now we could write

node.append_conf(synchronous_standby_names=First(1, [standby]))

self.standbys = standbys

def __str__(self):
return u"{} ({})".format(self.sync_num, u", ".join(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

тут мне кажется лучше добавить ключевое слово first, чтобы было явно

@@ -24,3 +24,7 @@
get_bin_path, \
get_pg_config, \
get_pg_version

from .standby import \
First, \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think names are ok but should be used with the of module, likestandby.First

@ildusildus merged commit4c3e877 intopostgrespro:masterAug 8, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@funbringerfunbringerfunbringer left review comments

@ildusildusildus requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@zilder@codecov-io@funbringer@ildus

[8]ページ先頭

©2009-2025 Movatter.jp