mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
090d0f2050
Using the infrastructure provided by this patch, it's possible either to wait for the startup of a dynamically-registered background worker, or to poll the status of such a worker without waiting. In either case, the current PID of the worker process can also be obtained. As usual, worker_spi is updated to demonstrate the new functionality. Patch by me. Review by Andres Freund.
10 lines
302 B
SQL
10 lines
302 B
SQL
/* contrib/worker_spi/worker_spi--1.0.sql */
|
|
|
|
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
|
\echo Use "CREATE EXTENSION worker_spi" to load this file. \quit
|
|
|
|
CREATE FUNCTION worker_spi_launch(pg_catalog.int4)
|
|
RETURNS pg_catalog.int4 STRICT
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C;
|