hi.
in src/bin/pg_dump/pg_dump.c
within function dumpTableSchema:
there are two occurrences of:
print_notnull = (tbinfo->notnull_constrs[j] != NULL &&
(tbinfo->notnull_islocal[j] ||
dopt->binary_upgrade ||
tbinfo->ispartition));
we can delete the second one.
to confirm delete the second is fine.
I did run a test, and all tests are OK.