Set citus.local_hostname (#2903)

There are cases when Citus wants to have a connection to the local postgres. By default it uses `localhost` for that, which is not alwasy available. To solve it we will set `citus.local_hostname` GUC to custom value, which is the same as Patroni uses to connect to Postgres.
This commit is contained in:
Alexander Kukushkin
2023-10-16 10:21:50 +02:00
committed by GitHub
parent 42976df86f
commit d93db20baa
5 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ class TestBootstrap(BaseTestPostgresql):
mock_cancellable_subprocess_call.assert_called()
args, kwargs = mock_cancellable_subprocess_call.call_args
self.assertTrue('PGPASSFILE' in kwargs['env'])
self.assertEqual(args[0], ['/bin/false', 'dbname=postgres host=127.0.0.2 port=5432'])
self.assertEqual(args[0], ['/bin/false', 'dbname=postgres host=/tmp port=5432'])
mock_cancellable_subprocess_call.reset_mock()
self.p.connection_pool._conn_kwargs.pop('host')