pg_ctl cleanup

Поиск
Список
Период
Сортировка
Искать
От
Neil Conway
Тема
pg_ctl cleanup
Дата
Msg-id
1097730543.4682.15.camel@localhost.localdomain
Список
Дерево обсуждения
pg_ctl cleanup Neil Conway <neilc@samurai.com>
Re: pg_ctl cleanup Neil Conway <neilc@samurai.com>
This patch makes a couple small changes to pg_ctl:

- refactor a bunch of code to call a separate function print_msg() which
checks whether "silent mode" is enabled before printing an error
message. I could have made print_msg() take a varargs list, but I didn't
bother ("worse is better"). Also, we do fflush() whether it is needed or
not, on the grounds performance here is irrelevant.

- rename "silence_mode" to "silent_mode", which IMHO makes more sense

- make the error messages we emit in "waiting" mode more consistent (I
believe this is a recent regression introduced by Peter's error message
commit). The patch changes the output to:

% pg_ctl -l /tmp/foo -w start   
waiting for postmaster to start.... done
postmaster started
% pg_ctl -l /tmp/foo -w stop 
waiting for postmaster to shut down.... done
postmaster stopped

Rather than:

% pg_ctl -l /tmp/foo -w start              
waiting for postmaster to start....done
postmaster started
% pg_ctl -l /tmp/foo -w stop               
waiting for postmaster to shut down... .done
postmaster stopped

Barring any objections, I intend to apply to HEAD tomorrow.

-Neil

В списке pgsql-patches по дате отправления
От: Devrim GUNDUZ
Дата:
От: Bruce Momjian
Дата:
FAQ