Ensure pg_filenode_relation(0, 0) returns NULL.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f479ea94bd24e61199fab3596a4a3e7241c6c28c
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-06-12T17:29:24Z
Releases: 13.4
Ensure pg_filenode_relation(0, 0) returns NULL.

Previously, a zero value for the relfilenode resulted in
a confusing error message about "unexpected duplicate".
This function returns NULL for other invalid relfilenode
values, so zero should be treated likewise.

It's been like this all along, so back-patch to all supported
branches.

Justin Pryzby

Discussion: https://postgr.es/m/20210612023324.GT16435@telsasoft.com

Files

PathChange+/−
src/backend/utils/adt/dbsize.c modified +5 −1

Discussion