diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c index 0e34d7c..9fed6b3 100644 --- a/src/backend/replication/logical/tablesync.c +++ b/src/backend/replication/logical/tablesync.c @@ -912,13 +912,12 @@ fetch_remote_table_info(char *nspname, char *relname, bool **remotegenlist_res, WalRcvExecResult *pubres; TupleTableSlot *tslot; Oid attrsRow[] = {INT2VECTOROID}; + StringInfo pub_names = makeStringInfo(); /* * Fetch info about column lists for the relation (from all the * publications). */ - StringInfo pub_names = makeStringInfo(); - get_publications_str(MySubscription->publications, pub_names, true); resetStringInfo(&cmd); appendStringInfo(&cmd, @@ -1047,13 +1046,8 @@ fetch_remote_table_info(char *nspname, char *relname, bool **remotegenlist_res, " WHERE a.attnum > 0::pg_catalog.int2" " AND NOT a.attisdropped", lrel->remoteid); - if (server_version >= 120000) - { - has_pub_with_pubgencols = server_version >= 180000 && has_pub_with_pubgencols; - - if (!has_pub_with_pubgencols) - appendStringInfo(&cmd, " AND a.attgenerated = ''"); - } + if (!has_pub_with_pubgencols) + appendStringInfo(&cmd, " AND a.attgenerated = ''"); appendStringInfo(&cmd, " AND a.attrelid = %u"