Re: [PATCHES] GIN improvements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] GIN improvements
Дата
Msg-id 2818.1216753264@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] GIN improvements  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: [PATCHES] GIN improvements
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Schema-qualified statements in pg_dump output
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Re: [WIP] collation support revisited (phase 1)