Re: [HACKERS] Index recreation in vacuum

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-19 21:51:52
Message-ID: 200001192151.QAA27235@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[Charset koi8-r unsupported, filtering to ASCII...]
> Bruce Momjian wrote:
> >
> > We need two things:
> >
>
> > auto-create index on startup
>
> IMHO, It have to be controlled by user, because creating large index
> can take a number of hours. Sometimes it's better to live without
> indices
> at all, and then build it by hand after workday end.

OK, full circle time. That is why I recommended making a separate new
heap and index and using rename() to move them into place once the
vacuum is completed. In a failure during vacuum, the failed vacuum files
should be just removed on startup. No downtime, and index is in place.

Also, I thought about how to do rename() of multiple tables atomically.
My idea would be to have a pg_startup table that contains information
about what operations should be performed on startup. You could write
to the file in an atomic action, and if there was a failure, on startup,
the file could be read and the operations performed. We would basically
be using our own transaction system to guarantee file system atomicity.

--
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-01-19 22:29:11 Re: [HACKERS] Cannot compile psql
Previous Message Dmitry Samersoff 2000-01-19 21:41:26 Re: [HACKERS] Index recreation in vacuum