Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 78493b7

Browse files
committed
Fix bug where pg_receivexlog goes into busy loop if -s option is set to 0.
The problem is that pg_receivexlog calls select(2) with timeout=0 and goes into busy loop when --status-interval option is set to 0. This bug was introduced by the commit, 74cbe96. Per report from Sawada Masahiko
1 parent 455044d commit 78493b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_basebackup/receivelog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ CopyStreamReceive(PGconn *conn, long timeout, char **buffer)
10941094
* No data available. Wait for some to appear, but not longer than
10951095
* the specified timeout, so that we can ping the server.
10961096
*/
1097-
if (timeout > 0)
1097+
if (timeout != 0)
10981098
{
10991099
int ret;
11001100

0 commit comments

Comments
 (0)