mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-23 10:40:40 +02:00
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;
|