[COMMITTERS] pgsql: Make pgstat tabstat lookup hash table less fragile.
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | [COMMITTERS] pgsql: Make pgstat tabstat lookup hash table less fragile. |
| Дата | |
| Msg-id | E1dA687-0001D9-TW@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Make pgstat tabstat lookup hash table less fragile. Code review for commit 090010f2e. Fix cases where an elog(ERROR) partway through a function would leave the persistent data structures in a corrupt state. pgstat_report_stat got this wrong by invalidating PgStat_TableEntry structs before removing hashtable entries pointing to them, and get_tabstat_entry got it wrong by ignoring the possibility of palloc failure after it had already created a hashtable entry. Also, avoid leaking a memory context per transaction, which the previous code did through misunderstanding hash_create's API. We do not need to create a context to hold the hash table; hash_create will do that. (The leak wasn't that large, amounting to only a memory context header per iteration, but it's still surprising that nobody noticed it yet.) Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5d00b764cd682f6071b35033f508a431d9d3f920 Modified Files -------------- src/backend/postmaster/pgstat.c | 124 +++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 60 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера