Skip to content

erlang_cnode

Erlang C-node bridge for connecting PostgreSQL sessions to Erlang or Elixir nodes.

pg-erl · Erlang C-node bridge for connecting PostgreSQL sessions to Erlang or Elixir nodes.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101884erlang_cnodepg-erl1.0LANGPostgreSQLC

Usage

Sources:

erlang_cnode Erlang C-node bridge for connecting PostgreSQL sessions to Erlang or Elixir nodes.

Enablement

Install the files for the intended server, then create erlang_cnode in the target database:

CREATE EXTENSION erlang_cnode;

Core Workflow

The following example is taken from the reviewed upstream documentation. Adapt object names, paths, credentials, and workload values before use.

-- Connect to an Erlang node
SELECT erlang_connect('testnode@127.0.1.1', 'cookie123');

-- Call a remote function
SELECT erlang_call('testnode@127.0.1.1', 'erlang', 'node', '[]'::jsonb);

-- Disconnect
SELECT erlang_disconnect('testnode@127.0.1.1');

Main Objects

The reviewed install surface includes these prominent objects:

ObjectKindOperational role
erlang_callFUNCTIONCallable function from the reviewed install surface.
erlang_connectFUNCTIONCallable function from the reviewed install surface.
erlang_disconnectFUNCTIONCallable function from the reviewed install surface.
erlang_castFUNCTIONCallable function from the reviewed install surface.
erlang_check_connectionFUNCTIONCallable function from the reviewed install surface.
erlang_pending_requestsFUNCTIONCallable function from the reviewed install surface.
erlang_pingFUNCTIONCallable function from the reviewed install surface.
erlang_receive_asyncFUNCTIONCallable function from the reviewed install surface.

Operations and Boundaries

  • Treat extension upgrades as database changes: review the upstream upgrade path, privileges, locks, and backup/restore behavior first.

Table reader