Re: Why the lp_len is 28 not 32?

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: "jacktby(at)gmail(dot)com" <jacktby(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Why the lp_len is 28 not 32?
Date: 2023-02-26 15:35:53
Message-ID: d3f0bb2f-fac7-1183-1d01-17aa3b3e9853@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/26/23 16:11, jacktby(at)gmail(dot)com wrote:

>
> yes, So it should be 32 bytes not 28bytes, but the sql result is 28
> !!!!!! that's false!!!!

No. The tuple is 28 bytes long, and that's what's stored in lp_len. But
we align the start of the tuple to a multiple of 8 bytes. So it's at
offset 8160 because that's the closest multiple of 8. Then there's 28
bytes of data and then 4 empty bytes.

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jacktby@gmail.com 2023-02-26 15:36:18 Re: Re: Give me more details of some bits in infomask!!
Previous Message Tomas Vondra 2023-02-26 15:23:03 Re: Give me more details of some bits in infomask!!