Re: PATCH to allow concurrent VACUUMs to not lock each

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(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: 2005-08-24 14:08:41
Message-ID: 200508241408.j7OE8fC10519@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


This has been saved for the 8.2 release:

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

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

Hannu Krosing wrote:
> On K, 2005-08-17 at 15:40 -0400, Tom Lane wrote:
> > Saatja:
> > Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> > Kellele:
> > Bruce Momjian
> > <pgman(at)candle(dot)pha(dot)pa(dot)us>, Hannu
> > Krosing <hannu(at)tm(dot)ee>, Neil Conway
> > <neilc(at)samurai(dot)com>, pgsql-
> > patches(at)postgresql(dot)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(at)skype(dot)net>
>
>
>
>
>

[ Attachment, skipping... ]

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2005-08-24 14:39:47 Re: TODO questions
Previous Message Bruce Momjian 2005-08-24 14:05:56 Re: beginning hackers

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Fuhr 2005-08-24 14:12:04 Re: PL/Perl regression tests with use_strict
Previous Message Andrew Dunstan 2005-08-24 13:50:06 Re: PL/Perl regression tests with use_strict