shouldn't we log permission errors when accessing the configured trigger file?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема shouldn't we log permission errors when accessing the configured trigger file?
Дата
Msg-id 20140126180352.GJ30218@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: shouldn't we log permission errors when accessing the configured trigger file?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,


For some reason CheckForStandbyTrigger() doesn't report permission
errors when stat()int the trigger file. Shouldn't we fix that?

static bool
CheckForStandbyTrigger(void)
{
...if (stat(TriggerFile, &stat_buf) == 0){    ereport(LOG,            (errmsg("trigger file found: %s", TriggerFile)));
  unlink(TriggerFile);    triggered = true;    fast_promote = true;    return true;}
 

Imo the stat() should warn about all errors but ENOENT?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Recovery inconsistencies, standby much larger than primary
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: running make check with only specified tests