Re: PQ versions request message

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PQ versions request message
Дата
Msg-id 2241.1126144970@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PQ versions request message  (James William Pye <pgsql@jwp.name>)
Ответы Re: PQ versions request message  (James William Pye <pgsql@jwp.name>)
Список pgsql-hackers
James William Pye <pgsql@jwp.name> writes:
> I have been writing a PQ client and I have come to think that a
> "supported PQ versions request startup packet" would be useful to client
> authors.

Given that it'd be guaranteed not to work with any existing server
versions, I find the usefulness a bit debatable...

In particular I disagree with the premise that clients should expend an
extra connection setup/teardown cycle to find out which protocol
versions the server supports.  We change protocol versions seldom enough
that I think the optimal strategy is "try the newest version you know
of, then back off one at a time until it works".  This is always optimal
if the server is newer than the client, and it's only pessimal if the
server is much older than the client --- how often does that happen?

To put it more concretely: there are currently only two protocol
versions in live use (V1 died a long time ago).  If you try V3 and then
V2, you will expend either one or two connection cycles, with the
average converging towards one as time passes and more people update
their servers.  If you probe for the right answer and then do it, you
will always expend two connection cycles.  That is a win how exactly?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: pg_config/share_dir
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Attention PL authors: want to be listed in template table?