Re: Bit data type header reduction in some cases

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bit data type header reduction in some cases
Date: 2014-02-26 00:28:46
Message-ID: 20140226002846.GA28999@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 25, 2014 at 09:32:55AM -0500, Tom Lane wrote:
> Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
> > On 02/25/2014 08:23 AM, Haribabu Kommi wrote:
> >> 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.
>
> > [ various contorted schemes for doing that backward-compatibly ]
>
> TBH, this sounds like a huge amount of effort and a significant risk of
> new bugs in return for not darn much. Who uses bit values anyway?
> They were removed from the SQL spec more than 10 years ago. And of that
> population, who cares about a byte or two per value? The field demand
> for this is not only zero, it's probably negative. (The thread referenced
> by the TODO entry shows no evidence of user demand.)

OK, TODO item removed.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-02-26 00:36:04 In which good intentions are punished, take 2
Previous Message Josh Berkus 2014-02-26 00:08:59 Re: pg_dumpall reccomendation in release notes