Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsafe concurrent use of ReplicationConn #5

Open
johanmickos opened this issue Feb 14, 2019 · 0 comments
Open

Unsafe concurrent use of ReplicationConn #5

johanmickos opened this issue Feb 14, 2019 · 0 comments

Comments

@johanmickos
Copy link

johanmickos commented Feb 14, 2019

pgx.ReplicationConn consists of a pgx.Conn internally, of which the documentation states:

Conn is a PostgreSQL connection handle. It is not safe for concurrent usage. Use ConnPool to manage access to multiple database connections from multiple goroutines.

In db/lr.go the method sendPeriodicHeartbeats() is accessing the session.ReplConn concurrently with the main loop in LRStream.

@johanmickos johanmickos changed the title Unsafe concurrent usage of ReplicationConn Unsafe concurrent use of ReplicationConn Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant