Re: [HACKERS] Index recreation in vacuum

Поиск
Список
Период
Сортировка
От Dmitry Samersoff
Тема Re: [HACKERS] Index recreation in vacuum
Дата
Msg-id 3884CC0C.B6DF19A2@wplus.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Index recreation in vacuum  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [HACKERS] Index recreation in vacuum  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:

> [Charset koi8-r unsupported, filtering to ASCII...]
> > Bruce Momjian wrote:
> >
> > > >
> > > > The problem is how to invalidate/validate indexes.
> > > > Of cource natural way is to drop/create indexes but the
> > > > definition of indexes would be lost in case of abort/crash.
> > >
> > > My idea would be to create a new index that is a random index name.
> > > Then, do rename(), which is an atomic OS operation putting the new index
> > > file in place of the old name.  Seems that would work well.
> >
> > Yes, but it can cause disk space problem for very large indices.
>
> Well, one would hope you have enough disk space free for that.

At least noticed by vacuum

> ...
>      Rename() causes the link named from to be renamed as to. If to exists, it
>      is first removed.  Both from and to must be of the same type (that is,

Ok. I agree.

--
Dmitry Samersoff, DM\S
dms@wplus.net http://devnull.wplus.net
* there will come soft rains




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Index recreation in vacuum
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Index recreation in vacuum