jackc / pgx

PostgreSQL driver and toolkit for Go
MIT License
10.83k stars 845 forks source link

fatal error: concurrent map writes in internal/stmtcache.(*LRUCache).Invalidate #2152

Closed ItsMeSamey closed 1 month ago

ItsMeSamey commented 1 month ago

Describe the bug Program crashes due to concurrent map writes fatal.log

To Reproduce I was spamming with create and select quires.

Race detector found races in github.com/jackc/pgx/v5/internal/stmtcache.(*LRUCache).RemoveInvalidated() and more races.log

Expected behavior expect to able able to concurrently query the database

Actual behavior program crashes

Version