Re: [HACKERS] 64-bit queryId?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] 64-bit queryId?
Дата
Msg-id CAB7nPqS7kSWTMRH7+bDJs3+vx0k4CRF0Aptie2BmeN7B3Jv9vg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] 64-bit queryId?  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers
On Tue, Oct 3, 2017 at 9:07 AM, Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> +1,
> I see 3 options there:
> 1) Drop high-order bit, as you proposed.
> 2) Allow negative queryIds.
> 3) Implement unsigned 64-type.
>
> #1 causes minor loss of precision which looks rather insignificant in given
> context.
> #2 might be rather unexpected for users whose previously had non-negative
> queryIds.  Changing queryId from 32-bit to 64-bit itself might require some
> adoption from monitoring software. But queryIds are user-visible, and
> negative queryIds would look rather nonlogical.

Per the principal of least astonishment perhaps:
https://en.wikipedia.org/wiki/Principle_of_least_astonishment
Negative values tend to be considered as error codes as well.

> #3 would be attaching hard and long-term problem by insufficient reason.
> Thus, #1 looks like most harmless solution.

In this case going for #1 looks like the safest bet.
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] [sqlsmith] stuck spinlock in pg_stat_get_wal_receiverafter OOM
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Logging idle checkpoints