* Add a catcache inval entry */
| 369 | * Add a catcache inval entry |
| 370 | */ |
| 371 | static void |
| 372 | AddCatcacheInvalidationMessage(InvalidationListHeader *hdr, |
| 373 | int id, uint32 hashValue, Oid dbId) |
| 374 | { |
| 375 | SharedInvalidationMessage msg; |
| 376 | |
| 377 | Assert(id < CHAR_MAX); |
| 378 | msg.cc.id = (int8) id; |
| 379 | msg.cc.dbId = dbId; |
| 380 | msg.cc.hashValue = hashValue; |
| 381 | |
| 382 | /* |
| 383 | * Define padding bytes in SharedInvalidationMessage structs to be |
| 384 | * defined. Otherwise the sinvaladt.c ringbuffer, which is accessed by |
| 385 | * multiple processes, will cause spurious valgrind warnings about |
| 386 | * undefined memory being used. That's because valgrind remembers the |
| 387 | * undefined bytes from the last local process's store, not realizing that |
| 388 | * another process has written since, filling the previously uninitialized |
| 389 | * bytes |
| 390 | */ |
| 391 | VALGRIND_MAKE_MEM_DEFINED(&msg, sizeof(msg)); |
| 392 | |
| 393 | AddInvalidationMessage(&hdr->cclist, &msg); |
| 394 | } |
| 395 | |
| 396 | /* |
| 397 | * Add a whole-catalog inval entry |
no test coverage detected