plproxy
Database partitioning implemented as procedural language
plproxy : Database partitioning implemented as procedural language
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | postgres_fdw pgspider_ext pgactive citus spock db_migrator dblink pglogical mimeo |
PIGSTY RPM and PGDG DEB are aligned at 2.12.0.; Upstream COPYRIGHT text matches ISC.
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 2.12.0 |
18 17 16 15 14 | plproxy |
- |
| RPM | PIGSTY | 2.12.0 |
18 17 16 15 14 | plproxy_$v |
- |
| DEB | PGDG | 2.12.0 |
18 17 16 15 14 | postgresql-$v-plproxy |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 |
| el8.aarch64 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 |
| el9.x86_64 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 |
| el9.aarch64 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 |
| el10.x86_64 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 |
| el10.aarch64 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 | PIGSTY 2.12.0 |
| d12.x86_64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| d12.aarch64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| d13.x86_64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| d13.aarch64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| u22.x86_64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| u22.aarch64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| u24.x86_64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| u24.aarch64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| u26.x86_64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
| u26.aarch64 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 | PGDG 2.12.0 |
Source
github.com/plproxy/plproxy
plproxy-2.12.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
- PL/Proxy 2.12.0 README
- PL/Proxy language syntax
- PL/Proxy cluster configuration
- PL/Proxy 2.12.0 release
PL/Proxy is a PostgreSQL procedural language handler that enables remote procedure calls between PostgreSQL databases, with optional sharding.
Create the Extension
Language Statements
PL/Proxy functions use four types of statements:
Cluster selection – connect to a pre-configured cluster:
Direct connection – use a connection string:
Execution Modes
RUN ON hash – route to a specific partition based on a hash:
RUN ON ALL – execute on all databases in parallel:
RUN ON ANY – randomly select a server:
Cluster Configuration
Clusters are configured using SQL/MED (Management of External Data):
Caveats
- PL/Proxy routes function calls, not arbitrary cross-database transactions. Design remote functions to be retry-safe and keep transaction boundaries explicit.
- Cluster definitions and user mappings can expose connection details; protect catalog access and prefer restricted remote roles.
- Release 2.12.0 fixes quoted-identifier parsing in
SELECT, a null-pointer issue inplproxy_fdw_validator, Windows builds, and PostgreSQL 19 compatibility. Existing SQL objects do not need a new usage pattern, but databases upgraded from an older extension version should run the matchingALTER EXTENSION plproxy UPDATEpath.