Re: Extensibility of the PostgreSQL wire protocol
Alvaro Hernandez <aht@ongres.com>
From: Álvaro Hernández <aht@ongres.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>,
Damir Simunic <damir.simunic@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>,
"Jonah H. Harris" <jonah.harris@gmail.com>, Jan Wieck <jan@wi3ck.info>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-02-19T20:32:30Z
Lists: pgsql-hackers
On 19/2/21 14:48, Heikki Linnakangas wrote: > [...] > > I can see value in supporting different protocols. I don't like the > approach discussed in this thread, however. > > For example, there has been discussion elsewhere about integrating > connection pooling into the server itself. For that, you want to have > a custom process that listens for incoming connections, and launches > backends independently of the incoming connections. These hooks would > not help with that. > > Similarly, if you want to integrate a web server into the database > server, you probably also want some kind of connection pooling. A > one-to-one relationship between HTTP connections and backend processes > doesn't seem nice. While I'm far from an HTTP/2 expert and I may be wrong, from all I know HTTP/2 allows to create full-duplex, multiplexed, asynchronous channels. So multiple connections can be funneled through a single connection. This decreases the need and aim for connection pooling. It doesn't eliminate it completely, as you may have the channel busy if a single tenant is sending a lot of data; and you could not have more than one concurrent action from a single tenant. OTOH, given these HTTP/2 properties, a non-pooled HTTP/2 endpoint may provide already significant benefits due to the multiplexing capabilities. So definitely we don't need to consider an HTTP endpoint would entail a 1:1 mapping between connections and backend processes. Álvaro -- Alvaro Hernandez ----------- OnGres