mirror of
https://github.com/postgres/postgres.git
synced 2026-06-12 18:20:18 -04:00
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
This commit is contained in:
parent
7900e94fbb
commit
78f91f1a88
1 changed files with 1 additions and 1 deletions
|
|
@ -919,7 +919,7 @@ HandleCopyStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
|
|||
if (replyRequested && still_sending)
|
||||
{
|
||||
if (reportFlushPosition && lastFlushPosition < blockpos &&
|
||||
walfile != 1)
|
||||
walfile != -1)
|
||||
{
|
||||
/*
|
||||
* If a valid flush location needs to be reported,
|
||||
|
|
|
|||
Loading…
Reference in a new issue