Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index
Date
Msg-id 8172.1419439459@sss.pgh.pa.us
Whole thread Raw
In response to BUG #12292: index row size 1480 exceeds maximum 1352 for index  (robert.thaler@cellent.at)
Responses Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index
Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index
List pgsql-bugs
robert.thaler@cellent.at writes:
> I tried to upgrade from postgres 9.3.5 and imported a database export
> created by pg_dump. the import shows the following error:
> ERROR: index row size 1480 exceeds
> maximum 1352 for index "idx_sm_post_content"

I've looked into this (thanks to Robert for the test data), and the short
answer is that commit 36a35c55 approximately halved GinMaxItemSize:

 #define GinMaxItemSize \
-    MAXALIGN_DOWN(((BLCKSZ - SizeOfPageHeaderData - \
-        MAXALIGN(sizeof(GinPageOpaqueData))) / 3 - sizeof(ItemIdData)))
+    Min(INDEX_SIZE_MASK, \
+        MAXALIGN_DOWN(((BLCKSZ - SizeOfPageHeaderData -                    \
+                        MAXALIGN(sizeof(GinPageOpaqueData))) / 6 - sizeof(ItemIdData))))

What was the rationale for deciding that GIN has to be able to fit six
tuples per page???  This is going to create serious dump/reload hazards
for a lot of users.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #12326: I think maybe postgresql has a problem about timezone.
Next
From: John R Pierce
Date:
Subject: Re: BUG #12326: I think maybe postgresql has a problem about timezone.