Alvaro Herrera <[EMAIL PROTECTED]> writes:
> Hi,
> While coding the autovacuum stuff I noticed that the dllist.c doubly
> linked list infrastructure is using malloc().  And the failure cases are
> handled in #ifdef FRONTEND exit(1) #else elog(ERROR) #endif.

> This seems a bit ugly, but more importantly, it doesn't let me free the
> whole list by simply resetting a context.  Would anybody be too upset if
> I wholesaledly changed malloc() to palloc() and get rid of the #ifdef
> FRONTEND?  AFAICS, no frontend code in our tree uses it.

IIRC, libpq once used it to manage the pending-notify list, but that was
a long time ago.  I have no objection to getting rid of the FRONTEND

If you change to plain palloc you'll need to check that existing callers
call it in a suitable context --- they may be assuming that the lists
will be durable regardless of CurrentMemoryContext.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to