Skip to content

Commit 1cf13e6

Browse files
committed
IMHO, --single-transaction should wrap *all* the commands in BEGIN/COMMIT,
not just some of them.
1 parent d537e0b commit 1cf13e6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.123 2006/02/12 06:11:50 momjian Exp $
18+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.124 2006/02/13 21:30:19 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -213,16 +213,16 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
213213
if (AH->public.verbose)
214214
dumpTimestamp(AH, "Started on", AH->createDate);
215215

216+
if (ropt->single_txn)
217+
ahprintf(AH, "BEGIN;\n\n");
218+
216219
/*
217220
* Establish important parameter values right away.
218221
*/
219222
_doSetFixedOutputState(AH);
220223

221224
AH->stage = STAGE_PROCESSING;
222225

223-
if (ropt->single_txn)
224-
ahprintf(AH, "BEGIN;\n\n");
225-
226226
/*
227227
* Drop the items at the start, in reverse order
228228
*/
@@ -376,7 +376,7 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt)
376376
}
377377
}
378378

379-
if (ropt->single_txn)
379+
if (ropt->single_txn)
380380
ahprintf(AH, "COMMIT;\n\n");
381381

382382
if (AH->public.verbose)

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