Skip site navigation (1) Skip section navigation (2)

Re: GIN fast-insert vs autovacuum scheduling

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: GIN fast-insert vs autovacuum scheduling
Date: 2009-03-23 23:38:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On Mon, 2009-03-23 at 15:23 -0400, Tom Lane wrote:
>> There is no need for any such infrastructure if we just drive it off a
>> post-ANALYZE callback.

> That sounds reasonable, although it does seem a little strange for
> analyze to actually perform cleanup.

My thought was to have GIN do cleanup only in an autovacuum-driven
ANALYZE, not in a client-issued ANALYZE.  You could argue it either way
I suppose, but I agree that if a user says ANALYZE he's probably not
expecting index cleanup to happen.

> Now that we have FSM, the cost of VACUUMing insert-only tables is a lot
> less.

Well, not if you just did a huge pile of inserts, which is the case
that we need to worry about here.

> On tables without GIN indexes, that wouldn't be a complete waste,
> because it could set hint bits, which needs to be done sometime anyway.

True, but we have not chosen to make autovacuum do that, and whether we
should or not seems to me to be orthogonal to when GIN index cleanup
should happen.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-03-24 00:52:58
Subject: Re: Resetting cluster-wide statistics
Previous:From: Greg SmithDate: 2009-03-23 23:15:35
Subject: Resetting cluster-wide statistics

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group