File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,7 @@ RestoreArchive(Archive *AHX)
314
314
bool parallel_mode ;
315
315
TocEntry * te ;
316
316
OutputContext sav ;
317
+ bool gc_was_enabled = false;
317
318
318
319
AH -> stage = STAGE_INITIALIZING ;
319
320
@@ -455,6 +456,16 @@ RestoreArchive(Archive *AHX)
455
456
ahprintf (AH , "BEGIN;\n\n" );
456
457
}
457
458
459
+ /*
460
+ * Stop CFS GC
461
+ */
462
+ if (AH -> connection )
463
+ {
464
+ PGresult * res = ExecuteSqlQuery ((Archive * )AH , "select cfs_enable_gc(false)" , PGRES_TUPLES_OK );
465
+ gc_was_enabled = * PQgetvalue (res , 0 , 0 );
466
+ PQclear (res );
467
+ }
468
+
458
469
/*
459
470
* Establish important parameter values right away.
460
471
*/
@@ -693,6 +704,12 @@ RestoreArchive(Archive *AHX)
693
704
ahprintf (AH , "COMMIT;\n\n" );
694
705
}
695
706
707
+ if (gc_was_enabled )
708
+ {
709
+ PGresult * res = ExecuteSqlQuery ((Archive * )AH , "select cfs_enable_gc(true)" , PGRES_TUPLES_OK );
710
+ PQclear (res );
711
+ }
712
+
696
713
if (AH -> public .verbose )
697
714
dumpTimestamp (AH , "Completed on" , time (NULL ));
698
715
You can’t perform that action at this time.
0 commit comments