An Erlang PostgreSQL client library with asynchronous support, pipelining, and multiple API interfaces.
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.
Erlang developers building applications that require robust PostgreSQL database connectivity, especially those needing asynchronous operations, high performance, or advanced features like streaming replication.
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.
Erlang PostgreSQL client library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides epgsqla and epgsqli APIs for non-blocking operations and incremental result delivery, enabling efficient event-driven database interactions without blocking processes.
Utilizes PostgreSQL's protocol to send multiple commands without waiting for previous responses, reducing network round-trips and improving throughput for batch queries.
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.
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.
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.
Default use of unnamed statements can cause problems when multiple operations are attempted concurrently on the same connection, limiting scalability in some use cases.
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.