Skip to content

Commit deb1580

Browse files
committed
Remove hard-coded "\connect postgres" from pg_dumpall.
This doesn't appear to accompish anything useful, and does make the restore fail if the postgres database happens to have been dropped.
1 parent 7481262 commit deb1580

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bin/pg_dump/pg_dumpall.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,12 @@ main(int argc, char *argv[])
441441
if (verbose)
442442
dumpTimestamp("Started on");
443443

444-
fprintf(OPF, "\\connect postgres\n\n");
444+
/*
445+
* We used to emit \connect postgres here, but that served no purpose
446+
* other than to break things for installations without a postgres
447+
* database. Everything we're restoring here is a global, so whichever
448+
* database we're connected to at the moment is fine.
449+
*/
445450

446451
/* Replicate encoding and std_strings in output */
447452
fprintf(OPF, "SET client_encoding = '%s';\n",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy