Bit data type header reduction in some cases

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Bit data type header reduction in some cases
Дата
Msg-id CAJrrPGc9CbOdHN6gs_e-XnJBaNLued--8XxWB7PpOCwCC9938Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bit data type header reduction in some cases  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
Hi,

It's regarding a Todo item of "Bit data type header reduction" in some cases. The header contains two parts. 1)  The varlena header is automatically converted to 1 byte header from 4 bytes in case of small data. 2) The bit length header called "bit_len" to store the actual bit length which is of 4 bytes in size. I want to reduce this bit_len size to 1 byte in some cases as similar to varlena header. With this change the size of the column reduced by 3 bytes, thus shows very good decrease in disk usage.

I am planning to the change it based on the total length of bits data. If the number of bits is less than 0x7F then one byte header can be chosen instead of 4 byte header. During reading of the data, the similar way it can be calculated.

The problem I am thinking is, as it can cause problems to old databases having bit columns when they
upgrade to a newer version without using pg_dumpall. Is there anyway to handle this problem? Or Is there any better way to handle the problem itself? please let me know your suggestions.

Regards,
Hari Babu
Fujitsu Australia

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Dump pageinspect to 1.2: page_header with pg_lsn datatype
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Bit data type header reduction in some cases