$tablesUsed = array_unique( array_merge( $tablesUsed, $pageTables ) );
}
+ // Postgres, Oracle, and MSSQL all use mwuser/pagecontent
+ // instead of user/text. But Postgres does not remap the
+ // table name in tableExists(), so we mark the real table
+ // names as being used.
+ if ( $db->getType() === 'postgres' ) {
+ if ( in_array( 'user', $tablesUsed ) ) {
+ $tablesUsed[] = 'mwuser';
+ }
+ if ( in_array( 'text', $tablesUsed ) ) {
+ $tablesUsed[] = 'pagecontent';
+ }
+ }
+
$truncate = in_array( $db->getType(), [ 'oracle', 'mysql' ] );
foreach ( $tablesUsed as $tbl ) {
// TODO: reset interwiki table to its original content.