Open
Description
Hi guys. I'm doing some performance-driven development and just and notice that my computer go to swap. All memory was consumed by postgresql processes.
It was just simple api called by wrk tool
selecting table with something like
store := md.NewCategoryStore(db)
q := md.NewCategoryQuery()
cats, err := store.FindAll(q)
db.Exec("ROLLBACK;")
doesnt help
db.Begin() ... tx.Rollback
help but i didnt understand how.
I'm used to feel that nothing can leak in postgresql session and started thinking what it could be. Than i've noticed power using of prepared statements and gotcha, db.Exec("DEALLOCATE ALL")
prevent leaking.