| 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 not lose indexes |
| Date: | 2002-07-05 18:08:57 |
| Message-ID: | 200207051808.g65I8w226685@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> > Also, is the new relfilenode somehow guaranteed to
> > not be assigned to another relation (pg_class tuple, I think)?
>
> I've been wondering about that myself. We might have to add a unique
> index on pg_class.relfilenode to ensure this; otherwise, after OID
> wraparound there would be no guarantees.
Yep, good point.
> >> In this code, we delete the old relation, then rename the new one. It
> >> would be good to have this all happen in one update of
> >> pg_class.relfilenode; that way it is an atomic operation.
>
> As long as you have not committed, it's atomic anyway because no one can
> see your updates. It'd be nice to do it in one update for efficiency,
> but don't contort the code beyond reason to achieve that.
Sorry, I meant to say that we added relfilenode for exactly this case,
so that we have atomic file access semantics. Do we already have that
feature in the current code?
--
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 | Bruce Momjian | 2002-07-05 18:17:57 | Re: Proposal: CREATE CONVERSION |
| Previous Message | Bruce Momjian | 2002-07-05 17:50:05 | Re: I am being interviewed by OReilly |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2002-07-05 20:12:27 | Re: CLUSTER not lose indexes |
| Previous Message | Tom Lane | 2002-07-05 14:27:05 | Re: CLUSTER not lose indexes |