* debian/patches/fix_replication_connection.patch: New patch, fixes the
initiation of replication connections for version 10 and up, taken from proposed upstream commit e285e159.
This commit is contained in:
parent
5b93c19bbf
commit
a8522c6f39
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -5,6 +5,9 @@ patroni (1.5.4-4) UNRELEASED; urgency=medium
|
|||
manual instead of disabled, in lines with pg_creatcluster_patroni.
|
||||
* debian/config.yml.in: Make PostgreSQL to also listen to 127.0.0.1 by
|
||||
default.
|
||||
* debian/patches/fix_replication_connection.patch: New patch, fixes the
|
||||
initiation of replication connections for version 10 and up, taken from
|
||||
proposed upstream commit e285e159.
|
||||
|
||||
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Sun, 27 Jan 2019 14:40:18 +0100
|
||||
|
||||
|
|
27
debian/patches/fix_replication_connection.patch
vendored
Normal file
27
debian/patches/fix_replication_connection.patch
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
From e285e1592750bc9f5f9a73a5a7dc0f1274f545a9 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kukushkin <alexander.kukushkin@zalando.de>
|
||||
Date: Mon, 28 Jan 2019 12:25:47 +0100
|
||||
Subject: [PATCH] Always use replication=1, otherwise it is considered a
|
||||
logical walsender
|
||||
|
||||
Fixes: https://github.com/zalando/patroni/issues/894
|
||||
Fixes: https://github.com/zalando/patroni/issues/951
|
||||
---
|
||||
patroni/postgresql.py | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
Index: patroni/patroni/postgresql.py
|
||||
===================================================================
|
||||
--- patroni.orig/patroni/postgresql.py
|
||||
+++ patroni/patroni/postgresql.py
|
||||
@@ -1254,9 +1254,7 @@ class Postgresql(object):
|
||||
|
||||
@contextmanager
|
||||
def _get_replication_connection_cursor(self, host='localhost', port=5432, database=None, **kwargs):
|
||||
- database = database or self._database
|
||||
- replication = 'database' if self._major_version >= 90400 else 1
|
||||
- with self._get_connection_cursor(host=host, port=int(port), database=database, replication=replication,
|
||||
+ with self._get_connection_cursor(host=host, port=int(port), database=database or self._database, replication=1,
|
||||
user=self._replication['username'], password=self._replication['password'],
|
||||
connect_timeout=3, options='-c statement_timeout=2000') as cur:
|
||||
yield cur
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -8,3 +8,4 @@ acceptance_tests_system_patroni.patch
|
|||
automatic_primary_reinit.patch
|
||||
patronictl_timeline_info.patch
|
||||
acceptance_tests_postgres_port.patch
|
||||
fix_replication_connection.patch
|
||||
|
|
Loading…
Reference in a new issue