pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Teodor Sigaev <teodor@sigaev.ru>
Cc: Oleg Bartunov <oleg@sai.msu.su>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCHES] GIN improvements
Date: Tue, 22 Jul 2008 15:01:04 -0400
Message-ID: <2818.1216753264@sss.pgh.pa.us> (raw)
In-Reply-To: <488625E8.4070203@sigaev.ru>
References: <483FD205.4090904@sigaev.ru>
	<486BC501.6060605@sigaev.ru>
	<27880.1215810535@sss.pgh.pa.us>
	<487A6E0C.3090600@sigaev.ru>
	<29437.1216742605@sss.pgh.pa.us>
	<48861758.4070507@sigaev.ru>
	<1636.1216749010@sss.pgh.pa.us>
	<488625E8.4070203@sigaev.ru>

Teodor Sigaev <teodor@sigaev.ru> writes:
> That's close to trivial to revert this piece to add cleanup call to 
> ginbulkdelete/ginvacuumcleanup. Early variants used this variant.

Yeah, I think we should do it that way.

On reflection I don't think you even need the amvacuumstartup call,
because it is *not* safe to assume that an index cleanup operation
there will guarantee that vacuum won't try to remove pending tuples.
Remember that a tuple inserted by a transaction that later aborted
is DEAD and can be reclaimed instantly by VACUUM.  So while in the
case of VACUUM FULL it might be okay to call index_cleanup only
once, for regular VACUUM I think you really have to call it within
each bulkdelete operation.  There's probably no point in optimizing
it away in VACUUM FULL either, since surely it'll be fast to call
index_cleanup when there's nothing in the pending list?

>   - I thought about statistic-based trigger for separate call of insertcleanup.
>     Trigger should be fired on massive insert/update events very similar to
>     trigger on massive delete for ambulkdelete. I'm very sorry but I didn't do it
>     yet, and definitely I need some help here.

Yeah, I was going to complain about that next :-).  Autovacuum isn't
going to trigger as a result of INSERT operations; somehow we have
to teach it what to do for GIN indexes.  I remember we discussed this
at PGCon but I don't think we decided exactly what to do...

> Do I revert that piece?

I've already made a number of changes to the patch; let me keep working
on it and send it back to you later.

			regards, tom lane



view thread (74+ messages)  latest in thread

Message-ID: <2818.1216753264@sss.pgh.pa.us>
Permalink:  ../2818.1216753264@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2818.1216753264@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, teodor@sigaev.ru, oleg@sai.msu.su, pgsql-hackers@postgresql.org
  Subject: Re: [PATCHES] GIN improvements
  In-Reply-To: <2818.1216753264@sss.pgh.pa.us>

* 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