Re: [HACKERS] Client Connection redirection support for PostgreSQL - Mailing list pgsql-hackers

From Dave Cramer
Subject Re: [HACKERS] Client Connection redirection support for PostgreSQL
Date
Msg-id CADK3HHKa_92VeWDWaA8F9qvWtWZjGpU1=3iK3hs4pWDyKJGdgA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Client Connection redirection support for PostgreSQL  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] Client Connection redirection support for PostgreSQL  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers


One thing where I can see a feature like this being quite helpful is
planned failovers, reducing the time to reconnect (for existing
connections) and rediscover (for new connections, which need to
write). But that'd require that the redirect needs to be able to be sent
in an established connection too.


Somewhat related to this feature is the notion of giving a hint as to whether a connection is read only.

Currently we can create a read only transaction which at this point pgpool through some machinations which are less than favourable IMO
can connect to a secondary. This even works with the JDBC driver which has setReadOnly facility on connections. 

However it would be far better to have a startup parameter which indicated that we wanted to connect to a read only database. At that point
pools could redirect to a secondary. Given the proliferation of cloud based implementations I can see this being a useful feature.

 
Regards,

Dave Cramer

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Client Connection redirection support for PostgreSQL
Next
From: Heikki Linnakangas
Date:
Subject: Re: GiST VACUUM