* RelationCacheInvalidateEntry * * This routine is invoked for SI cache flush messages. * * Any relcache entry matching the relid must be flushed. (Note: caller has * already determined that the relid belongs to our database or is a shared * relation.) * * We used to skip local relations, on the grounds that they could * not be targets of cross-backend SI update messages; but it seems
| 2997 | * local and nonlocal relations. |
| 2998 | */ |
| 2999 | void |
| 3000 | RelationCacheInvalidateEntry(Oid relationId) |
| 3001 | { |
| 3002 | Relation relation; |
| 3003 | |
| 3004 | RelationIdCacheLookup(relationId, relation); |
| 3005 | |
| 3006 | if (PointerIsValid(relation)) |
| 3007 | { |
| 3008 | relcacheInvalsReceived++; |
| 3009 | RelationFlushRelation(relation); |
| 3010 | } |
| 3011 | else |
| 3012 | { |
| 3013 | int i; |
| 3014 | |
| 3015 | for (i = 0; i < in_progress_list_len; i++) |
| 3016 | if (in_progress_list[i].reloid == relationId) |
| 3017 | in_progress_list[i].invalidated = true; |
| 3018 | } |
| 3019 | } |
| 3020 | |
| 3021 | /* |
| 3022 | * RelationCacheInvalidate |
no test coverage detected