ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
provsqlSharedState Struct Reference

Shared state stored in the PostgreSQL shared-memory segment. More...

#include "provsql_shmem.h"

Public Attributes

LWLock * lock
 Mutual-exclusion lock for pipe writes.
long pipebmr
 Background-to-main pipe: read end (worker reads).
long pipebmw
 Background-to-main pipe: write end (worker writes).
long pipembr
 Main-to-background pipe: read end (worker reads).
long pipembw
 Main-to-background pipe: write end (backend writes).
char kcmcp_endpoint [256]
 Live endpoint of the managed KCMCP server ("" when none): written by the supervisor worker, read by the in-extension client.

Detailed Description

Shared state stored in the PostgreSQL shared-memory segment.

All backends and the background worker access this structure through the provsql_shared_state global pointer.

lock serialises gate-creation messages so that only one backend writes to the pipe at a time. The four long fields hold OS file descriptors for the two anonymous pipes:

  • pipembr / pipembw: main-backend → background (write end in main)
  • pipebmr / pipebmw: background → main-backend (write end in worker)

Definition at line 112 of file provsql_shmem.h.

Member Data Documentation

◆ kcmcp_endpoint

char provsqlSharedState::kcmcp_endpoint[256]

Live endpoint of the managed KCMCP server ("" when none): written by the supervisor worker, read by the in-extension client.

Definition at line 119 of file provsql_shmem.h.

◆ lock

LWLock* provsqlSharedState::lock

Mutual-exclusion lock for pipe writes.

Definition at line 114 of file provsql_shmem.h.

◆ pipebmr

long provsqlSharedState::pipebmr

Background-to-main pipe: read end (worker reads).

Definition at line 115 of file provsql_shmem.h.

◆ pipebmw

long provsqlSharedState::pipebmw

Background-to-main pipe: write end (worker writes).

Definition at line 116 of file provsql_shmem.h.

◆ pipembr

long provsqlSharedState::pipembr

Main-to-background pipe: read end (worker reads).

Definition at line 117 of file provsql_shmem.h.

◆ pipembw

long provsqlSharedState::pipembw

Main-to-background pipe: write end (backend writes).

Definition at line 118 of file provsql_shmem.h.


The documentation for this struct was generated from the following file: