diff options
Diffstat (limited to 'src/backend/access/transam/twophase.c')
-rw-r--r-- | src/backend/access/transam/twophase.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index c7cde25f835..a23eed56831 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -1346,7 +1346,6 @@ FinishPreparedTransaction(const char *gid, bool isCommit) RelFileNode *delrels; int ndelrels; SharedInvalidationMessage *invalmsgs; - int i; /* * Validate the GID, and lock the GXACT to ensure that two backends do not @@ -1438,13 +1437,9 @@ FinishPreparedTransaction(const char *gid, bool isCommit) delrels = abortrels; ndelrels = hdr->nabortrels; } - for (i = 0; i < ndelrels; i++) - { - SMgrRelation srel = smgropen(delrels[i], InvalidBackendId); - smgrdounlink(srel, false); - smgrclose(srel); - } + /* Make sure files supposed to be dropped are dropped */ + DropRelationFiles(delrels, ndelrels, false); /* * Handle cache invalidation messages. |