From: Teodor Sigaev <teodor@sigaev.ru>
To: 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: Tue, 02 Dec 2008 15:56:33 +0300
Message-ID: <49353081.9030304@sigaev.ru> (raw)
In-Reply-To: <492F04D9.5070404@enterprisedb.com>
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>
> grovel through. The situation will only be rectified at the next vacuum,
> but if there's no deletes or updates on the table, just inserts,
> autovacuum won't happen until the next anti-wraparound vacuum.
There is not agreement here, see
http://archives.postgresql.org/message-id/2818.1216753264@sss.pgh.pa.us> Yet another problem is that if so much work is offloaded to autovacuum,
> it can tie up autovacuum workers for a very long time. And the work can
> happen on an unfortunate time, when the system is busy, and affect other
> queries. There's no vacuum_delay_point()s in gininsertcleanup, so
> there's no way to throttle that work.
Will insert.
> I think we need a hard limit on the number of list pages, before we can
> consider accepting this patch. After the limit is full, the next
> inserter can flush the list, inserting the tuples in the list into the
> tree, or just fall back to regular, slow, inserts.
Hard limit is not very good decision
- If it will make a flush when limit is reached then sometimes insert or update
will take unacceptable amount of time. Small limit is not very helpful, large
will takes a lot of time. Although if we calculate limit using work_mem setting
then, may be, it will be useful. Bulk insert will collect all pending pages in
memory at once.
- Falling back to regular insert will take long time for update of whole table -
and that was one of reasons of that patch. Users forget to drop GIN index before
a global update and query runs forever.
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/
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, heikki.linnakangas@enterprisedb.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: [PATCHES] GIN improvements
In-Reply-To: <49353081.9030304@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