Checking for missing heap/index files - Mailing list pgsql-hackers

From Bruce Momjian
Subject Checking for missing heap/index files
Date
Msg-id YqCaBx2XNr79SLMV@momjian.us
Whole thread Raw
Responses Re: Checking for missing heap/index files  (Mark Dilger <mark.dilger@enterprisedb.com>)
Re: Checking for missing heap/index files  (Stephen Frost <sfrost@snowman.net>)
Re: Checking for missing heap/index files  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [RFC] building postgres with meson -v8
Next
From: Kuntal Ghosh
Date:
Subject: Re: Invalid memory access in pg_stat_get_subscription