> I seem to recall that the cases where two files are needed are to remove
> the drop/recreate cycle from CLUSTER and index rebuilding, particuarly
> to make them robust to interuption, particularly as to the rename()
> of the underlying file. With my current patch, that could be done (at
> 2x disk space cost) by building the second version of the table under a
> different relname, perhaps as a temp relation even, and then UPDATE the
> pg_class entry to point at the new file, and have the temp relation point
> to the old file, as the last step. None of the DB code needs to have the
> filename in sync, so just leave it 'wrong', or fix it at vacuum time,
> when you get a table lock anyway.
Yes, I agree, cleanup during vacuum is a nice idea, though it makes
tablename checks before the vacuum not work. Let's see what people want
to implement and we can make decisions then.
-- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026