Re: PATCH to allow concurrent VACUUMs to not lock each

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Hannu Krosing <hannu(at)skype(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: PATCH to allow concurrent VACUUMs to not lock each
Date: 2006-07-30 02:16:27
Message-ID: 200607300216.k6U2GRT03129@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Alvaro has just applied a modified version of this patch.

---------------------------------------------------------------------------

Hannu Krosing wrote:
> On E, 2005-05-23 at 11:42 -0400, Tom Lane wrote:
> > Hannu Krosing <hannu(at)skype(dot)net> writes:
> > > I can't think of any other cases where it could matter, as at least the
> > > work done inside vacuum_rel() itself seema non-rollbackable.
> >
> > VACUUM FULL's tuple-moving is definitely roll-back-able, so it might be
> > prudent to only do this for lazy VACUUM. But on the other hand, VACUUM
> > FULL holds an exclusive lock on the table so no one else is going to see
> > its effects concurrently anyway.
>
> Ok, this is a new version of the vacuum patch with the following changes
> following some suggestions in this thread.
>
> * changed the patch to affect only lazy vacuum
> * moved inVacuum handling to use PG_TRY
> * moved vac_update_relstats() out of lazy_vacuum_rel into a separate
> transaction. The code to do this may not be the prettiest, maybe it
> should use a separate struct.
>
> --
> Hannu Krosing <hannu(at)skype(dot)net>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2006-07-30 05:40:38 Re: Going for "all green" buildfarm results
Previous Message Alvaro Herrera 2006-07-30 02:13:10 Re: The vacuum-ignore-vacuum patch

Browse pgsql-patches by date

  From Date Subject
Next Message David Fetter 2006-07-30 06:25:44 Re: New variable server_version_num
Previous Message Alvaro Herrera 2006-07-30 02:13:10 Re: The vacuum-ignore-vacuum patch