From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: more autovacuum fixes |
Date: | 2007-06-19 20:02:20 |
Message-ID: | 20070619200220.GH21268@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-06-19 20:24:43 | Re: [HACKERS] 'Waiting on lock' |
Previous Message | Alvaro Herrera | 2007-06-19 17:58:14 | Re: more autovacuum fixes |