PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <poll.h>
#include "access/htup_details.h"
#include "access/xact.h"
#include "catalog/pg_user_mapping.h"
#include "commands/defrem.h"
#include "funcapi.h"
#include "libpq/libpq-be.h"
#include "libpq/libpq-be-fe-helpers.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postgres_fdw.h"
#include "storage/fd.h"
#include "storage/latch.h"
#include "utils/builtins.h"
#include "utils/datetime.h"
#include "utils/hsearch.h"
#include "utils/inval.h"
#include "utils/memutils.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | ConnCacheEntry |
Macros | |
#define | CONNECTION_CLEANUP_TIMEOUT 30000 |
#define | CONSTRUCT_ABORT_COMMAND(sql, entry, toplevel) |
#define | POSTGRES_FDW_GET_CONNECTIONS_COLS_V1_1 2 |
#define | POSTGRES_FDW_GET_CONNECTIONS_COLS_V1_2 5 |
#define | POSTGRES_FDW_GET_CONNECTIONS_COLS 5 /* maximum of above */ |
Typedefs | |
typedef Oid | ConnCacheKey |
typedef struct ConnCacheEntry | ConnCacheEntry |
Enumerations | |
enum | pgfdwVersion { PGFDW_V1_1 = 0 , PGFDW_V1_2 } |
Variables | |
static HTAB * | ConnectionHash = NULL |
static unsigned int | cursor_number = 0 |
static unsigned int | prep_stmt_number = 0 |
static bool | xact_got_connection = false |
static uint32 | pgfdw_we_cleanup_result = 0 |
static uint32 | pgfdw_we_connect = 0 |
static uint32 | pgfdw_we_get_result = 0 |
#define CONNECTION_CLEANUP_TIMEOUT 30000 |
Definition at line 100 of file connection.c.
#define CONSTRUCT_ABORT_COMMAND | ( | sql, | |
entry, | |||
toplevel | |||
) |
Definition at line 103 of file connection.c.
#define POSTGRES_FDW_GET_CONNECTIONS_COLS 5 /* maximum of above */ |
Definition at line 2001 of file connection.c.
#define POSTGRES_FDW_GET_CONNECTIONS_COLS_V1_1 2 |
Definition at line 1999 of file connection.c.
#define POSTGRES_FDW_GET_CONNECTIONS_COLS_V1_2 5 |
Definition at line 2000 of file connection.c.
typedef struct ConnCacheEntry ConnCacheEntry |
typedef Oid ConnCacheKey |
Definition at line 55 of file connection.c.
enum pgfdwVersion |
|
static |
Definition at line 760 of file connection.c.
References ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, DEBUG3, do_sql_command(), elog, GetCurrentTransactionNestLevel(), IsolationIsSerializable, snprintf, and ConnCacheEntry::xact_depth.
Referenced by GetConnection().
|
static |
Definition at line 636 of file connection.c.
References be_gssapi_get_delegation(), ereport, errcode(), errdetail(), errmsg(), ERROR, i, MyProcPort, superuser_arg(), user, UserMappingPasswordRequired(), and values.
Referenced by connect_pg_server().
|
static |
Definition at line 679 of file connection.c.
References conn, do_sql_command(), and PQserverVersion().
Referenced by connect_pg_server().
|
static |
Definition at line 462 of file connection.c.
References check_conn_params(), configure_remote_session(), conn, CONNECTION_OK, ereport, errcode(), errdetail_internal(), errmsg(), ERROR, ExtractConnectionOptions(), GetDatabaseEncodingName(), i, libpqsrv_connect_params(), libpqsrv_disconnect(), list_length(), ForeignServer::options, palloc(), pchomp(), pfree(), PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, pgfdw_application_name, pgfdw_security_check(), pgfdw_we_connect, PQerrorMessage(), PQstatus(), process_pgfdw_appname(), ForeignServer::servername, user, values, and WaitEventExtensionNew().
Referenced by make_new_connection().
Definition at line 2254 of file connection.c.
References Assert, ConnCacheEntry::conn, ConnectionHash, DEBUG3, disconnect_pg_server(), elog, ereport, errmsg(), FSV_MISSING_OK, GetForeignServerExtended(), hash_seq_init(), hash_seq_search(), ConnCacheEntry::invalidated, OidIsValid, ConnCacheEntry::serverid, ForeignServer::servername, WARNING, and ConnCacheEntry::xact_depth.
Referenced by postgres_fdw_disconnect(), and postgres_fdw_disconnect_all().
|
static |
Definition at line 598 of file connection.c.
References ConnCacheEntry::conn, and libpqsrv_disconnect().
Referenced by disconnect_cached_connections(), GetConnection(), pgfdw_inval_callback(), pgfdw_reject_incomplete_xact_state_change(), and pgfdw_reset_xact_state().
void do_sql_command | ( | PGconn * | conn, |
const char * | sql | ||
) |
Definition at line 717 of file connection.c.
References conn, do_sql_command_begin(), and do_sql_command_end().
Referenced by begin_remote_xact(), configure_remote_session(), pgfdw_subxact_callback(), pgfdw_xact_callback(), and postgresExecForeignTruncate().
|
static |
Definition at line 724 of file connection.c.
References conn, ERROR, pgfdw_report_error(), and PQsendQuery().
Referenced by do_sql_command(), pgfdw_subxact_callback(), and pgfdw_xact_callback().
Definition at line 731 of file connection.c.
References conn, ERROR, pgfdw_get_result(), pgfdw_report_error(), PGRES_COMMAND_OK, PQclear(), PQconsumeInput(), PQresultStatus(), and res.
Referenced by do_sql_command(), pgfdw_finish_pre_commit_cleanup(), and pgfdw_finish_pre_subcommit_cleanup().
PGconn* GetConnection | ( | UserMapping * | user, |
bool | will_prep_stmt, | ||
PgFdwConnState ** | state | ||
) |
Definition at line 195 of file connection.c.
References Assert, begin_remote_xact(), CacheRegisterSyscacheCallback(), ConnCacheEntry::conn, CONNECTION_BAD, ConnectionHash, CopyErrorData(), ctl, CurrentMemoryContext, DEBUG3, disconnect_pg_server(), elog, ereport, errdetail_internal(), errmsg_internal(), FlushErrorState(), FreeErrorData(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, hash_search(), ConnCacheEntry::have_prep_stmt, ConnCacheEntry::invalidated, sort-test::key, make_new_connection(), MemoryContextSwitchTo(), pchomp(), PgFdwConnState::pendingAreq, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, pgfdw_inval_callback(), pgfdw_reject_incomplete_xact_state_change(), pgfdw_subxact_callback(), pgfdw_we_get_result, pgfdw_xact_callback(), PQerrorMessage(), PQstatus(), process_pending_request(), RegisterSubXactCallback(), RegisterXactCallback(), ErrorData::sqlerrcode, ConnCacheEntry::state, user, WaitEventExtensionNew(), ConnCacheEntry::xact_depth, and xact_got_connection.
Referenced by create_foreign_modify(), dumpDatabase(), dumpDatabaseConfig(), dumpLOs(), dumpTableData_copy(), estimate_path_cost_size(), expand_extension_name_patterns(), expand_foreign_server_name_patterns(), expand_schema_name_patterns(), expand_table_name_patterns(), getTables(), main(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresBeginDirectModify(), postgresBeginForeignScan(), postgresExecForeignTruncate(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), setup_connection(), StartLogStreamer(), StreamLog(), and StreamLogicalLog().
unsigned int GetCursorNumber | ( | PGconn * | conn | ) |
Definition at line 824 of file connection.c.
References cursor_number.
Referenced by postgresAcquireSampleRowsFunc(), and postgresBeginForeignScan().
unsigned int GetPrepStmtNumber | ( | PGconn * | conn | ) |
Definition at line 838 of file connection.c.
References prep_stmt_number.
Referenced by prepare_foreign_modify().
|
static |
Definition at line 358 of file connection.c.
References Assert, ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, connect_pg_server(), DEBUG3, defGetBoolean(), DefElem::defname, elog, GetForeignServer(), GetSysCacheHashValue1, ConnCacheEntry::have_error, ConnCacheEntry::have_prep_stmt, ConnCacheEntry::invalidated, ConnCacheEntry::keep_connections, lfirst, ConnCacheEntry::mapping_hashvalue, ObjectIdGetDatum(), ForeignServer::options, ConnCacheEntry::parallel_abort, ConnCacheEntry::parallel_commit, ConnCacheEntry::server_hashvalue, ConnCacheEntry::serverid, ForeignServer::serverid, ForeignServer::servername, ConnCacheEntry::state, user, and ConnCacheEntry::xact_depth.
Referenced by GetConnection().
PG_FUNCTION_INFO_V1 | ( | postgres_fdw_disconnect | ) |
PG_FUNCTION_INFO_V1 | ( | postgres_fdw_disconnect_all | ) |
PG_FUNCTION_INFO_V1 | ( | postgres_fdw_get_connections | ) |
PG_FUNCTION_INFO_V1 | ( | postgres_fdw_get_connections_1_2 | ) |
|
static |
Definition at line 1601 of file connection.c.
References ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, CONSTRUCT_ABORT_COMMAND, ConnCacheEntry::have_error, ConnCacheEntry::have_prep_stmt, in_error_recursion_trouble(), PgFdwConnState::pendingAreq, pgfdw_cancel_query(), pgfdw_exec_cleanup_query(), PQTRANS_ACTIVE, PQtransactionStatus(), and ConnCacheEntry::state.
Referenced by pgfdw_subxact_callback(), and pgfdw_xact_callback().
|
static |
Definition at line 1675 of file connection.c.
References ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, CONNECTION_CLEANUP_TIMEOUT, CONSTRUCT_ABORT_COMMAND, GetCurrentTimestamp(), ConnCacheEntry::have_error, in_error_recursion_trouble(), lappend(), pgfdw_cancel_query_begin(), pgfdw_exec_cleanup_query_begin(), PQTRANS_ACTIVE, PQtransactionStatus(), and TimestampTzPlusMilliseconds.
Referenced by pgfdw_subxact_callback(), and pgfdw_xact_callback().
Definition at line 1327 of file connection.c.
References conn, CONNECTION_CLEANUP_TIMEOUT, GetCurrentTimestamp(), pgfdw_cancel_query_begin(), pgfdw_cancel_query_end(), and TimestampTzPlusMilliseconds.
Referenced by pgfdw_abort_cleanup().
|
static |
Definition at line 1353 of file connection.c.
References conn, ereport, errcode(), errmsg(), libpqsrv_cancel(), and WARNING.
Referenced by pgfdw_abort_cleanup_begin(), and pgfdw_cancel_query().
|
static |
Definition at line 1366 of file connection.c.
References conn, ereport, errcode(), errmsg(), pchomp(), pgfdw_get_cleanup_result(), PQclear(), PQconsumeInput(), PQerrorMessage(), and WARNING.
Referenced by pgfdw_cancel_query(), and pgfdw_finish_abort_cleanup().
|
static |
Definition at line 2326 of file connection.c.
References conn, CONNECTION_OK, EINTR, PQsocket(), and PQstatus().
Referenced by postgres_fdw_get_connections_internal().
|
static |
Definition at line 2363 of file connection.c.
Referenced by postgres_fdw_get_connections_internal().
|
static |
Definition at line 1418 of file connection.c.
References conn, CONNECTION_CLEANUP_TIMEOUT, GetCurrentTimestamp(), pgfdw_exec_cleanup_query_begin(), pgfdw_exec_cleanup_query_end(), and TimestampTzPlusMilliseconds.
Referenced by pgfdw_abort_cleanup().
Definition at line 1438 of file connection.c.
References Assert, conn, pgfdw_report_error(), PQsendQuery(), and WARNING.
Referenced by pgfdw_abort_cleanup_begin(), pgfdw_exec_cleanup_query(), and pgfdw_finish_abort_cleanup().
|
static |
Definition at line 1456 of file connection.c.
References Assert, conn, ereport, errcontext, errmsg(), pgfdw_get_cleanup_result(), pgfdw_report_error(), PGRES_COMMAND_OK, PQclear(), PQconsumeInput(), PQresultStatus(), and WARNING.
Referenced by pgfdw_exec_cleanup_query(), and pgfdw_finish_abort_cleanup().
PGresult* pgfdw_exec_query | ( | PGconn * | conn, |
const char * | query, | ||
PgFdwConnState * | state | ||
) |
Definition at line 853 of file connection.c.
References conn, pgfdw_get_result(), PQsendQuery(), and process_pending_request().
Referenced by close_cursor(), deallocate_query(), fetch_more_data(), get_remote_estimate(), pgfdw_xact_callback(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), and postgresReScanForeignScan().
|
static |
Definition at line 1841 of file connection.c.
References Assert, ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, CONNECTION_CLEANUP_TIMEOUT, CONSTRUCT_ABORT_COMMAND, GetCurrentTimestamp(), ConnCacheEntry::have_error, ConnCacheEntry::have_prep_stmt, lappend(), lfirst, NIL, PgFdwConnState::pendingAreq, pgfdw_cancel_query_end(), pgfdw_exec_cleanup_query_begin(), pgfdw_exec_cleanup_query_end(), pgfdw_reset_xact_state(), ConnCacheEntry::state, and TimestampTzPlusMilliseconds.
Referenced by pgfdw_subxact_callback(), and pgfdw_xact_callback().
|
static |
Definition at line 1733 of file connection.c.
References Assert, ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, CONNECTION_BAD, do_sql_command_end(), ConnCacheEntry::have_error, ConnCacheEntry::have_prep_stmt, lappend(), lfirst, NIL, pgfdw_reset_xact_state(), PQclear(), PQgetResult(), PQsendQuery(), PQstatus(), and res.
Referenced by pgfdw_xact_callback().
|
static |
Definition at line 1807 of file connection.c.
References Assert, ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, do_sql_command_end(), lfirst, pgfdw_reset_xact_state(), and snprintf.
Referenced by pgfdw_subxact_callback().
|
static |
Definition at line 1513 of file connection.c.
References CHECK_FOR_INTERRUPTS, conn, exit(), GetCurrentTimestamp(), MyLatch, now(), PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, pgfdw_we_cleanup_result, PQclear(), PQconsumeInput(), PQgetResult(), PQisBusy(), PQsocket(), res, ResetLatch(), TimestampDifferenceMilliseconds(), WaitEventExtensionNew(), WaitLatchOrSocket(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_SOCKET_READABLE, and WL_TIMEOUT.
Referenced by pgfdw_cancel_query_end(), and pgfdw_exec_cleanup_query_end().
Definition at line 870 of file connection.c.
References conn, libpqsrv_get_result_last(), and pgfdw_we_get_result.
Referenced by create_cursor(), do_sql_command_end(), execute_dml_stmt(), execute_foreign_modify(), fetch_more_data(), pgfdw_exec_query(), and prepare_foreign_modify().
Definition at line 1208 of file connection.c.
References Assert, ConnCacheEntry::conn, ConnectionHash, DEBUG3, disconnect_pg_server(), elog, hash_seq_init(), hash_seq_search(), ConnCacheEntry::invalidated, ConnCacheEntry::mapping_hashvalue, ConnCacheEntry::server_hashvalue, and ConnCacheEntry::xact_depth.
Referenced by GetConnection().
|
static |
Definition at line 1258 of file connection.c.
References ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, disconnect_pg_server(), ereport, errcode(), errmsg(), ERROR, GetForeignServer(), ConnCacheEntry::serverid, and ForeignServer::servername.
Referenced by GetConnection(), pgfdw_subxact_callback(), and pgfdw_xact_callback().
Definition at line 889 of file connection.c.
References conn, ereport, errcode(), errcontext, errdetail_internal(), errhint(), errmsg(), errmsg_internal(), MAKE_SQLSTATE, pchomp(), PG_DIAG_CONTEXT, PG_DIAG_MESSAGE_DETAIL, PG_DIAG_MESSAGE_HINT, PG_DIAG_MESSAGE_PRIMARY, PG_DIAG_SQLSTATE, PG_END_TRY, PG_FINALLY, PG_TRY, PQclear(), PQerrorMessage(), PQresultErrorField(), and res.
Referenced by close_cursor(), create_cursor(), deallocate_query(), do_sql_command_begin(), do_sql_command_end(), execute_dml_stmt(), execute_foreign_modify(), fetch_more_data(), fetch_more_data_begin(), get_remote_estimate(), pgfdw_exec_cleanup_query_begin(), pgfdw_exec_cleanup_query_end(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresForeignAsyncNotify(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), postgresReScanForeignScan(), and prepare_foreign_modify().
|
static |
Definition at line 1282 of file connection.c.
References ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, CONNECTION_OK, DEBUG3, disconnect_pg_server(), elog, ConnCacheEntry::invalidated, ConnCacheEntry::keep_connections, PQstatus(), PQTRANS_IDLE, PQtransactionStatus(), and ConnCacheEntry::xact_depth.
Referenced by pgfdw_finish_abort_cleanup(), pgfdw_finish_pre_commit_cleanup(), pgfdw_finish_pre_subcommit_cleanup(), pgfdw_subxact_callback(), and pgfdw_xact_callback().
|
static |
Definition at line 424 of file connection.c.
References be_gssapi_get_delegation(), conn, ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, i, MyProcPort, PQconnectionUsedGSSAPI(), PQconnectionUsedPassword(), superuser_arg(), user, UserMappingPasswordRequired(), and values.
Referenced by connect_pg_server().
|
static |
Definition at line 1095 of file connection.c.
References Assert, ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, ConnectionHash, do_sql_command(), do_sql_command_begin(), elog, ERROR, GetCurrentTransactionNestLevel(), hash_seq_init(), hash_seq_search(), lappend(), NIL, ConnCacheEntry::parallel_abort, ConnCacheEntry::parallel_commit, pgfdw_abort_cleanup(), pgfdw_abort_cleanup_begin(), pgfdw_finish_abort_cleanup(), pgfdw_finish_pre_subcommit_cleanup(), pgfdw_reject_incomplete_xact_state_change(), pgfdw_reset_xact_state(), snprintf, SUBXACT_EVENT_ABORT_SUB, SUBXACT_EVENT_PRE_COMMIT_SUB, ConnCacheEntry::xact_depth, and xact_got_connection.
Referenced by GetConnection().
|
static |
Definition at line 945 of file connection.c.
References Assert, ConnCacheEntry::changing_xact_state, ConnCacheEntry::conn, ConnectionHash, cursor_number, DEBUG3, do_sql_command(), do_sql_command_begin(), elog, ereport, errcode(), errmsg(), ERROR, hash_seq_init(), hash_seq_search(), ConnCacheEntry::have_error, ConnCacheEntry::have_prep_stmt, lappend(), NIL, ConnCacheEntry::parallel_abort, ConnCacheEntry::parallel_commit, pgfdw_abort_cleanup(), pgfdw_abort_cleanup_begin(), pgfdw_exec_query(), pgfdw_finish_abort_cleanup(), pgfdw_finish_pre_commit_cleanup(), pgfdw_reject_incomplete_xact_state_change(), pgfdw_reset_xact_state(), PQclear(), res, ConnCacheEntry::xact_depth, XACT_EVENT_ABORT, XACT_EVENT_COMMIT, XACT_EVENT_PARALLEL_ABORT, XACT_EVENT_PARALLEL_COMMIT, XACT_EVENT_PARALLEL_PRE_COMMIT, XACT_EVENT_PRE_COMMIT, XACT_EVENT_PRE_PREPARE, XACT_EVENT_PREPARE, and xact_got_connection.
Referenced by GetConnection().
Datum postgres_fdw_disconnect | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2205 of file connection.c.
References disconnect_cached_connections(), GetForeignServerByName(), PG_GETARG_TEXT_PP, PG_RETURN_BOOL, ForeignServer::serverid, and text_to_cstring().
Datum postgres_fdw_disconnect_all | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2226 of file connection.c.
References disconnect_cached_connections(), InvalidOid, and PG_RETURN_BOOL.
Datum postgres_fdw_get_connections | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2185 of file connection.c.
References PG_RETURN_VOID, PGFDW_V1_1, and postgres_fdw_get_connections_internal().
Datum postgres_fdw_get_connections_1_2 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2177 of file connection.c.
References PG_RETURN_VOID, PGFDW_V1_2, and postgres_fdw_get_connections_internal().
|
static |
Definition at line 2028 of file connection.c.
References Assert, BoolGetDatum(), ConnectionHash, CStringGetTextDatum, elog, ERROR, FSV_MISSING_OK, GetForeignServerExtended(), GETSTRUCT, hash_seq_init(), hash_seq_search(), HeapTupleIsValid, i, InitMaterializedSRF(), MappingUserName, TupleDescData::natts, ObjectIdGetDatum(), PG_GETARG_BOOL, pgfdw_conn_check(), pgfdw_conn_checkable(), PGFDW_V1_1, PGFDW_V1_2, POSTGRES_FDW_GET_CONNECTIONS_COLS, POSTGRES_FDW_GET_CONNECTIONS_COLS_V1_1, POSTGRES_FDW_GET_CONNECTIONS_COLS_V1_2, ReleaseSysCache(), FunctionCallInfoBaseData::resultinfo, SearchSysCache1(), ForeignServer::servername, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, tuplestore_putvalues(), and values.
Referenced by postgres_fdw_get_connections(), and postgres_fdw_get_connections_1_2().
void ReleaseConnection | ( | PGconn * | conn | ) |
Definition at line 803 of file connection.c.
Referenced by estimate_path_cost_size(), finish_foreign_modify(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresEndDirectModify(), postgresEndForeignScan(), postgresGetAnalyzeInfoForForeignTable(), and postgresImportForeignSchema().
|
static |
Definition at line 612 of file connection.c.
References defGetBoolean(), DefElem::defname, lfirst, and user.
Referenced by check_conn_params(), and pgfdw_security_check().
|
static |
Definition at line 81 of file connection.c.
Referenced by disconnect_cached_connections(), GetConnection(), pgfdw_inval_callback(), pgfdw_subxact_callback(), pgfdw_xact_callback(), and postgres_fdw_get_connections_internal().
|
static |
Definition at line 84 of file connection.c.
Referenced by close_cursor(), GetCursorNumber(), pgfdw_xact_callback(), and postgresAcquireSampleRowsFunc().
|
static |
Definition at line 91 of file connection.c.
Referenced by pgfdw_get_cleanup_result().
|
static |
Definition at line 92 of file connection.c.
Referenced by connect_pg_server().
|
static |
Definition at line 93 of file connection.c.
Referenced by GetConnection(), and pgfdw_get_result().
|
static |
Definition at line 85 of file connection.c.
Referenced by GetPrepStmtNumber().
Definition at line 88 of file connection.c.
Referenced by GetConnection(), pgfdw_subxact_callback(), and pgfdw_xact_callback().