Skip to content

Conversation

@snowch
Copy link

@snowch snowch commented Dec 16, 2025

This example demonstrates how to create a PostgreSQL-compatible server using pgwire that connects to DuckDB via ADBC traits.

Architecture:
PostgreSQL Client (psql) → pgwire Server → ADBC API → DuckDB

Features:

  • Implements ADBC traits (Driver, Database, Connection, Statement)
  • Uses DuckDB's native Arrow support via query_arrow()
  • File-based database at /tmp/pgwire_duckdb.db for persistence
  • Comprehensive documentation explaining how ADBC works
  • Instructions for accessing data with DuckDB CLI

The ADBC layer provides a standardized Arrow-native database connectivity interface, allowing the pgwire server to be database-agnostic.

@snowch
Copy link
Author

snowch commented Dec 16, 2025

@sunng87 the CI / Test is failing due to No space left on device ...

warning: libduckdb-sys@1.4.3: ar: /home/runner/work/pgwire/pgwire/target/debug/build/libduckdb-sys-2a0e3212add164c9/out/libduckdb.a: error reading 52396c2b84b2b80f-md.o: No space left on device

How should I proceed?

@sunng87 sunng87 linked an issue Dec 17, 2025 that may be closed by this pull request
@sunng87
Copy link
Owner

sunng87 commented Dec 17, 2025

Thank you for the example! @snowch This is the second time I got out of space error in github action.

By the way, I'm thinking about to create a new repo for duckdb + pgwire examples, because duckdb will introduce some dependencies that may slowdown build of pgwire. Will let you know when the repo is ready.

…ern (sunng87#227)

This example demonstrates how to create a PostgreSQL-compatible server
using pgwire that connects to DuckDB via ADBC traits.

Architecture:
  PostgreSQL Client (psql) → pgwire Server → ADBC API → DuckDB

Features:
- Implements ADBC traits (Driver, Database, Connection, Statement)
- Uses DuckDB's native Arrow support via query_arrow()
- File-based database at /tmp/pgwire_duckdb.db for persistence
- Comprehensive documentation explaining how ADBC works
- Instructions for accessing data with DuckDB CLI

The ADBC layer provides a standardized Arrow-native database connectivity
interface, allowing the pgwire server to be database-agnostic.
@snowch snowch force-pushed the claude/adbc-postgresql-example-F2dt2 branch from 360610e to 021fb14 Compare December 17, 2025 13:50
@sunng87
Copy link
Owner

sunng87 commented Dec 22, 2025

hello @snowch , I have created a new repo for pgwire duckdb integrations: https://github.com/sunng87/pgwire-duckdb

Could you please move this module there? You can add a new binary and place this module in src/

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.

ADBC example

3 participants