Content-Length: 264067 | pFad | http://github.com/postgrespro/postgres_cluster/commit/0fe21602e27fab20845e2345691b5522edd53c02

D8 pg_rewind: Fix busted sanity check. · postgrespro/postgres_cluster@0fe2160 · GitHub
Skip to content

Commit 0fe2160

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 d86a2b7 commit 0fe2160

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
@@ -270,8 +270,8 @@ receiveFileChunks(const char *sql)
270270
if (PQnfields(res) != 3 || PQntuples(res) != 1)
271271
pg_fatal("unexpected result set size while fetching remote files\n");
272272

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

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/0fe21602e27fab20845e2345691b5522edd53c02

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy