Re: ERROR: index row size 2720 exceeds btree version 4 maximum 2704 for index in V14 but pg_column_size calculates 2701

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Vitale, Anthony, Sony Music" <anthony(dot)vitale(at)sonymusic(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: ERROR: index row size 2720 exceeds btree version 4 maximum 2704 for index in V14 but pg_column_size calculates 2701
Date: 2024-04-24 16:57:03
Message-ID: 3722468.1713977823@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Vitale, Anthony, Sony Music" <anthony(dot)vitale(at)sonymusic(dot)com> writes:
> I am trying to figure out how to calculate a column size in my UTF8 encoded Postgresql V14 instance in order to avoid the error exceeds btree version 4 maximum 2704 and I am obviously not doing it correctly using pg_column_size as when I do I get 2701 which is lower than 2704.

I think you're not accounting for overhead. The reported index row
size would include the index tuple header (8 bytes) as well as
alignment padding.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Yongye Serkfem 2024-04-25 12:34:57 pg_basebackup Failed
Previous Message Vitale, Anthony, Sony Music 2024-04-24 16:40:56 ERROR: index row size 2720 exceeds btree version 4 maximum 2704 for index in V14 but pg_column_size calculates 2701