summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/pg_dump/pg_dump.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 3e5213bfc5..545106baee 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -15493,8 +15493,13 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo)
#ifdef PGXC
if (fout->isPostgresXL)
{
- /* Add the grammar extension linked to PGXC depending on data got from pgxc_class */
- if (tbinfo->pgxclocatortype != 'E')
+ /*
+ * Add table distribution syntax, unless we're dealing with a
+ * partiion table, in which case the information is derived from
+ * the parent table.
+ */
+ if (tbinfo->pgxclocatortype != 'E' && !tbinfo->ispartition &&
+ numParents == 0)
{
/* N: DISTRIBUTE BY ROUNDROBIN */
if (tbinfo->pgxclocatortype == 'N')