pgsql: Fix bug in the test of file descriptor of current WAL file in pg

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix bug in the test of file descriptor of current WAL file in pg
Date: 2014-11-19 10:11:24
Message-ID: E1Xr2EO-0003yX-Po@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d5f4df7264ec73abda41eb78b81cf430b33f7606

Modified Files
--------------
src/bin/pg_basebackup/receivelog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-11-19 17:30:56 pgsql: Avoid file descriptor leak in pg_test_fsync.
Previous Message Fujii Masao 2014-11-19 05:12:15 pgsql: Fix pg_receivexlog --slot so that it doesn't prevent the server