Re: CLUSTER not lose indexes

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: CLUSTER not lose indexes
Дата
Msg-id 200207051808.g65I8w226685@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: CLUSTER not lose indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: CLUSTER not lose indexes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: CLUSTER not lose indexes