Tom Lane wrote:
Doing pg_dump would expose the mistake if you'd removed an actual table's files. But I'm not sure it would expose it if you removed an index ...
Right, but in theory if you screwed up and accidentally deleted a file holding an index, you could recover from that in the possibly distant future by rebuilding it, with some pain but no expected loss. Whereas if you deleted some data by removing a file, you really want to know that's what you did immediately, so you can put it back before you forget where it all was at.
Sometimes people who have fully setup replication for backup purposes ask me if they should continue saving pg_dump output somewhere. I think it's reasonable to generate a dump using it periodically whether or not you intend to save the result permanently, just as a paranoid sanity check that you can still read everything. I don't trust disks and filesystems that much.
(If you're reading this and feel the need to write a pro-ZFS essay at this point, consider yourself trolled)
-- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@xxxxxxxxxxxxxxx www.2ndQuadrant.us -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general