Fix bug in the test of file descriptor of current WAL file in pg_receivexlog.

Fujii Masao <fujii@postgresql.org>

Commit: 78f91f1a888008f329b1a6db673713d25bbd819b
Author: Fujii Masao <fujii@postgresql.org>
Date: 2014-11-19T10:11:03Z
Releases: 9.4.0
Fix bug in the test of file descriptor of current WAL file in pg_receivexlog.

In pg_receivexlog, in order to check whether the current WAL file is
being opened or not, its file descriptor has to be checked against -1
as an invalid value. But, oops, 7900e94 added the incorrect test
checking the descriptor against 1. This commit fixes that bug.

Back-patch to 9.4 where the bug was added.

Spotted by Magnus Hagander

Files

PathChange+/−
src/bin/pg_basebackup/receivelog.c modified +1 −1