Re: [BUGS] BUG #1466: #maintenace_work_mem = 16384

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #1466: #maintenace_work_mem = 16384
Дата
Msg-id 7416.1110593021@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #1466: #maintenace_work_mem = 16384  ("Magnus Hagander" <mha@sollentuna.net>)
Список pgsql-patches
"Magnus Hagander" <mha@sollentuna.net> writes:
> Here is an updated patch, that should take care of this. Tested that it
> solves the problem reported.

I compared this to the version Bruce applied earlier and decided that
his version was good.  I don't think we should change the original logic
that treated write_syslogger_file as an independent special destination
for the syslogger process only.

I've backpatched that version to 8.0 branch.

>> If the logger is complaining, it's quite possibly because it's
>> unable to
>> write to its file.  Now that you mention it, doesn't this code go into
>> infinite recursion if write_syslogger_file_binary() tries to ereport?

> I haven't looked at this part, it appears a separate (but closely
> related) issue.

Actually, your change to make write_syslogger_file_binary() use
write_stderr seems like a fine solution to this problem.  However
you didn't get it quite right: the call has to be more like

    /* can't use ereport here because of possible recursion */
    if (rc != count)
        write_stderr("could not write to log file: %s\n", strerror(errno));

since write_stderr doesn't know about %m and doesn't supply a free
newline.

Applied and backpatched to 8.0.

            regards, tom lane

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

Предыдущее
От: Berényi Gábor
Дата:
Сообщение: Re: [INTERFACES] bcc32.mak for libpq broken? (distro 8.0.0) (fwd)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #1466: syslogger issues