PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "miscadmin.h"
#include "postmaster/bgworker.h"
#include "postmaster/interrupt.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) | |
PGDLLEXPORT void | worker_spi_main (Datum) |
static void | initialize_worker_spi (worktable *table) |
void | _PG_init (void) |
Datum | worker_spi_launch (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
worktable | |
void _PG_init | ( | void | ) |
Definition at line 281 of file worker_spi.c.
References 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, DefineCustomIntVariable(), DefineCustomStringVariable(), i, Int32GetDatum(), MarkGUCPrefixReserved(), PGC_POSTMASTER, PGC_SIGHUP, process_shared_preload_libraries_in_progress, RegisterBackgroundWorker(), snprintf, and sprintf.
|
static |
Definition at line 68 of file worker_spi.c.
References appendStringInfo(), buf, CommitTransactionCommand(), DatumGetInt64(), debug_query_string, elog(), FATAL, GetTransactionSnapshot(), initStringInfo(), pgstat_report_activity(), PopActiveSnapshot(), PushActiveSnapshot(), resetStringInfo(), SetCurrentStatementStartTimestamp(), SPI_connect(), SPI_execute(), SPI_finish(), SPI_getbinval(), SPI_OK_SELECT, SPI_OK_UTILITY, SPI_processed, SPI_tuptable, StartTransactionCommand(), STATE_IDLE, STATE_RUNNING, SPITupleTable::tupdesc, and SPITupleTable::vals.
PG_FUNCTION_INFO_V1 | ( | worker_spi_launch | ) |
Datum worker_spi_launch | ( | PG_FUNCTION_ARGS | ) |
Definition at line 353 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, and WaitForBackgroundWorkerStartup().
void worker_spi_main | ( | Datum | main_arg | ) |
Definition at line 49 of file worker_spi.c.
PG_MODULE_MAGIC |
Definition at line 45 of file worker_spi.c.
worktable |
Definition at line 61 of file worker_spi.c.