Re: Why the lp_len is 28 not 32? - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Why the lp_len is 28 not 32?
Date
Msg-id d3f0bb2f-fac7-1183-1d01-17aa3b3e9853@enterprisedb.com
Whole thread Raw
In response to Re: Re: Why the lp_len is 28 not 32?  ("jacktby@gmail.com" <jacktby@gmail.com>)
List pgsql-hackers
On 2/26/23 16:11, jacktby@gmail.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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Give me more details of some bits in infomask!!
Next
From: "jacktby@gmail.com"
Date:
Subject: Re: Re: Give me more details of some bits in infomask!!