Reconnect to the right database when using parallel restore with -C. Fixes bug report...
authorAndrew Dunstan <[email protected]>
Fri, 20 Feb 2009 02:57:21 +0000 (02:57 +0000)
committerAndrew Dunstan <[email protected]>
Fri, 20 Feb 2009 02:57:21 +0000 (02:57 +0000)
src/bin/pg_dump/pg_backup_archiver.c

index 6cf171d455fe46246b7d0909e09c60d3ac170e6c..5eda359a3e469ca420c8c0382e6865be675f4d83 100644 (file)
@@ -487,6 +487,7 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te,
                {
                        ahlog(AH, 1, "connecting to new database \"%s\"\n", te->tag);
                        _reconnectToDB(AH, te->tag);
+                       ropt->dbname = strdup(te->tag);
                }
        }