@@ -1856,6 +1856,7 @@ typedef struct {
18561856 void * SPIState ;
18571857 void * SnapshotState ;
18581858 void * PredicateState ;
1859+ void * StorageState ;
18591860 struct TransInvalidationInfo * InvalidationInfo ;
18601861
18611862 List * on_commit_actions ;
@@ -2197,19 +2198,16 @@ CommitTransaction(void)
21972198 RESOURCE_RELEASE_AFTER_LOCKS ,
21982199 true, true);
21992200
2200- if (!is_autonomous_transaction )
2201- {
2202- /*
2203- * Likewise, dropping of files deleted during the transaction is best done
2204- * after releasing relcache and buffer pins. (This is not strictly
2205- * necessary during commit, since such pins should have been released
2206- * already, but this ordering is definitely critical during abort.) Since
2207- * this may take many seconds, also delay until after releasing locks.
2208- * Other backends will observe the attendant catalog changes and not
2209- * attempt to access affected files.
2210- */
2211- smgrDoPendingDeletes (true);
2212- }
2201+ /*
2202+ * Likewise, dropping of files deleted during the transaction is best done
2203+ * after releasing relcache and buffer pins. (This is not strictly
2204+ * necessary during commit, since such pins should have been released
2205+ * already, but this ordering is definitely critical during abort.) Since
2206+ * this may take many seconds, also delay until after releasing locks.
2207+ * Other backends will observe the attendant catalog changes and not
2208+ * attempt to access affected files.
2209+ */
2210+ smgrDoPendingDeletes (true);
22132211
22142212 AtCommit_Notify ();
22152213 AtEOXact_GUC (true, s -> gucNestLevel );
@@ -3532,7 +3530,8 @@ void SuspendTransaction(void)
35323530
35333531 sus -> SnapshotState = SuspendSnapshot (); /* only before the resource-owner stuff */
35343532 sus -> PredicateState = SuspendPredicate ();
3535-
3533+ sus -> StorageState = SuspendStorage ();
3534+
35363535 if (HasCatcacheInvalidationMessages ())
35373536 {
35383537 ResetCatalogCaches ();
@@ -3655,6 +3654,7 @@ bool ResumeTransaction(void)
36553654
36563655 ResumeSnapshot (sus -> SnapshotState ); /* only after the resource-owner stuff */
36573656 ResumePredicate (sus -> PredicateState );
3657+ ResumeStorage (sus -> StorageState );
36583658 ResumeInvalidationInfo (sus -> InvalidationInfo );
36593659 if (xactHasCatcacheInvalidationMessages )
36603660 {
0 commit comments