Skip to content

feat: add native PostgreSQL backend#627

Open
maelanjais wants to merge 1 commit into
abtreece:mainfrom
maelanjais:feat/postgres-backend
Open

feat: add native PostgreSQL backend#627
maelanjais wants to merge 1 commit into
abtreece:mainfrom
maelanjais:feat/postgres-backend

Conversation

@maelanjais
Copy link
Copy Markdown

Splits the PostgreSQL half out of #621 as requested, so it can be assessed independently.
Add a native PostgreSQL backend (postgres) powered by pgx/v5.

  • Real-time change notification via LISTEN/NOTIFY, eliminating polling in watch mode (channel confd_update).
  • Prefix scans via SQL LIKE so confd keys map onto a config table, and SQL Views can expose existing business tables as confd keys.
  • Standard username/password authentication.

New confd postgres subcommand (--node, --username, --password, --database, --table) plus database field in confd.toml. Registered in pkg/backends/client.go and pkg/backends/config.go.

Includes unit tests (pkg/backends/postgres/client_test.go), an integration test harness (test/integration/backends/postgres), and a walkthrough in POSTGRES_DEMO.md.

Add a native PostgreSQL backend (`postgres`) powered by pgx/v5.

- Real-time change notification via LISTEN/NOTIFY, eliminating polling
  in watch mode (channel `confd_update`).
- Prefix scans via SQL LIKE so confd keys map onto a config table, and
  SQL Views can expose existing business tables as confd keys.
- Standard username/password authentication.

New `confd postgres` subcommand (--node, --username, --password,
--database, --table) plus `database` field in confd.toml. Registered in
pkg/backends/client.go and pkg/backends/config.go.

Includes unit tests (pkg/backends/postgres/client_test.go), an
integration test harness (test/integration/backends/postgres), and a
walkthrough in POSTGRES_DEMO.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant