Re: GIN fast-insert vs autovacuum scheduling - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: GIN fast-insert vs autovacuum scheduling
Date
Msg-id 20090323190114.GD16373@alvh.no-ip.org
Whole thread Raw
In response to GIN fast-insert vs autovacuum scheduling  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: GIN fast-insert vs autovacuum scheduling  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> On top of those issues, there are implementation problems in the
> proposed relation_has_pending_indexes() check: it has hard-wired
> knowledge about GIN indexes, which means the feature cannot be
> extended to add-on index AMs; and it's examining indexes without any
> lock whatsoever on either the indexes or their parent table.  (And
> we really would rather not let autovacuum take a lock here.)

I wonder if it's workable to have GIN send pgstats a message with number
of fast-inserted tuples, and have autovacuum check that number as well
as dead/live tuples.

ISTM this shouldn't be considered part of either vacuum or analyze at
all, and have autovacuum invoke it separately from both, with its own
decision equations and such.  We could even have a scan over pg_class
just for GIN indexes to implement this.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: GIN fast-insert vs autovacuum scheduling
Next
From: Tom Lane
Date:
Subject: Re: GIN fast insert