On Fri, Aug 5, 2016 at 8:07 PM, Shay Rojansky <r...@roji.org> wrote: >> > I really don't get what's problematic with posting a message on a >> > mailing >> > list about a potential performance issue, to try to get people's >> > reactions, >> > without diving into profiling right away. I'm not a PostgreSQL >> > developer, >> > have other urgent things to do and don't even spend most of my >> > programming >> > time in C. >> >> There's absolutely nothing wrong with that. I find your questions >> helpful and interesting and I hope you will keep asking them. I think >> that they are a valuable contribution to the discussion on this list. > > Thanks for the positive feedback Robert. > > I'm glad reducing the overhead of out-of-line parameters seems like an > important goal. FWIW, if as Vladimir seems to suggest, it's possible to > bring down the overhead of the v3 extended protocol to somewhere near the > simple protocol, that would obviously be a better solution - it would mean > things work faster here and now, rather than waiting for the v4 protocol. I > have no idea if that's possible though, I'll see if I can spend some time on > understand where the slowdown comes from.
I think that's a fine thing to work on, but I don't hold out a lot of hope. If we ask the question "can you reduce the overhead vs. the status quo?" I will wager that the answer is "yes". But if you ask the question "can you make it as efficient as we could be given a protocol change?" I will wager that the answer is "no". That having been said, I don't really see a reason why we couldn't introduce a new protocol message for this without bumping the protocol version. Clients who don't know about the new message type just won't use it; nothing breaks. Clients who do know about the new message need to be careful not to send it to older servers, but since the server reports its version to the client before the first opportunity to send queries, that shouldn't be too hard. We could add a new interface to libpq that uses the new protocol message on new servers and falls back to the existing extended protocol on older servers. In general, it seems to me that we only need to bump the protocol version if there will be server-initiated communication that is incompatible with existing clients. Anything that the client can choose to initiate (or not) based on the server version should be OK. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers