aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2022-07-21 22:52:50 +0900
committerFujii Masao <fujii@postgresql.org>2022-07-22 12:01:31 +0900
commit63a8c689b0d49b8f426c5075d37dd67a63e06f82 (patch)
tree6853dd5793d87c6d9b21ef470dc95762e7a0a775 /src/backend/access/transam/commit_ts.c
parentd5623c447c743cce3913559a353451711b6fa2f4 (diff)
downloadpostgresql-63a8c689b0d49b8f426c5075d37dd67a63e06f82.tar.gz
postgresql-63a8c689b0d49b8f426c5075d37dd67a63e06f82.zip
postgres_fdw: Fix bug in checking of return value of PQsendQuery().
When postgres_fdw begins an asynchronous data fetch, it submits FETCH query by using PQsendQuery(). If PQsendQuery() fails and returns 0, postgres_fdw should report an error. But, previously, postgres_fdw reported an error only when the return value is less than 0, though PQsendQuery() never return the values other than 0 and 1. Therefore postgres_fdw could not handle the failure to send FETCH query in an asynchronous data fetch. This commit fixes postgres_fdw so that it reports an error when PQsendQuery() returns 0. Back-patch to v14 where asynchronous execution was supported in postgres_fdw. Author: Fujii Masao Reviewed-by: Japin Li, Tom Lane Discussion: https://postgr.es/m/b187a7cf-d4e3-5a32-4d01-8383677797f3@oss.nttdata.com
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions