Re: PATCH to allow concurrent VACUUMs to not lock each - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: PATCH to allow concurrent VACUUMs to not lock each
Date
Msg-id 200603210334.k2L3YXi16741@candle.pha.pa.us
Whole thread Raw
In response to Re: PATCH to allow concurrent VACUUMs to not lock each  (Hannu Krosing <hannu@skype.net>)
List pgsql-patches
This is going to need a significant safety review.

Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

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


Hannu Krosing wrote:
> On K, 2005-08-17 at 15:40 -0400, Tom Lane wrote:
> >                            Saatja:
> > Tom Lane <tgl@sss.pgh.pa.us>
> >                           Kellele:
> > Bruce Momjian
> > <pgman@candle.pha.pa.us>, Hannu
> > Krosing <hannu@tm.ee>, Neil Conway
> > <neilc@samurai.com>, pgsql-
> > patches@postgresql.org
> >                             Teema:
> > Re: [PATCHES] PATCH to allow
> > concurrent VACUUMs to not lock each
> >                           Kuup?ev:
> > Wed, 17 Aug 2005 15:40:53 -0400
> > (22:40 EEST)
> >
> > Just for the archives, attached is as far as I'd gotten with cleaning
> > up
> > Hannu's patch before I realized that it wasn't doing what it needed to
> > do.  This fixes an end-of-transaction race condition (can't unset
> > inVacuum before xact end, unless you want OldestXmin going backwards
> > from the point of view of other people) and improves the documentation
> > of what's going on.  But unless someone can convince me that it's safe
> > to mess with GetSnapshotData, it's unlikely this'll ever get applied.
> >
> >
> >
>
> Attached is a patch, based on you last one, which messes with
> GetSnapshotData in what I think is a safe way.
>
> It introduces another attribute to PROC , proc->nonInVacuumXmin and
> computes this in addition to prox->xmin inside GetSnapshotData.
>
> When (and only when) GetOldestXmin is called with ignoreVacuum=true,
> then proc->nonInVacuumXmin is checked instead of prox->xmin.
>
> I believe that this will make this change invisible to all other places
> where GetSnapshotData or GetOldestXmin is used.
>
> --
> Hannu Krosing <hannu@skype.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   http://candle.pha.pa.us
  SRA OSS, Inc.   http://www.sraoss.com

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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Additional current timestamp values
Next
From: Bruce Momjian
Date:
Subject: Re: FW: Win32 unicode vs ICU