aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtsuro Fujita <efujita@postgresql.org>2021-10-07 18:15:01 +0900
committerEtsuro Fujita <efujita@postgresql.org>2021-10-07 18:15:01 +0900
commit2051fd30a4fa3b62cdb244f5b9748c1cb3b39845 (patch)
tree23e91bf8a6b7c076de4b607aad97dbc59f4a7109
parentef2e107f548cfbd22060e92c0f435616cac2f57c (diff)
downloadpostgresql-2051fd30a4fa3b62cdb244f5b9748c1cb3b39845.tar.gz
postgresql-2051fd30a4fa3b62cdb244f5b9748c1cb3b39845.zip
postgres_fdw: Fix comments in connection.c.
Commit 27e1f1456 missed updating some comments. Reviewed-by: Bharath Rupireddy Backpatch-through: 14 Discussion: https://postgr.es/m/CAPmGK15Q2Nm6U%2Ba_GwskrWFEVBZ9_3VKOvRrprGufpx91M_3Sw%40mail.gmail.com
-rw-r--r--contrib/postgres_fdw/connection.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
index 82aa14a65de..ec8b688c507 100644
--- a/contrib/postgres_fdw/connection.c
+++ b/contrib/postgres_fdw/connection.c
@@ -195,9 +195,9 @@ GetConnection(UserMapping *user, bool will_prep_stmt, PgFdwConnState **state)
make_new_connection(entry, user);
/*
- * We check the health of the cached connection here when starting a new
- * remote transaction. If a broken connection is detected, we try to
- * reestablish a new connection later.
+ * We check the health of the cached connection here when using it. In
+ * cases where we're out of all transactions, if a broken connection is
+ * detected, we try to reestablish a new connection later.
*/
PG_TRY();
{
@@ -213,9 +213,7 @@ GetConnection(UserMapping *user, bool will_prep_stmt, PgFdwConnState **state)
ErrorData *errdata = CopyErrorData();
/*
- * If connection failure is reported when starting a new remote
- * transaction (not subtransaction), new connection will be
- * reestablished later.
+ * Determine whether to try to reestablish the connection.
*
* After a broken connection is detected in libpq, any error other
* than connection failure (e.g., out-of-memory) can be thrown