Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> I thought for a little bit about a magic "reconstruct the index" WAL
> entry that would invoke the index build procedure in toto, but that
> doesn't look like it will fly either. (Two problems: during crash
> recovery, you couldn't be sure that what's on disk for the underlying
> table exactly matches the index you need to build --- it could be a
> later state of the table; and besides, the environment of the WAL replay
> process isn't capable of running user-defined functions, so it couldn't
> work for functional indexes.)
Could you just mark the index as unusable? Have the optimizer ignore such
indexes and PITR recovery can notify the user of these indexes and/or invoke a
rebuild automatically?
It wouldn't happen unless the user had done an index rebuild since the last
complete backup, so it wouldn't even be a performance issue. Restoring the
index from the WAL replay of an index rebuild must take a long time anyways.
--
greg
In response to
Responses
pgsql-hackers by date
| Next: | From: Marc G. Fournier | Date: 2004-06-01 16:57:44 |
| Subject: Re: Official Freeze Date for 7.5: July 1st, 2004 |
| Previous: | From: Greg Stark | Date: 2004-06-01 16:44:37 |
| Subject: Re: Win32, PITR, nested transactions, tablespaces |