PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <unistd.h>
#include "common/connect.h"
#include "fe_utils/cancel.h"
#include "fe_utils/string_utils.h"
Go to the source code of this file.
Macros | |
#define | write_stderr(str) |
Functions | |
void | SetCancelConn (PGconn *conn) |
void | ResetCancelConn (void) |
static void | handle_sigint (SIGNAL_ARGS) |
void | setup_cancel_handler (void(*query_cancel_callback)(void)) |
Variables | |
static PGcancel *volatile | cancelConn = NULL |
static const char * | cancel_sent_msg = NULL |
static const char * | cancel_not_sent_msg = NULL |
volatile sig_atomic_t | CancelRequested = false |
static void(* | cancel_callback )(void) = NULL |
#define write_stderr | ( | str | ) |
|
static |
Definition at line 153 of file cancel.c.
References cancel_callback, cancel_not_sent_msg, cancel_sent_msg, cancelConn, CancelRequested, PQcancel(), and write_stderr.
Referenced by setup_cancel_handler().
void ResetCancelConn | ( | void | ) |
Definition at line 107 of file cancel.c.
References cancelConn, and PQfreeCancel().
Referenced by CheckConnection(), consumeQueryResult(), do_connect(), do_lo_export(), do_lo_import(), do_lo_unlink(), executeMaintenanceCommand(), HandleCopyResult(), PSQLexec(), PSQLexecWatch(), runInitSteps(), SendQuery(), and wait_on_slots().
void SetCancelConn | ( | PGconn * | conn | ) |
Definition at line 77 of file cancel.c.
References cancelConn, conn, PQfreeCancel(), and PQgetCancel().
Referenced by consumeQueryResult(), do_lo_export(), do_lo_import(), do_lo_unlink(), executeMaintenanceCommand(), HandleCopyResult(), PSQLexec(), PSQLexecWatch(), runInitSteps(), SendQuery(), and wait_on_slots().
void setup_cancel_handler | ( | void(*)(void) | query_cancel_callback | ) |
Definition at line 183 of file cancel.c.
References _, cancel_callback, cancel_not_sent_msg, cancel_sent_msg, handle_sigint(), and pqsignal().
Referenced by main(), psql_setup_cancel_handler(), and runInitSteps().
|
static |
Definition at line 68 of file cancel.c.
Referenced by handle_sigint(), and setup_cancel_handler().
|
static |
Definition at line 50 of file cancel.c.
Referenced by handle_sigint(), and setup_cancel_handler().
|
static |
Definition at line 49 of file cancel.c.
Referenced by handle_sigint(), and setup_cancel_handler().
|
static |
Definition at line 43 of file cancel.c.
Referenced by disconnectDatabase(), handle_sigint(), PQcancelBlocking(), PQcancelCreate(), PQcancelErrorMessage(), PQcancelFinish(), PQcancelPoll(), PQcancelReset(), PQcancelSocket(), PQcancelStart(), PQcancelStatus(), ResetCancelConn(), SetCancelConn(), and test_cancel().
volatile sig_atomic_t CancelRequested = false |
Definition at line 59 of file cancel.c.
Referenced by handle_sigint(), initPopulateTable(), main(), reindex_one_database(), select_loop(), and vacuum_one_database().