Patch to allow pg_filedump to support reading of pg_filenode.map - Mailing list pgsql-hackers

From Richard Yen
Subject Patch to allow pg_filedump to support reading of pg_filenode.map
Date
Msg-id CAKH4vDiJAu0Sx+aD4i2pV4ALJrEF7kySoCEHgJ_butK+Ldnt1Q@mail.gmail.com
Whole thread Raw
Responses Re: Patch to allow pg_filedump to support reading of pg_filenode.map  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Hello Hackers,

I recently had to work on a case where some catalog files were corrupt and/or missing.  One of the things we sought to inspect was pg_filenode.map, but there was no tooling available to do so.

With the help of Álvaro H.. I've put together a patch to allow pg_filedump to do some rudimentary decoding of pg_filenode.map, so that it's at least human-readable.  I had the idea to try to map the OIDs to relnames, but that might get hairy, with TOAST table OIDs possibly changing (for pg_proc, etc.)

It seems that Christoph Berg is the primary committer for the pg_filedump project these days so he is cc'd here, but if there's some other place I should be sending this kind of contribution to, please let me know.  Hopefully this will be helpful to others in the future.

Much appreciated,
--Richard
Attachment

pgsql-hackers by date:

Previous
From: Yura Sokolov
Date:
Subject: Re: Use simplehash.h instead of dynahash in SMgr
Next
From: Andres Freund
Date:
Subject: Re: WIP: WAL prefetch (another approach)