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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy