Re: Why the lp_len is 28 not 32?

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Why the lp_len is 28 not 32?
Дата
Msg-id fe359f0a-525e-0064-884f-0d09bc7047b6@enterprisedb.com
обсуждение исходный текст
Ответ на Why the lp_len is 28 not 32?  ("jacktby@gmail.com" <jacktby@gmail.com>)
Список pgsql-hackers
On 2/26/23 15:35, jacktby@gmail.com wrote:
> use these sqls below:
> create table t(a int);
> insert into t values(1);
> select lp,lp_off,lp_len,t_data from heap_page_items(get_raw_page('t',0));
>  lp | lp_off | lp_len |   t_data   
> ----+--------+--------+------------
>   1 |   8160 |     28 | \x01000000
> --------------------------------------------------------------------------------

Pretty sure this is because we align the data to MAXALIGN, and on x86_64
that's 8 bytes. 28 is not a multiple of 8 while 32 is.

regards

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Add LZ4 compression in pg_dump
Следующее
От: "jacktby@gmail.com"
Дата:
Сообщение: Re: Re: Why the lp_len is 28 not 32?