etcd_fdw
Foreign data wrapper for etcd
etcd_fdw : Foreign data wrapper for etcd
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.0.1 |
18 17 16 15 14 | etcd_fdw |
- |
| RPM | PIGSTY | 0.0.1 |
18 17 16 15 14 | etcd_fdw_$v |
- |
| DEB | PIGSTY | 0.0.1 |
18 17 16 15 14 | postgresql-$v-etcd-fdw |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| el8.aarch64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| el9.x86_64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| el9.aarch64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| el10.x86_64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| el10.aarch64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| d12.x86_64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| d12.aarch64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| d13.x86_64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| d13.aarch64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| u22.x86_64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| u22.aarch64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| u24.x86_64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| u24.aarch64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| u26.x86_64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
| u26.aarch64 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 | PIGSTY 0.0.1 |
Source
github.com/cybertec-postgresql/etcd_fdw
etcd_fdw-0.0.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources: intro blog, GitHub repo, v0.0.1 release
Quick Start
1. Enable Extension
2. Create Foreign Data Wrapper
3. Create Server
4. Create Foreign Table
5. Query Data
6. Real-time Sync with etcd
Changes made outside PostgreSQL are immediately visible:
Reference
Server Options
| Option | Required | Description |
|---|---|---|
connstr |
Yes | etcd endpoint (e.g., 127.0.0.1:2379) |
username |
No | Authentication username |
password |
No | Authentication password |
ssl_ca |
No | CA certificate file path |
ssl_cert |
No | Client certificate file path |
ssl_key |
No | Client private key file path |
ssl_servername |
No | Domain name for TLS verification |
connect_timeout |
No | Connection timeout (default: 10s) |
request_timeout |
No | Request timeout (default: 30s) |
Foreign Table Options
| Option | Default | Description |
|---|---|---|
rowid_column |
Required | Column used as unique row identifier |
prefix |
None | Restrict to keys with this prefix |
keys_only |
false |
Fetch only keys, skip values |
revision |
0 |
Read at specific etcd revision |
key |
\0 |
Starting key for range scan |
range_end |
None | Exclusive end key for range scan |
consistency |
l |
l (linearizable) or s (serializable) |
Query Pushdown
The following operations are pushed down to etcd for better performance:
- WHERE:
=,>=,>,<=,<,BETWEEN,LIKE 'prefix%' - ORDER BY: Remote sorting
- LIMIT/OFFSET: Remote pagination
Limitations
UPDATEon key column is not supported. Workaround:INSERTnew key, thenDELETEold key.- Requires etcd v3 API.
Version Notes
etcd_fdw 0.0.1 is the first public release. It uses pgrx 0.18.1, and the documented SQL surface is the FDW/server/table workflow above.