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

From Justin Pryzby
Subject Re: Patch to allow pg_filedump to support reading of pg_filenode.map
Date
Msg-id 20210429190531.GN27406@telsasoft.com
Whole thread Raw
In response to Re: Patch to allow pg_filedump to support reading of pg_filenode.map  (Richard Yen <richyen3@gmail.com>)
Responses Re: Patch to allow pg_filedump to support reading of pg_filenode.map  (Richard Yen <richyen3@gmail.com>)
List pgsql-hackers
I think you should be able to avoid crashing if passed a non-relmapper file.
Make sure not to loop over more mappings than exist in the relmapper file of
the given size.

I guess you should warn if the number of mappings is too large for the file's
size.  And then "cap" the number of mappings to the maximum possible number.

-- 
Justin



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Remove redundant variable from transformCreateStmt
Next
From: Richard Yen
Date:
Subject: Re: Patch to allow pg_filedump to support reading of pg_filenode.map