https://github.com/jackc/pgx_notify_lost_connection
Test for PGX WaitForNotification when connection is lost
https://github.com/jackc/pgx_notify_lost_connection
Last synced: 8 months ago
JSON representation
Test for PGX WaitForNotification when connection is lost
- Host: GitHub
- URL: https://github.com/jackc/pgx_notify_lost_connection
- Owner: jackc
- Created: 2014-09-26T20:21:07.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-09-27T20:02:58.000Z (about 11 years ago)
- Last Synced: 2025-01-26T07:07:57.884Z (9 months ago)
- Language: Go
- Size: 164 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PGX Notify Lost Connection Test
This file tests pgx's behavior when in a WaitForNotification when the
connection silently goes away.
DB_HOST=remote.pg.server DB_USER=user DB_PASSWORD=password godep go run main.go
Use godep to test against the vendored version of pgx. Remove it to test a local
copy.
The best way to test behavior by connecting to a nearby machine, then physically
unplugging that remote machine. kill -9 on the PostgreSQL process is
insufficient as the connection is still closed.