Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap [Review]

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jameison Martin <jameisonb(at)yahoo(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila(at)huawei(dot)com>, Kevin Grittner <kgrittn(at)mail(dot)com>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, "josh(at)agliodbs(dot)com" <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap [Review]
Date: 2013-01-25 01:35:54
Message-ID: CAM-w4HOiT8actZr_HUeoB7m+ddU91_fZaeLEE-7PKijKTPa+Ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 24, 2013 at 8:17 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> As I said, I'd be willing to take this risk if the patch showed more
> attractive performance benefits ... but it still seems mighty marginal
> from here.

I think the benchmarks given so far are actually barking up the wrong
tree though. There are usage patterns that some people do engage in
that involve dozens or hundreds of columns that are mostly NULL. If
they're saving 10-20 bytes per row that's not insignificant. And they
could be saving much more than that.

That said I don't know just how common that usage pattern is. And I'm
not sure how many of those people would be able to arrange for the
null columns to land at the end of the row.

It's a bit frustrating because it does seem like if it had been
written this way to begin with nobody would every have questioned
whether it was a good idea and nobody would ever have suggested
ripping it out.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-01-25 01:40:03 Re: logical changeset generation v4 - Heikki's thoughts about the patch state
Previous Message Andres Freund 2013-01-25 01:35:08 Re: logical changeset generation v4 - Heikki's thoughts about the patch state