@@ -353,7 +353,6 @@ main(int argc, char **argv)
353
353
{"strict-names", no_argument, &strict_names, 1},
354
354
{"use-set-session-authorization", no_argument, &dopt.use_setsessauth, 1},
355
355
{"no-security-labels", no_argument, &dopt.no_security_labels, 1},
356
- {"no-subscription-connect", no_argument, &dopt.no_subscription_connect, 1},
357
356
{"no-synchronized-snapshots", no_argument, &dopt.no_synchronized_snapshots, 1},
358
357
{"no-unlogged-table-data", no_argument, &dopt.no_unlogged_table_data, 1},
359
358
{"no-sync", no_argument, NULL, 7},
@@ -951,7 +950,6 @@ help(const char *progname)
951
950
printf(_(" --if-exists use IF EXISTS when dropping objects\n"));
952
951
printf(_(" --inserts dump data as INSERT commands, rather than COPY\n"));
953
952
printf(_(" --no-security-labels do not dump security label assignments\n"));
954
- printf(_(" --no-subscription-connect dump subscriptions so they don't connect on restore\n"));
955
953
printf(_(" --no-synchronized-snapshots do not use synchronized snapshots in parallel jobs\n"));
956
954
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
957
955
printf(_(" --no-unlogged-table-data do not dump unlogged table data\n"));
@@ -3669,7 +3667,6 @@ getSubscriptions(Archive *fout)
3669
3667
int i_oid;
3670
3668
int i_subname;
3671
3669
int i_rolname;
3672
- int i_subenabled;
3673
3670
int i_subconninfo;
3674
3671
int i_subslotname;
3675
3672
int i_subpublications;
@@ -3702,7 +3699,7 @@ getSubscriptions(Archive *fout)
3702
3699
/* Get the subscriptions in current database. */
3703
3700
appendPQExpBuffer(query,
3704
3701
"SELECT s.tableoid, s.oid, s.subname,"
3705
- "(%s s.subowner) AS rolname, s.subenabled, "
3702
+ "(%s s.subowner) AS rolname, "
3706
3703
" s.subconninfo, s.subslotname, s.subpublications "
3707
3704
"FROM pg_catalog.pg_subscription s "
3708
3705
"WHERE s.subdbid = (SELECT oid FROM pg_catalog.pg_database"
@@ -3716,7 +3713,6 @@ getSubscriptions(Archive *fout)
3716
3713
i_oid = PQfnumber(res, "oid");
3717
3714
i_subname = PQfnumber(res, "subname");
3718
3715
i_rolname = PQfnumber(res, "rolname");
3719
- i_subenabled = PQfnumber(res, "subenabled");
3720
3716
i_subconninfo = PQfnumber(res, "subconninfo");
3721
3717
i_subslotname = PQfnumber(res, "subslotname");
3722
3718
i_subpublications = PQfnumber(res, "subpublications");
@@ -3732,8 +3728,6 @@ getSubscriptions(Archive *fout)
3732
3728
AssignDumpId(&subinfo[i].dobj);
3733
3729
subinfo[i].dobj.name = pg_strdup(PQgetvalue(res, i, i_subname));
3734
3730
subinfo[i].rolname = pg_strdup(PQgetvalue(res, i, i_rolname));
3735
- subinfo[i].subenabled =
3736
- (strcmp(PQgetvalue(res, i, i_subenabled), "t") == 0);
3737
3731
subinfo[i].subconninfo = pg_strdup(PQgetvalue(res, i, i_subconninfo));
3738
3732
subinfo[i].subslotname = pg_strdup(PQgetvalue(res, i, i_subslotname));
3739
3733
subinfo[i].subpublications =
@@ -3758,7 +3752,6 @@ getSubscriptions(Archive *fout)
3758
3752
static void
3759
3753
dumpSubscription(Archive *fout, SubscriptionInfo *subinfo)
3760
3754
{
3761
- DumpOptions *dopt = fout->dopt;
3762
3755
PQExpBuffer delq;
3763
3756
PQExpBuffer query;
3764
3757
PQExpBuffer publications;
@@ -3799,19 +3792,8 @@ dumpSubscription(Archive *fout, SubscriptionInfo *subinfo)
3799
3792
appendPQExpBufferStr(publications, fmtId(pubnames[i]));
3800
3793
}
3801
3794
3802
- appendPQExpBuffer(query, " PUBLICATION %s WITH (", publications->data);
3803
-
3804
- if (subinfo->subenabled)
3805
- appendPQExpBufferStr(query, "ENABLED");
3806
- else
3807
- appendPQExpBufferStr(query, "DISABLED");
3808
-
3809
- appendPQExpBufferStr(query, ", SLOT NAME = ");
3795
+ appendPQExpBuffer(query, " PUBLICATION %s WITH (NOCONNECT, SLOT NAME = ", publications->data);
3810
3796
appendStringLiteralAH(query, subinfo->subslotname, fout);
3811
-
3812
- if (dopt->no_subscription_connect)
3813
- appendPQExpBufferStr(query, ", NOCONNECT");
3814
-
3815
3797
appendPQExpBufferStr(query, ");\n");
3816
3798
3817
3799
ArchiveEntry(fout, subinfo->dobj.catId, subinfo->dobj.dumpId,
0 commit comments