| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Dmitry Samersoff <dms(at)wplus(dot)net> |
| Cc: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [HACKERS] Index recreation in vacuum |
| Date: | 2000-01-18 19:42:24 |
| Message-ID: | 200001181942.OAA17153@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> > 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.
> Moreover, you need firts unlink old index file than do rename(),
> it is not atomic.
>
> May be better way is to create tmp file containing index description,
> undestandable for vacuum.
The beauty of doing a temp index while keeping the old one is that you
can recover right away, and maybe allow the old index to be used while
you vacuum?
--
Bruce Momjian | http://www.op.net/~candle
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 | Alfred Perlstein | 2000-01-18 19:53:04 | Re: [PATCHES] docs done Re: [HACKERS] LIBPQ patches ... |
| Previous Message | Bruce Momjian | 2000-01-18 19:37:31 | Re: [PATCHES] docs done Re: [HACKERS] LIBPQ patches ... |