|
70 | 70 | #include "utils/snapmgr.h"
|
71 | 71 | #include "utils/timeout.h"
|
72 | 72 | #include "utils/timestamp.h"
|
| 73 | +#include "utils/typcache.h" |
73 | 74 |
|
74 | 75 | /*
|
75 | 76 | * User-tweakable parameters
|
@@ -2407,6 +2408,9 @@ CommitTransaction(void)
|
2407 | 2408 | /* Clean up the relation cache */
|
2408 | 2409 | AtEOXact_RelationCache(true);
|
2409 | 2410 |
|
| 2411 | + /* Clean up the type cache */ |
| 2412 | + AtEOXact_TypeCache(); |
| 2413 | + |
2410 | 2414 | /*
|
2411 | 2415 | * Make catalog changes visible to all backends. This has to happen after
|
2412 | 2416 | * relcache references are dropped (see comments for
|
@@ -2709,6 +2713,9 @@ PrepareTransaction(void)
|
2709 | 2713 | /* Clean up the relation cache */
|
2710 | 2714 | AtEOXact_RelationCache(true);
|
2711 | 2715 |
|
| 2716 | + /* Clean up the type cache */ |
| 2717 | + AtEOXact_TypeCache(); |
| 2718 | + |
2712 | 2719 | /* notify doesn't need a postprepare call */
|
2713 | 2720 |
|
2714 | 2721 | PostPrepare_PgStat();
|
@@ -2951,6 +2958,7 @@ AbortTransaction(void)
|
2951 | 2958 | false, true);
|
2952 | 2959 | AtEOXact_Buffers(false);
|
2953 | 2960 | AtEOXact_RelationCache(false);
|
| 2961 | + AtEOXact_TypeCache(); |
2954 | 2962 | AtEOXact_Inval(false);
|
2955 | 2963 | AtEOXact_MultiXact();
|
2956 | 2964 | ResourceOwnerRelease(TopTransactionResourceOwner,
|
@@ -5153,6 +5161,7 @@ CommitSubTransaction(void)
|
5153 | 5161 | true, false);
|
5154 | 5162 | AtEOSubXact_RelationCache(true, s->subTransactionId,
|
5155 | 5163 | s->parent->subTransactionId);
|
| 5164 | + AtEOSubXact_TypeCache(); |
5156 | 5165 | AtEOSubXact_Inval(true);
|
5157 | 5166 | AtSubCommit_smgr();
|
5158 | 5167 |
|
@@ -5328,6 +5337,7 @@ AbortSubTransaction(void)
|
5328 | 5337 |
|
5329 | 5338 | AtEOSubXact_RelationCache(false, s->subTransactionId,
|
5330 | 5339 | s->parent->subTransactionId);
|
| 5340 | + AtEOSubXact_TypeCache(); |
5331 | 5341 | AtEOSubXact_Inval(false);
|
5332 | 5342 | ResourceOwnerRelease(s->curTransactionOwner,
|
5333 | 5343 | RESOURCE_RELEASE_LOCKS,
|
|
0 commit comments