pgdeltastream icon indicating copy to clipboard operation
pgdeltastream copied to clipboard

Unsafe concurrent use of ReplicationConn

Open johanmickos opened this issue 6 years ago • 0 comments

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 avatar Feb 14 '19 18:02 johanmickos