pgsql: Fix possible cache invalidation failure in ReceiveSharedInvalidM
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Fix possible cache invalidation failure in ReceiveSharedInvalidM |
| Дата | |
| Msg-id | E1WhNs9-0005Iy-HB@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Fix possible cache invalidation failure in ReceiveSharedInvalidMessages. Commit fad153ec45299bd4d4f29dec8d9e04e2f1c08148 modified sinval.c to reduce the number of calls into sinvaladt.c (which require taking a shared lock) by keeping a local buffer of collected-but-not-yet-processed messages. However, if processing of the last message in a batch resulted in a recursive call to ReceiveSharedInvalidMessages, we could overwrite that message with a new one while the outer invalidation function was still working on it. This would be likely to lead to invalidation of the wrong cache entry, allowing subsequent processing to use stale cache data. The fix is just to make a local copy of each message while we're processing it. Spotted by Andres Freund. Back-patch to 8.4 where the bug was introduced. Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/c8fbeeb45ef835a5e513ad167fd984baa7dc00d8 Modified Files -------------- src/backend/storage/ipc/sinval.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера