Ensure pg_filenode_relation(0, 0) returns NULL.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Jun 2021 17:29:24 +0000 (13:29 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Jun 2021 17:29:24 +0000 (13:29 -0400)
commit25d1ef1aaf6d104fa0b315e2f5f9840f0b164334
treee5047056da0f9cda6b2fdaf64dbec865287f73d9
parent9eecea7f373ab6bdff61d31666d6d3b0c435763f
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
src/backend/utils/adt/dbsize.c