| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Fix pg_recvlogical not to fsync output when it's a tty or pipe. |
| Date: | 2015-07-07 11:14:52 |
| Message-ID: | E1ZCQpw-0006MV-PU@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(dot)3050901(at)joh(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2015-07-07 11:14:55 | pgsql: Fix logical decoding bug leading to inefficient reopening of fil |
| Previous Message | Joe Conway | 2015-07-07 02:18:35 | pgsql: Make RLS related error messages more consistent and compliant. |