Re: Lowering the ever-growing heap->pd_lower - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Lowering the ever-growing heap->pd_lower
Date
Msg-id 20220408211815.jac65f5qlmu43sjj@alap3.anarazel.de
Whole thread Raw
In response to Re: Lowering the ever-growing heap->pd_lower  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Lowering the ever-growing heap->pd_lower
List pgsql-hackers
Hi,

On 2022-04-08 15:04:37 -0400, Robert Haas wrote:
> I meant wasting space in the page. I think that's a real concern.
> Imagine you allowed 1000 line pointers per page. Each one consumes 2
> bytes.

It's 4 bytes per line pointer, right?

struct ItemIdData {
        unsigned int               lp_off:15;            /*     0: 0  4 */
        unsigned int               lp_flags:2;           /*     0:15  4 */
        unsigned int               lp_len:15;            /*     0:17  4 */

        /* size: 4, cachelines: 1, members: 3 */
        /* last cacheline: 4 bytes */
};

Or am I confusing myself somehow?


I do wish the length of the tuple weren't in ItemIdData, but part of the
tuple, so we'd not waste this space for dead items (I think it'd also simplify
more code than it'd complicate). But ...

- Andres



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Lowering the ever-growing heap->pd_lower
Next
From: Peter Geoghegan
Date:
Subject: Re: Lowering the ever-growing heap->pd_lower