* CacheInvalidateRelcache * Register invalidation of the specified relation's relcache entry * at end of command. * * This is used in places that need to force relcache rebuild but aren't * changing any of the tuples recognized as contributors to the relcache * entry by CacheInvalidateHeapTuple. (An example is dropping an index.) */
| 1372 | * entry by CacheInvalidateHeapTuple. (An example is dropping an index.) |
| 1373 | */ |
| 1374 | void |
| 1375 | CacheInvalidateRelcache(Relation relation) |
| 1376 | { |
| 1377 | Oid databaseId; |
| 1378 | Oid relationId; |
| 1379 | |
| 1380 | PrepareInvalidationState(); |
| 1381 | |
| 1382 | relationId = RelationGetRelid(relation); |
| 1383 | if (relation->rd_rel->relisshared) |
| 1384 | databaseId = InvalidOid; |
| 1385 | else |
| 1386 | databaseId = MyDatabaseId; |
| 1387 | |
| 1388 | RegisterRelcacheInvalidation(databaseId, relationId); |
| 1389 | } |
| 1390 | |
| 1391 | /* |
| 1392 | * CacheInvalidateRelcacheAll |
no test coverage detected