File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 91
91
#include "storage/proc.h"
92
92
#include "storage/procsignal.h"
93
93
#include "storage/sinvaladt.h"
94
+ #include "storage/smgr.h"
94
95
#include "tcop/tcopprot.h"
95
96
#include "utils/dsa.h"
96
97
#include "utils/fmgroids.h"
@@ -524,6 +525,26 @@ AutoVacLauncherMain(int argc, char *argv[])
524
525
/* Abort the current transaction in order to recover */
525
526
AbortCurrentTransaction ();
526
527
528
+ /*
529
+ * Release any other resources, for the case where we were not in a
530
+ * transaction.
531
+ */
532
+ LWLockReleaseAll ();
533
+ pgstat_report_wait_end ();
534
+ AbortBufferIO ();
535
+ UnlockBuffers ();
536
+ if (CurrentResourceOwner )
537
+ {
538
+ ResourceOwnerRelease (CurrentResourceOwner ,
539
+ RESOURCE_RELEASE_BEFORE_LOCKS ,
540
+ false, true);
541
+ /* we needn't bother with the other ResourceOwnerRelease phases */
542
+ }
543
+ AtEOXact_Buffers (false);
544
+ AtEOXact_SMgr ();
545
+ AtEOXact_Files ();
546
+ AtEOXact_HashTables (false);
547
+
527
548
/*
528
549
* Now return to normal top-level context and clear ErrorContext for
529
550
* next time.
You can’t perform that action at this time.
0 commit comments