diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index db8ca40..8aac3f5 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15595,7 +15595,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
 					 * in binary-upgrade case where that won't work.
 					 */
 					bool		has_notnull = (tbinfo->notnull[j] &&
-											   (!tbinfo->inhNotNull[j] ||
+											   (tbinfo->ispartition ||
+												!tbinfo->inhNotNull[j] ||
 												dopt->binary_upgrade));
 
 					/* Skip column if fully defined by reloftype */
