pg_ctl cleanup

Поиск
Список
Период
Сортировка
От Neil Conway
Тема pg_ctl cleanup
Дата
Msg-id 1097730543.4682.15.camel@localhost.localdomain
обсуждение исходный текст
Ответы Re: pg_ctl cleanup  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
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
Дата:
Сообщение: (Turkish)New translation: pg_config
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: cast pid_t to int when using *printf