Re: [PATCHES] GIN improvements - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: [PATCHES] GIN improvements
Date
Msg-id 49770FD4.5030600@sigaev.ru
Whole thread Raw
In response to Re: [PATCHES] GIN improvements  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: [PATCHES] GIN improvements
List pgsql-hackers
>> - after limit is reached, force cleanup of pending list by calling
>> gininsertcleanup. Not very good, because users sometimes will see a huge
>> execution time of simple insert. Although users who runs a huge update should be
>> satisfied.
>>
>> I have difficulties in a choice of way. Seems to me, the better will be second
>> way: if user gets very long time of insertion then (auto)vacuum of his
>> installation should tweaked.
> I agree that the second solution sounds better to me.


Done. Now GIN counts number of pending tuples and pages and stores they on
metapage. Index cleanup could start during normal insertion in two cases:
- number of pending tuples is too high to keep guaranteed non-lossy tidbitmap
- pending page's content doesn't fit into work_mem.

BTW, gincostestimate could use that information for cost estimation, but is
index opening and metapge reading in amcostestimate acceptable?



--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: about truncate
Next
From: "Jonah H. Harris"
Date:
Subject: Re: [PATCH] EnableDisableTrigger Cleanup & Questions