We currently can check for missing heap/index files by comparing pg_class with the database directory files. However, I am not clear if this is safe during concurrent DDL. I assume we create the file before the update to pg_class is visible, but do we always delete the file after the update to pg_class is visible? I assume any external checking tool would need to lock the relation to prevent concurrent DDL.
Also, how would it check if the number of extents is correct? Seems we would need this value to be in pg_class, and have the same update protections outlined above. Seems that would require heavier locking. Is this something anyone has even needed or had requested? -- Bruce Momjian <br...@momjian.us> https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson