Re: still gin index creation takes forever - Mailing list pgsql-general

From Teodor Sigaev
Subject Re: still gin index creation takes forever
Date
Msg-id 491AE8AA.3050507@sigaev.ru
Whole thread Raw
In response to Re: still gin index creation takes forever  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: still gin index creation takes forever
List pgsql-general
>> Any suggestion about how to track down the problem?
>
> What you are describing sounds rather like a use-of-uninitialized-memory
> problem, wherein the behavior depends on what happened to be in that
> memory previously.  If so, using a debug/cassert-enabled build of
> Postgres might help to make the behavior more reproducible.

It seems to me, possible reason of that behavior could be an order of table's
scanning. GIN's build algorithm prefers scan from begin to the end of table, but
in 8.3 it's not always true - scan may begin from the middle or end of table
depending on sequence scan's history.

GIN's build algorithm could use bulk insert of ItemPointers if and only if they
should be inserted on rightmost page (exact piece of code - dataPlaceToPage() in
gindatapage.c, lines 407-427)

Is any way to force table's scan from the beginning?
--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: how to "group" several records with same timestamp into one line?
Next
From: "Grzegorz Jaśkiewicz"
Date:
Subject: sort_mem param of postgresql.conf