Skip to content

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Example pg_fsck_check() reports

These files are the verbatim output of pg_fsck_check(format) — no post-processing — so they show exactly what the function produces. (JSON is pretty-printed by the function itself; HTML/XML are single-line — pipe through xmllint --format if you want them indented.)

pg_fsck_check produces a multi-section report, not just a problem list. The sections are:

  1. environment — engine version, current database, block/segment size, data checksums, data directory, report time
  2. summary — total files, total size, schema count, and error/warning counts
  3. findings — the problems found (missing / extra / segment / fork anomalies)
  4. invalid_databases — databases stuck in the INVALID state
  5. file_composition — file count and size grouped by fork / schema / kind
  6. temp_files — pgsql_tmp query-spill files
  • report.json — SELECT pg_fsck_check('json')
  • report.md — SELECT pg_fsck_check('markdown')
  • report.html — SELECT pg_fsck_check('html')
  • report.xml — SELECT pg_fsck_check('xml')

Scenario that produced them

A database with three kinds of injected problems:

  1. Missing file — table orders registered in pg_class, but its relfilenode file was deleted from disk (an error).
  2. Extra / orphaned files — a stray file base/5/8888888 with no catalog entry, plus the leftover orders _fsm fork whose main fork is now gone (both warning).
  3. Invalid database — half_dropped_db left in the INVALID state by an interrupted DROP DATABASE (warning).

A healthy database instead produces an empty report ([] for JSON, a "no problems found" row for Markdown, empty containers for HTML/XML).