| От | Tom Lane |
|---|---|
| Тема | Re: FATAL: bogus data in lock file "postmaster.pid": "" |
| Дата | |
| Msg-id | 8665.1346185536@sss.pgh.pa.us обсуждение |
| Ответ на | Re: FATAL: bogus data in lock file "postmaster.pid": "" (Bruce Momjian <bruce@momjian.us>) |
| Ответы |
Re: FATAL: bogus data in lock file "postmaster.pid": ""
|
| Список | pgsql-hackers |
Bruce Momjian <bruce@momjian.us> writes:
> Updated patch attached which just reports the file as empty. I assume
> we don't want the extra text output for pg_ctl like we do for the
> backend.
The backend side of this looks mostly sane to me (but drop the \n,
messages are not supposed to contain those). But the feof test proposed
for pg_ctl is no good: consider a file containing just, say, "-".
fscanf would eat the "-", then hit eof, and this would complain the file
is empty. Possibly checking for ftell(pidf) == 0 would do, though I'm
not sure whether it's portable to assume fscanf would eat a non-numeric
character before complaining.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера