Ensure pg_filenode_relation(0, 0) returns NULL.
authorTom Lane <[email protected]>
Sat, 12 Jun 2021 17:29:24 +0000 (13:29 -0400)
committerTom Lane <[email protected]>
Sat, 12 Jun 2021 17:29:24 +0000 (13:29 -0400)
commit26a0535334ce31b12baf146ad0860c10c4947913
tree4d8fd3f5d1c9ee2710d80ceb17188762048b4eb2
parent4745c119e01a09f927cc67cecab68c24e21b622c
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[email protected]
src/backend/utils/adt/dbsize.c