Re: CLUSTER patch

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER patch
Date: 2002-07-14 19:30:47
Message-ID: Pine.LNX.4.44.0207141514190.21167-200000@cm-lcon1-46-187.cm.vtr.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane dijo:

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > This case is actually more complicated because after the swap, pg_class
> > still says thisxactonly but the relfilenode points to non-thisactonly
> > buffers, and via versa.
>
> pg_class doesn't say anything (if it did, we could make relcache.c
> track it).
>
> But yes, the problem is that myxactonly has to line up with where the
> buffers are stored. As I mentioned, I think it would work to flush out
> all buffers for both rels before doing the swap.

It does indeed work. Actually, I tried to do that before, but the fact
that RelationFlushBuffers requires a firstDelBlock made me turn around.

I attach a new patch against current cvs HEAD. It works as far as I've
tested it, but I may be missing some cases. I'll post a documentation
patch later if this gets applied.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Some men are heterosexual, and some are bisexual, and some
men don't think about sex at all... they become lawyers" (Woody Allen)

Attachment Content-Type Size
cluster.patch text/plain 11.9 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-07-14 19:55:11 Re: CLUSTER patch
Previous Message Tom Lane 2002-07-14 18:46:50 Re: CLUSTER patch