Re: Best practice - Vacuum. Replication suggestions and pg vs mysql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Best practice - Vacuum. Replication suggestions and pg vs mysql
Date: 2005-03-18 07:04:14
Message-ID: 3780.1111129454@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
> Tom Lane wrote:
>> There's no lock, unless you are using VACUUM FULL which you shouldn't.

> Or, I believe, if he has any GIST indexes (such as tsearch or
> postgis ones). At least it seems normal vacuum locks GIST indexes
> for quite some time here.

Good point --- gist (and rtree) indexes still don't have any support for
concurrent updates, so they have to be locked while VACUUM scans them.

> PS: If I'm right, I wonder if VACUUM or at least autovacuum
> should automatically force vacuum_cost_delay to zero while
> holding locks (i.e. while doing GIST indexes) to reduce the
> time those locks are held.

Perhaps. VACUUM going at full tilt would cause a system-wide
performance impact, though, while the lock only affects processes
trying to use or update that index. So you could argue it either
way.

The best solution would be to fix GIST ;-)

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sabio - PSQL 2005-03-18 14:19:27 Shrink
Previous Message Ron Mayer 2005-03-18 06:38:22 Re: Best practice - Vacuum. Replication suggestions and pg vs mysql