Merge "Remove exception and drop cloned tables in PostgresSQL too"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 28 Jun 2017 08:43:08 +0000 (08:43 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 28 Jun 2017 08:43:08 +0000 (08:43 +0000)
includes/db/CloneDatabase.php

index 809b660..6d18444 100644 (file)
@@ -93,8 +93,10 @@ class CloneDatabase {
                        self::changePrefix( $this->newTablePrefix );
                        $newTableName = $this->db->tableName( $tbl, 'raw' );
 
+                       // Postgres: Temp tables are automatically deleted upon end of session
+                       //           Same Temp table name hides existing table for current session
                        if ( $this->dropCurrentTables
-                               && !in_array( $this->db->getType(), [ 'postgres', 'oracle' ] )
+                               && !in_array( $this->db->getType(), [ 'oracle' ] )
                        ) {
                                if ( $oldTableName === $newTableName ) {
                                        // Last ditch check to avoid data loss