File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
src/backend/access/transam Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1520,13 +1520,17 @@ FinishPreparedTransaction(const char *gid, bool isCommit)
1520
1520
* Handle cache invalidation messages.
1521
1521
*
1522
1522
* Relcache init file invalidation requires processing both before and
1523
- * after we send the SI messages. See AtEOXact_Inval()
1523
+ * after we send the SI messages, only when committing. See
1524
+ * AtEOXact_Inval().
1524
1525
*/
1525
- if (hdr -> initfileinval )
1526
- RelationCacheInitFilePreInvalidate ();
1527
- SendSharedInvalidMessages (invalmsgs , hdr -> ninvalmsgs );
1528
- if (hdr -> initfileinval )
1529
- RelationCacheInitFilePostInvalidate ();
1526
+ if (isCommit )
1527
+ {
1528
+ if (hdr -> initfileinval )
1529
+ RelationCacheInitFilePreInvalidate ();
1530
+ SendSharedInvalidMessages (invalmsgs , hdr -> ninvalmsgs );
1531
+ if (hdr -> initfileinval )
1532
+ RelationCacheInitFilePostInvalidate ();
1533
+ }
1530
1534
1531
1535
/*
1532
1536
* Acquire the two-phase lock. We want to work on the two-phase callbacks
You can’t perform that action at this time.
0 commit comments