Re: Multiple startup messages over the same connection - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Multiple startup messages over the same connection
Date
Msg-id 7c72475a-9ecc-4240-8c11-73a868a5b46f@iki.fi
Whole thread Raw
In response to Multiple startup messages over the same connection  (Vladimir Churyukin <vladimir@churyukin.com>)
Responses Re: Multiple startup messages over the same connection
Re: Multiple startup messages over the same connection
List pgsql-hackers
On 22/01/2024 21:58, Vladimir Churyukin wrote:
> A question about protocol design - would it be possible to extend the 
> protocol, so it can handle multiple startup / authentication messages 
> over a single connection? Are there any serious obstacles? (possible 
> issues with re-initialization of backends, I guess?)
> If that is possible, it could improve one important edge case - where 
> you have to talk to multiple databases on a single host currently, you 
> need to open a separate connection to each of them. In some cases 
> (multitenancy for example), you may have thousands of databases on a 
> host, which leads to inefficient connection utilization on clients (on 
> the db side too). A lot of other RDBMSes  don't have this limitation.

The protocol and the startup message are the least of your problems. 
Yeah, it would be nice if you could switch between databases, but the 
assumption that one backend operates on one database is pretty deeply 
ingrained in the code.

-- 
Heikki Linnakangas
Neon (https://neon.tech)




pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Fix some errdetail's message format
Next
From: Dilip Kumar
Date:
Subject: Re: Opportunistically pruning page before update