diff --git a/before/src/backend/access/transam/twophase.c b/after/src/backend/access/transam/twophase.c index 6d3efb4..b2b5192 100644 --- a/before/src/backend/access/transam/twophase.c +++ b/after/src/backend/access/transam/twophase.c @@ -1522,11 +1522,14 @@ FinishPreparedTransaction(const char *gid, bool isCommit) * Relcache init file invalidation requires processing both before and * after we send the SI messages. See AtEOXact_Inval() */ - if (hdr->initfileinval) - RelationCacheInitFilePreInvalidate(); - SendSharedInvalidMessages(invalmsgs, hdr->ninvalmsgs); - if (hdr->initfileinval) - RelationCacheInitFilePostInvalidate(); + if (isCommit) + { + if (hdr->initfileinval) + RelationCacheInitFilePreInvalidate(); + SendSharedInvalidMessages(invalmsgs, hdr->ninvalmsgs); + if (hdr->initfileinval) + RelationCacheInitFilePostInvalidate(); + } /* * Acquire the two-phase lock. We want to work on the two-phase callbacks