MCPcopy Create free account
hub / github.com/apache/cloudberry / start_xact_command

Function start_xact_command

src/backend/tcop/postgres.c:3552–3578  ·  view source on GitHub ↗

* Convenience routines for starting/committing a single command. */

Source from the content-addressed store, hash-verified

3550 * Convenience routines for starting/committing a single command.
3551 */
3552static void
3553start_xact_command(void)
3554{
3555 if (!xact_started)
3556 {
3557 StartTransactionCommand();
3558
3559 xact_started = true;
3560 }
3561
3562 /*
3563 * Start statement timeout if necessary. Note that this'll intentionally
3564 * not reset the clock on an already started timeout, to avoid the timing
3565 * overhead when start_xact_command() is invoked repeatedly, without an
3566 * interceding finish_xact_command() (e.g. parse/bind/execute). If that's
3567 * not desired, the timeout has to be disabled explicitly.
3568 */
3569 enable_statement_timeout();
3570
3571 /* Start timeout for checking if the client has gone away if necessary. */
3572 if (client_connection_check_interval > 0 &&
3573 IsUnderPostmaster &&
3574 MyProcPort &&
3575 !get_timeout_active(CLIENT_CONNECTION_CHECK_TIMEOUT))
3576 enable_timeout_after(CLIENT_CONNECTION_CHECK_TIMEOUT,
3577 client_connection_check_interval);
3578}
3579
3580static void
3581finish_xact_command(void)

Callers 9

exec_mpp_queryFunction · 0.85
restore_guc_to_QEFunction · 0.85
exec_simple_queryFunction · 0.85
exec_parse_messageFunction · 0.85
exec_bind_messageFunction · 0.85
exec_execute_messageFunction · 0.85
PostgresMainFunction · 0.85

Calls 4

StartTransactionCommandFunction · 0.85
enable_statement_timeoutFunction · 0.85
get_timeout_activeFunction · 0.85
enable_timeout_afterFunction · 0.85

Tested by

no test coverage detected