PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "miscadmin.h"
#include "postmaster/bgworker.h"
#include "storage/ipc.h"
#include "storage/latch.h"
#include "storage/lwlock.h"
#include "storage/proc.h"
#include "storage/shmem.h"
#include "access/xact.h"
#include "executor/spi.h"
#include "fmgr.h"
#include "lib/stringinfo.h"
#include "pgstat.h"
#include "utils/builtins.h"
#include "utils/snapmgr.h"
#include "tcop/utility.h"
Go to the source code of this file.
Functions | |
PG_FUNCTION_INFO_V1 (worker_spi_launch) | |
void | _PG_init (void) |
void | worker_spi_main (Datum) |
static void | worker_spi_sigterm (SIGNAL_ARGS) |
static void | worker_spi_sighup (SIGNAL_ARGS) |
static void | initialize_worker_spi (worktable *table) |
Datum | worker_spi_launch (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
worktable | |
void _PG_init | ( | void | ) |
Definition at line 308 of file worker_spi.c.
References auth_delay_checks(), auth_delay_milliseconds, BackgroundWorker::bgw_flags, BackgroundWorker::bgw_function_name, BackgroundWorker::bgw_library_name, BackgroundWorker::bgw_main_arg, BGW_MAXLEN, BackgroundWorker::bgw_name, BGW_NEVER_RESTART, BackgroundWorker::bgw_notify_pid, BackgroundWorker::bgw_restart_time, BackgroundWorker::bgw_start_time, BackgroundWorker::bgw_type, BGWORKER_BACKEND_DATABASE_CONNECTION, BGWORKER_SHMEM_ACCESS, BgWorkerStart_RecoveryFinished, ClientAuthentication_hook, DefineCustomIntVariable(), DefineCustomStringVariable(), GUC_UNIT_MS, i, Int32GetDatum, original_client_auth_hook, PGC_POSTMASTER, PGC_SIGHUP, process_shared_preload_libraries_in_progress, RegisterBackgroundWorker(), snprintf, and sprintf.
|
static |
Definition at line 104 of file worker_spi.c.
References appendStringInfo(), BackgroundWorkerInitializeConnection(), BackgroundWorkerUnblockSignals(), BackgroundWorker::bgw_name, buf, CHECK_FOR_INTERRUPTS, CommitTransactionCommand(), StringInfoData::data, DatumGetInt32, DatumGetInt64, elog, FATAL, GetTransactionSnapshot(), got_sighup, got_sigterm, initStringInfo(), LOG, MyBgworkerEntry, MyLatch, name, palloc(), PG_WAIT_EXTENSION, PGC_SIGHUP, pgstat_report_activity(), pgstat_report_stat(), PopActiveSnapshot(), pqsignal(), proc_exit(), ProcessConfigFile(), pstrdup(), PushActiveSnapshot(), quote_identifier(), ResetLatch(), resetStringInfo(), SetCurrentStatementStartTimestamp(), SIGHUP, SPI_connect(), SPI_execute(), SPI_finish(), SPI_getbinval(), SPI_OK_SELECT, SPI_OK_UPDATE_RETURNING, SPI_OK_UTILITY, SPI_processed, SPI_tuptable, sprintf, StartTransactionCommand(), STATE_IDLE, STATE_RUNNING, SPITupleTable::tupdesc, val, SPITupleTable::vals, WaitLatch(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, WL_TIMEOUT, worker_spi_main(), worker_spi_sighup(), worker_spi_sigterm(), and worktable.
PG_FUNCTION_INFO_V1 | ( | worker_spi_launch | ) |
Datum worker_spi_launch | ( | PG_FUNCTION_ARGS | ) |
Definition at line 379 of file worker_spi.c.
References Assert, BackgroundWorker::bgw_flags, BackgroundWorker::bgw_function_name, BackgroundWorker::bgw_library_name, BackgroundWorker::bgw_main_arg, BGW_MAXLEN, BackgroundWorker::bgw_name, BGW_NEVER_RESTART, BackgroundWorker::bgw_notify_pid, BackgroundWorker::bgw_restart_time, BackgroundWorker::bgw_start_time, BackgroundWorker::bgw_type, BGWH_POSTMASTER_DIED, BGWH_STARTED, BGWH_STOPPED, BGWORKER_BACKEND_DATABASE_CONNECTION, BGWORKER_SHMEM_ACCESS, BgWorkerStart_RecoveryFinished, ereport, errcode(), errhint(), errmsg(), ERROR, i, Int32GetDatum, MyProcPid, PG_GETARG_INT32, PG_RETURN_INT32, PG_RETURN_NULL, RegisterDynamicBackgroundWorker(), snprintf, sprintf, status(), and WaitForBackgroundWorkerStartup().
void worker_spi_main | ( | Datum | main_arg | ) |
|
static |
Definition at line 89 of file worker_spi.c.
References got_sighup, MyLatch, and SetLatch().
Referenced by initialize_worker_spi().
|
static |
Definition at line 73 of file worker_spi.c.
References got_sigterm, MyLatch, and SetLatch().
Referenced by initialize_worker_spi().
PG_MODULE_MAGIC |
Definition at line 44 of file worker_spi.c.
worktable |
Definition at line 65 of file worker_spi.c.
Referenced by initialize_worker_spi().