Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Erlang
  3. epgsql

epgsql

BSD-3-ClauseErlang4.8.0

An Erlang PostgreSQL client library with asynchronous support, pipelining, and multiple API interfaces.

GitHubGitHub
448 stars165 forks0 contributors

What is epgsql?

Epgsql is an Erlang PostgreSQL client library that provides comprehensive database connectivity with support for synchronous, asynchronous, and incremental query APIs. It solves the problem of efficient database interaction in Erlang applications by leveraging PostgreSQL's protocol features like pipelining and offering flexible data handling.

Target Audience

Erlang developers building applications that require robust PostgreSQL database connectivity, especially those needing asynchronous operations, high performance, or advanced features like streaming replication.

Value Proposition

Developers choose Epgsql for its performance optimizations like request pipelining, multiple API choices for different use cases, and extensive feature set including batch execution and pluggable data type codecs, all within a mature and community-driven library.

Overview

Erlang PostgreSQL client library.

Use Cases

Best For

  • Building high-performance Erlang applications that interact with PostgreSQL
  • Implementing asynchronous database queries in Erlang systems
  • Reducing latency in database operations via request pipelining
  • Executing batch database operations efficiently
  • Handling PostgreSQL streaming replication in Erlang
  • Customizing data type encoding/decoding with pluggable codecs

Not Ideal For

  • Projects needing simple, drop-in database connectivity without configuring multiple APIs or advanced pipelining
  • Applications relying heavily on concurrent database operations over a single PostgreSQL connection due to unnamed statement limitations
  • Systems where SSL encryption is critical and inbox sizes are large, due to known performance degradation

Pros & Cons

Pros

Asynchronous Query Handling

Provides epgsqla and epgsqli APIs for non-blocking operations and incremental result delivery, enabling efficient event-driven database interactions without blocking processes.

Performance Pipelining

Utilizes PostgreSQL's protocol to send multiple commands without waiting for previous responses, reducing network round-trips and improving throughput for batch queries.

Flexible API Choices

Offers synchronous, asynchronous, and incremental APIs all usable on the same connection, allowing developers to switch between interfaces based on application needs without reconnection overhead.

Batch Operation Efficiency

Supports batch execution of prepared statements in a single operation, reducing latency and overhead for bulk inserts or updates, as demonstrated in the README examples.

Cons

SSL Performance Degradation

The README admits that SSL performance can significantly degrade when the driver process has a large inbox, posing a risk for secure connections under high load.

Concurrent Connection Issues

Default use of unnamed statements can cause problems when multiple operations are attempted concurrently on the same connection, limiting scalability in some use cases.

Complex Configuration Overhead

With multiple APIs, pluggable codecs, and advanced options like socket_active for flow control, initial setup and tuning require deeper expertise compared to simpler drivers.

Frequently Asked Questions

Quick Stats

Stars448
Forks165
Contributors0
Open Issues37
Last commit2 months ago
CreatedSince 2014

Tags

#database-driver#pipelining#postgres#asynchronous#postgresql#erlang#streaming-replication#postgresql-client

Built With

E
Erlang

Included in

Erlang1.7k
Auto-fetched 7 hours ago

Related Projects

mysqlmysql

MySQL/OTP – MySQL and MariaDB client for Erlang/OTP

Stars377
Forks142
Last commit1 year ago
boss_dbboss_db

BossDB: a sharded, caching, pooling, evented ORM for Erlang

Stars275
Forks137
Last commit2 years ago
pgsql_migrationpgsql_migration

PostgreSQL migrations for Erlang

Stars19
Forks8
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub