@@ -4935,43 +4935,8 @@ CloneArchive(ArchiveHandle *AH)
49354935
49364936 /* re-establish fixed state */
49374937 if (AH -> mode == archModeRead )
4938- {
4939- Assert (AH -> connection == NULL );
4940-
4941- /* this also sets clone->connection */
4942- ConnectDatabase ((Archive * ) clone , & clone -> public .ropt -> cparams , true, false);
4943-
4944- /* re-establish fixed state */
49454938 _doSetFixedOutputState (clone );
4946- }
4947- else
4948- {
4949- PQExpBufferData connstr ;
4950- char * pghost ;
4951- char * pgport ;
4952- char * username ;
4953-
4954- Assert (AH -> connection != NULL );
4955-
4956- /*
4957- * Even though we are technically accessing the parent's database
4958- * object here, these functions are fine to be called like that
4959- * because all just return a pointer and do not actually send/receive
4960- * any data to/from the database.
4961- */
4962- initPQExpBuffer (& connstr );
4963- appendPQExpBufferStr (& connstr , "dbname=" );
4964- appendConnStrVal (& connstr , PQdb (AH -> connection ));
4965- pghost = PQhost (AH -> connection );
4966- pgport = PQport (AH -> connection );
4967- username = PQuser (AH -> connection );
4968-
4969- /* this also sets clone->connection */
4970- ConnectDatabase ((Archive * ) clone , & clone -> public .ropt -> cparams , true, false);
4971-
4972- termPQExpBuffer (& connstr );
4973- /* setupDumpWorker will fix up connection state */
4974- }
4939+ /* in write case, setupDumpWorker will fix up connection state */
49754940
49764941 /* Let the format-specific code have a chance too */
49774942 clone -> ClonePtr (clone );
0 commit comments