Re: Patch: Implement failover on libpq connect level.
Thom Brown <thom@linux.com>
From: Thom Brown <thom@linux.com>
To: Victor Wagner <vitus@wagner.pp.ru>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-01-19T14:34:54Z
Lists: pgsql-hackers
On 21 December 2015 at 14:50, Victor Wagner <vitus@wagner.pp.ru> wrote: > On Mon, 21 Dec 2015 17:18:37 +0300 > Teodor Sigaev <teodor@sigaev.ru> wrote: > >> Sorry, but there is something wrong with your patch: >> % patch -p1 -C < ~/Downloads/libpq-failover-5.patch > > Really, somehow broken version of the patch got into message. > > Here is correct one. The segfault issue I originally reported now appears to be resolved. But now I have another one: psql 'postgresql://thom@127.0.0.1:5530,127.0.0.1:5531,127.0.0.1:5532,127.0.0.1:5533/postgres?hostorder=random&readonly=1&failover_timeout=5' -c 'show port' Segmentation fault This is where no nodes are available. If I remove hostorder=random, or replace it with hostorder=sequential, it doesn't segfault. However, it then tries to connect to PGHOST on PGPORT repeatedly, even if I bring up one of the nodes it should be looking for. Not only this, but it seems to do it forever if failover_timeout is greater than 0. Thom
Commits
-
libpq: Add target_session_attrs parameter.
- 721f7bd3cbcc 10.0 landed
-
Remove superuser checks in pgstattuple
- fd321a1dfd64 10.0 cited
-
Fix unwanted flushing of libpq's input buffer when socket EOF is seen.
- c405918858c0 9.6.0 cited