Re: Change the bool member of the Query structure to bits

Поиск
Список
Период
Сортировка
От Quan Zongliang
Тема Re: Change the bool member of the Query structure to bits
Дата
Msg-id c82c4dc1-c3a1-45ef-9f22-d9156eb810b4@yeah.net
обсуждение исходный текст
Ответ на Re: Change the bool member of the Query structure to bits  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 2024/2/20 23:45, Tom Lane wrote:
> Quan Zongliang <quanzongliang@yeah.net> writes:
>> The Query structure has an increasing number of bool attributes. This is
>> likely to increase in the future. And they have the same properties.
>> Wouldn't it be better to store them in bits? Common statements don't use
>> them, so they have little impact. This also saves memory space.
> 
> I'm -1 on that, for three reasons:
> 
> * The amount of space saved is quite negligible.  If queries had many
> Query structs then it could matter, but they don't.
> 
> * This causes enough code churn to create a headache for back-patching.
> 
> * This'll completely destroy the readability of these flags in
> pprint output.
> 
> I'm not greatly in love with the macro layer you propose, either,
> but those details don't matter because I think we should just
> leave well enough alone.
> 
>             regards, tom lane
I get it. Withdraw.




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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Add lookup table for replication slot invalidation causes
Следующее
От: Quan Zongliang
Дата:
Сообщение: Re: Change the bool member of the Query structure to bits