pgsql: Fix pg_recvlogical not to fsync output when it's a tty or pipe.

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Fix pg_recvlogical not to fsync output when it's a tty or pipe.
Дата
Msg-id E1ZCQpw-0006MV-PU@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix pg_recvlogical not to fsync output when it's a tty or pipe.

The previous coding tried to handle possible failures when fsyncing a
tty or pipe fd by accepting EINVAL - but apparently some
platforms (windows, OSX) don't reliably return that. So instead check
whether the output fd refers to a pipe or a tty when opening it.

Reported-By: Olivier Gosseaume, Marko Tiikkaja
Discussion: 559AF98B.3050901@joh.to

Backpatch to 9.4, where pg_recvlogical was added.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5c0de384d2ceceb07e77e1368e07868244be6762

Modified Files
--------------
src/bin/pg_basebackup/pg_recvlogical.c |   17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix logical decoding bug leading to inefficient reopening of fil
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Add psql PROMPT variable showing the pid of the connected to bac