* Determine whether a given relation (identified by OID) is one of the ones * we should store in a relcache init file. * * We must cache all nailed rels, and for efficiency we should cache every rel * that supports a syscache. The former set is almost but not quite a subset * of the latter. The special cases are relations where * RelationCacheInitializePhase2/3 chooses to nail for efficienc
| 6774 | * which do not support any syscache. |
| 6775 | */ |
| 6776 | bool |
| 6777 | RelationIdIsInInitFile(Oid relationId) |
| 6778 | { |
| 6779 | if (relationId == SharedSecLabelRelationId || |
| 6780 | relationId == TriggerRelidNameIndexId || |
| 6781 | relationId == DatabaseNameIndexId || |
| 6782 | relationId == SharedSecLabelObjectIndexId) |
| 6783 | { |
| 6784 | /* |
| 6785 | * If this Assert fails, we don't need the applicable special case |
| 6786 | * anymore. |
| 6787 | */ |
| 6788 | Assert(!RelationSupportsSysCache(relationId)); |
| 6789 | return true; |
| 6790 | } |
| 6791 | return RelationSupportsSysCache(relationId); |
| 6792 | } |
| 6793 | |
| 6794 | /* |
| 6795 | * Invalidate (remove) the init file during commit of a transaction that |
no test coverage detected