pgsql: Fix hash_search to avoid corruption of the hash table on out-of-
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Fix hash_search to avoid corruption of the hash table on out-of- |
| Дата | |
| Msg-id | E1TPIC3-0001fl-BO@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Fix hash_search to avoid corruption of the hash table on out-of-memory. An out-of-memory error during expand_table() on a palloc-based hash table would leave a partially-initialized entry in the table. This would not be harmful for transient hash tables, since they'd get thrown away anyway at transaction abort. But for long-lived hash tables, such as the relcache hash, this would effectively corrupt the table, leading to crash or other misbehavior later. To fix, rearrange the order of operations so that table enlargement is attempted before we insert a new entry, rather than after adding it to the hash table. Problem discovered by Hitoshi Harada, though this is a bit different from his proposed patch. Branch ------ REL8_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f20d91866ec21660998c561a7bc2a08e8a30c1cc Modified Files -------------- src/backend/utils/hash/dynahash.c | 41 ++++++++++++++++++++++-------------- 1 files changed, 25 insertions(+), 16 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера