Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, pgsql-bugs(at)postgresql(dot)org, robert(dot)thaler(at)cellent(dot)at
Subject: Re: BUG #12292: index row size 1480 exceeds maximum 1352 for index
Date: 2014-12-25 00:29:48
Message-ID: CAB7nPqQ6eYD-JKFfd5jFT8Zn3uMa4P9munBdkVyScanz0Z=7yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Dec 25, 2014 at 1:44 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> robert(dot)thaler(at)cellent(dot)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.
Not completely related, but I just recalled seeing the same
limitations with jsonb:
http://www.postgresql.org/message-id/CAB7nPqT8OYHCPKU4nMYdqa_xZH1+8JFbtP=B+kjk6RZU5zGxGg@mail.gmail.com
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message egoitz 2014-12-26 10:16:35 BUG #12344: libcurses issue with psql binary of Solaris package
Previous Message John R Pierce 2014-12-24 18:01:31 Re: BUG #12326: I think maybe postgresql has a problem about timezone.