https://github.com/kelvich/pg_consistency
Test to check transaction consistency in postgres-based clusters.
https://github.com/kelvich/pg_consistency
Last synced: 2 months ago
JSON representation
Test to check transaction consistency in postgres-based clusters.
- Host: GitHub
- URL: https://github.com/kelvich/pg_consistency
- Owner: kelvich
- Created: 2015-07-03T09:16:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-06T13:43:36.000Z (almost 10 years ago)
- Last Synced: 2025-02-10T10:17:59.258Z (4 months ago)
- Language: Go
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This script models simple bank account transfers. 10 workers are moving money from user to user, 1 connection is checking total amount of money. If overall amount is changed than script will print old and new values.
```shell
> psql -p 15432 postgres < init.sql
DROP TABLE
CREATE TABLE
INSERT 0 10000
sum
-----------
501281886
(1 row)> go run runtest.go
0 -> 501281886
501281886 -> 501379459
501379459 -> 501281886
501281886 -> 501208451
501208451 -> 501208316
501208316 -> 501208451
```