Josh Berkus <[EMAIL PROTECTED]> writes: > The basic symptoms are: > 1) Machine stated scheduled REINDEX. > 2) Unexpected power-out > 3) On reboot, we have 2 different versions of the index file on disk, > one with 0 bytes. Attempts to use the index (via SELECT) result in > statement-fatal errors.
Hm. Unless the REINDEX actually *completed* before the power-out, it should not have had any effect other than creation of an unreferenced file. My guess is that the reindex did complete, and updated the index's pg_class row to point at the new file, but for some reason only the pg_class update got down to disk. > I'm waiting on more data. For now, I was wondering whether there was > a known issue with WAL recovery on indexes in 7.2.4. Neil thought > there was. That's a definite possibility. Before 7.4 we did not emit WAL records for data written during index build. What we could have here is that the transaction completed and synced to WAL, but none of the data-file writes were sent to disk before power-out. On restart, WAL replay would faithfully update the pg_class row, but the index file would still be empty :-( regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster