Skip to content

Commit 972c7c6

Browse files
author
Etsuro Fujita
committed
postgres_fdw: Fix comments in connection.c.
Commit 27e1f14 missed updating some comments. Reviewed-by: Bharath Rupireddy Backpatch-through: 14 Discussion: https://postgr.es/m/CAPmGK15Q2Nm6U%2Ba_GwskrWFEVBZ9_3VKOvRrprGufpx91M_3Sw%40mail.gmail.com
1 parent 700c733 commit 972c7c6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

contrib/postgres_fdw/connection.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ GetConnection(UserMapping *user, bool will_prep_stmt, PgFdwConnState **state)
197197
make_new_connection(entry, user);
198198

199199
/*
200-
* We check the health of the cached connection here when starting a new
201-
* remote transaction. If a broken connection is detected, we try to
202-
* reestablish a new connection later.
200+
* We check the health of the cached connection here when using it. In
201+
* cases where we're out of all transactions, if a broken connection is
202+
* detected, we try to reestablish a new connection later.
203203
*/
204204
PG_TRY();
205205
{
@@ -215,9 +215,7 @@ GetConnection(UserMapping *user, bool will_prep_stmt, PgFdwConnState **state)
215215
ErrorData *errdata = CopyErrorData();
216216

217217
/*
218-
* If connection failure is reported when starting a new remote
219-
* transaction (not subtransaction), new connection will be
220-
* reestablished later.
218+
* Determine whether to try to reestablish the connection.
221219
*
222220
* After a broken connection is detected in libpq, any error other
223221
* than connection failure (e.g., out-of-memory) can be thrown

0 commit comments

Comments
 (0)