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

Commit 063ff92

Browse files
committed
pg_rewind: Fix busted sanity check.
As written, the code would only fail the sanity check if none of the columns returned by the server were of the expected type, but we want it to fail if even one column is not of the expected type. Discussion: http://postgr.es/m/CA+TgmoYuY5zW7JEs+1hSS1D=V5K8h1SQuESrq=bMNeo0B71Sfw@mail.gmail.com
1 parent 8bf58c0 commit 063ff92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_rewind/libpq_fetch.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ receiveFileChunks(const char *sql)
269269
if (PQnfields(res) != 3 || PQntuples(res) != 1)
270270
pg_fatal("unexpected result set size while fetching remote files\n");
271271

272-
if (PQftype(res, 0) != TEXTOID &&
273-
PQftype(res, 1) != INT4OID &&
272+
if (PQftype(res, 0) != TEXTOID ||
273+
PQftype(res, 1) != INT4OID ||
274274
PQftype(res, 2) != BYTEAOID)
275275
{
276276
pg_fatal("unexpected data types in result set while fetching remote files: %u %u %u\n",

0 commit comments

Comments
 (0)