The current implementation forwards all read requests to the operating system through the socket causing excessive system calls. The effect is magnified when the underlying Socket is wrapped around a TLS implementation. This commit changes the underlying socket to be read-buffered by default with a buffer size of 16K, following the implementation of the official client. Signed-off-by: Petros Angelatos <petrosagg@gmail.com> |
||
---|---|---|
.github | ||
codegen | ||
docker | ||
postgres | ||
postgres-derive | ||
postgres-derive-test | ||
postgres-native-tls | ||
postgres-openssl | ||
postgres-protocol | ||
postgres-types | ||
test | ||
tokio-postgres | ||
.gitignore | ||
Cargo.toml | ||
docker-compose.yml | ||
LICENSE | ||
README.md | ||
THIRD_PARTY |
Rust-Postgres
PostgreSQL support for Rust.
postgres 
A native, synchronous PostgreSQL client.
tokio-postgres 
A native, asynchronous PostgreSQL client.
postgres-types 
Conversions between Rust and Postgres types.
postgres-native-tls 
TLS support for postgres and tokio-postgres via native-tls.
postgres-openssl 
TLS support for postgres and tokio-postgres via openssl.
Running test suite
The test suite requires postgres to be running in the correct configuration. The easiest way to do this is with docker:
- Install
docker
anddocker-compose
.- On ubuntu:
sudo apt install docker.io docker-compose
.
- On ubuntu:
- Make sure your user has permissions for docker.
- On ubuntu:
sudo usermod -aG docker $USER
- On ubuntu:
- Change to top-level directory of
rust-postgres
repo. - Run
docker-compose up -d
. - Run
cargo test
. - Run
docker-compose stop
.