8.2 pg_freespacemap crash

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема 8.2 pg_freespacemap crash
Дата
Msg-id 200904071534.49514.dfontaine@hi-media.com
обсуждение исходный текст
Ответы Re: 8.2 pg_freespacemap crash  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi,

We've been hit by a pg_freespacemap contrib module crash (SIGSEGV), gdb showed
it was in line 162 of it's pg_freespacemap.c file.
    fctx->record[i].reltablespace = fsmrel->key.spcNode;

Thanks to Andrew Gierth (irc:RhodiumToad) and after some analysis and  we've
been able to understand what happened: MaxFSMPages is not the maximum number
of elements (tables and indexes) contained into the FSM memory, and the
contrib believes it is.

In fact, AFAUI this number is computed from the max_fsm_pages setting applying
to it the 6 bytes per table. When you put in there some index FSM information,
you need 4 bytes. So you can store more items than max_fsm_pages * 6 bytes.

Please find attached a "stupid" patch for the case not to happen again here, I
suppose you'll want some more refined solution to get into -core.

Regards,
--
dim

PS: of course any faulty reasoning here would be mine, and we still have the
evidences around (core).

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: postgresql-8.3.6-1PGDG : redirect_stderr = on does not start server
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL 8.3.7: soundex function returns UTF-16 characters