From: Teodor Sigaev <teodor@sigaev.ru>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCHES] GIN improvements
Date: Wed, 21 Jan 2009 15:06:44 +0300
Message-ID: <49770FD4.5030600@sigaev.ru> (raw)
In-Reply-To: <1232474489.23316.8.camel@jdavis>
References: <483FD205.4090904@sigaev.ru>
<486BC501.6060605@sigaev.ru>
<27880.1215810535@sss.pgh.pa.us>
<487A6E0C.3090600@sigaev.ru>
<8993.1216843701@sss.pgh.pa.us>
<4888A594.6010102@sigaev.ru>
<490B07BA.6030109@sigaev.ru>
<492F04D9.5070404@enterprisedb.com>
<4942A137.3000502@sigaev.ru>
<1229910966.2285.76.camel@jdavis>
<49708008.8070109@sigaev.ru>
<1232348905.7281.114.camel@jdavis>
<4974B002.3040202@sigaev.ru>
<1232474489.23316.8.camel@jdavis>
>> - 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/Attachments:
fast_insert_gin-0.23.gz (application/x-tar, 24.3K) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-patches@postgresql.org
Cc: teodor@sigaev.ru, pgsql@j-davis.com, heikki.linnakangas@enterprisedb.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: [PATCHES] GIN improvements
In-Reply-To: <49770FD4.5030600@sigaev.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox