This is a sample project that reproduces postgres-wire
issue #25.
The supplied docker-compose file can bring up the test database with data seeded using docker+compose.
- Install docker
- Install docker-compose
Alternatively, you can run the supplied seed file in your pre-existing database before updating the .env
file to make the application connect there.
The issue materializes when trying to concurrently update many rows in a loop. It was first discovered in a Web framework benchmarking suite. As such we've lifted and compacted the test warp application down to the problematic bits.
-
Install stack
-
Start server
$ make up # Brings up db and starts app server in foreground
Simply run
$ make test
# hammers the app server with traffic pattern that should materialize the issue
NOTE: it's possible your hardware/setup may require different concurrency levels or request counts to reproduce the issue.