Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add PostgreSQL 13 support #55

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 1 commit into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ env:
- PYTHON_VERSION=2 PG_VERSION=9.6
- PYTHON_VERSION=2 PG_VERSION=9.5
- PYTHON_VERSION=2 PG_VERSION=9.4
- PYTHON_VERSION=3 PG_VERSION=13
- PYTHON_VERSION=3 PG_VERSION=12
- PYTHON_VERSION=3 PG_VERSION=11
- PYTHON_VERSION=3 PG_VERSION=10
Expand Down
1 change: 1 addition & 0 deletions testgres/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
MAX_REPLICATION_SLOTS = 10
MAX_WORKER_PROCESSES = 10
WAL_KEEP_SEGMENTS = 20
WAL_KEEP_SIZE = 320
MAX_WAL_SENDERS = 10

# logical replication settings
Expand Down
11 changes: 8 additions & 3 deletions testgres/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,14 @@ def get_auth_method(t):
# select a proper wal_level for PostgreSQL
wal_level = 'replica' if self._pg_version >= '9.6' else 'hot_standby'

self.append_conf(hot_standby=True,
wal_keep_segments=WAL_KEEP_SEGMENTS,
wal_level=wal_level) # yapf: disable
if self._pg_version < '13':
self.append_conf(hot_standby=True,
wal_keep_segments=WAL_KEEP_SEGMENTS,
wal_level=wal_level) # yapf: disable
else:
self.append_conf(hot_standby=True,
wal_keep_size=WAL_KEEP_SIZE,
wal_level=wal_level) # yapf: disable

# logical replication
if allow_logical:
Expand Down