Re: Out of Memory - 8.2.4

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Out of Memory - 8.2.4
Дата
Msg-id 5450.1188609112@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Out of Memory - 8.2.4  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Out of Memory - 8.2.4  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> It continues with the next table if interrupted (SIGINT), but the worker
> exits on any other error.  I would ask you to review that code -- it's
> in do_autovacuum, the PG_TRY block at the end.  It was committed in rev
> 1.52 of autovacuum.c.

While looking at this I came across something I didn't like at all:

         * We somewhat ignore the risk that the launcher changes its PID
         * between we reading it and the actual kill; we expect ProcKill to be
         * called shortly after us, and we assume that PIDs are not reused too
         * quickly after a process exits.

I'm fairly sure that Windows has a bad habit of recycling PIDs almost
immediately.  I didn't actually read the code to see what the assumption
is for --- I just noticed this comment and it set off alarm bells.  Can
you rework the logic to not depend on PIDs at all?  (Perhaps the
"session IDs" that Florian's patch will create would serve instead?
I imagine those will be assigned during InitProcess, so they should
be available to identify individual autovac workers.)

            regards, tom lane

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

Предыдущее
От: Alex Vinogradovs
Дата:
Сообщение: Re: WAL to RAW devices ?
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: computing and updating the size of a table with large objects