pgsql: In initdb, ensure stdout/stderr buffering behavior is what we ex

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: In initdb, ensure stdout/stderr buffering behavior is what we ex
Дата
Msg-id E1WkkFr-0000bV-6L@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
In initdb, ensure stdout/stderr buffering behavior is what we expect.

Since this program may print to either stdout or stderr, the relative
ordering of its messages depends on the buffering behavior of those files.
Force stdout to be line-buffered and stderr to be unbuffered, ensuring
that the behavior will match standard Unix interactive behavior, even
when stdout and stderr are rerouted to a file.

Per complaint from Tomas Vondra.  The particular case he pointed out is
new in HEAD, but issues of the same sort could arise in any branch with
other error messages, so back-patch to all branches.

I'm unsure whether we might not want to do this in other client programs
as well.  For the moment, just fix initdb.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/52d2f887d21a3649ea573b31f3a1b9dd5b68ea85

Modified Files
--------------
src/bin/initdb/initdb.c |    9 +++++++++
1 file changed, 9 insertions(+)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: In initdb, ensure stdout/stderr buffering behavior is what we ex
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: pg_ctl: Write error messages to stderr