Re: CLUSTER patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)atentus(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: CLUSTER patch
Date: 2002-07-14 17:37:33
Message-ID: 19622.1026668253@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> New patch attached. Something like this is required or
> heap_drop/index_drop will fail because it can't find the relation cache
> entries for the relation. Maybe the trick is to properly invalidate the
> relation caches when pg_class is updated.

They should be updated *automatically* --- otherwise CLUSTER is hardly
the only thing that will fail.

> This is particularly
> significant for thisxactonly relations.

Yes. After thinking awhile I realize that the real problem is that we
are trying to swap between an existing relation (!rd_myxactonly) and
a new relation (rd_myxactonly). Buffers for one live in the main
buffer pool, for the other in the local buffer pool. There's also the
little matter of the local state inside relcache.c. While the update
to pg_class should make the right things happen to relfilenode, it
doesn't do anything to cause a change in rd_myxactonly status.

Not sure what to do about this. Will think more.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-07-14 17:37:38 Re: CLUSTER patch
Previous Message Alvaro Herrera 2002-07-14 17:28:09 Re: CLUSTER patch