Re: more autovacuum fixes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: more autovacuum fixes
Дата
Msg-id 20070619200220.GH21268@alvh.no-ip.org
обсуждение исходный текст
Ответ на more autovacuum fixes  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: more autovacuum fixes  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-patches
Alvaro Herrera wrote:

> One problem with the patch is this (new code):
>
>     bn = (Backend *) malloc(sizeof(Backend));
> !   if (bn)
>     {
> !       bn->pid = StartAutoVacWorker();
> !       bn->is_autovacuum = true;
> !       /* we don't need a cancel key */
>
> !       if (bn->pid > 0)
> !       {
> !           /* FIXME -- unchecked memory allocation here */
> !           DLAddHead(BackendList, DLNewElem(bn));
>
>
> If the palloc() inside DLNewElem fails, we will fail to report a "fork
> failure" to the launcher.  I am not sure how serious this is.

Turns out that this problem is not serious at all, because if that
palloc() fails, the whole postmaster will exit with a FATAL out of
memory message.

The problems in the worker code after fork are still an issue though.

--
Alvaro Herrera                 http://www.amazon.com/gp/registry/DXLWNGRJD34J
"MySQL is a toy compared to PostgreSQL."             (Randal L. Schwartz)
      (http://archives.postgresql.org/pgsql-general/2005-07/msg00517.php)

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] 'Waiting on lock'
Следующее
От: "Simon Riggs"
Дата:
Сообщение: Re: [HACKERS] 'Waiting on lock'