From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(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:54:10 |
Message-ID: | 200207141754.g6EHsAN13717@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
> > 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.
Yes, I had one intermediate patch where I was calling
RelationClearRelation directly and not using the reload flag computed by
RelationForgetRelation. Then I found RelationFlushRelation and that
seemed to work better.
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. One of the key things is that thisxactonly
relations can't be forgotten because there are local buffers associated
with the relation, or something like that.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania
19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-07-14 18:25:52 | Re: CLUSTER patch |
Previous Message | Bruce Momjian | 2002-07-14 17:37:38 | Re: CLUSTER patch |