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

index 076bb0bf6f12742bd30bde9fa385c6b01c81ae15..0b46e1097b37502691a078e52c74b8015509d03f 100644 (file)
@@ -15,7 +15,7 @@
  *
  *
  * IDENTIFICATION
- *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.162 2009/02/02 20:07:36 adunstan Exp $
+ *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.163 2009/02/20 02:57:21 adunstan Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -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);
                }
        }