Re: new compiler warnings

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: new compiler warnings
Дата
Msg-id 4E9DE2CE.4000007@enterprisedb.com
обсуждение исходный текст
Ответ на Re: new compiler warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: new compiler warnings
Список pgsql-hackers
On 18.10.2011 23:28, Tom Lane wrote:
> "Kevin Grittner"<Kevin.Grittner@wicourts.gov>  writes:
>> Would it be too weird to do something like this for each?:
>
>> -       write(fileno(stderr), line, len);
>> +       rc = write(fileno(stderr), line, len);
>> +       if (rc>= 0&&  rc != len)
>> +       {
>> +           Assert(false);
>> +           return;
>> +       }
>
> I don't think the assert is a good idea.  If it ever did happen, that
> would promote the problem from "corrupted data in the log" to "database
> crash".

I believe the idea is that if there's a platform that does that, we want 
to know. In production, you don't run with assertions enabled. It makes 
sense to me, or can we fall back to logging a warning to stderr or 
something?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: new compiler warnings
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: new compiler warnings