Re: still gin index creation takes forever

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>, pgsql-general(at)postgresql(dot)org
Subject: Re: still gin index creation takes forever
Date: 2008-11-12 14:31:06
Message-ID: 491AE8AA.3050507@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-general by date

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