I have the following function:
func DeleteReservation(roomId int32, db *pgx.Conn) error {
_, err := db.Query(context.Background(), `
DELETE FROM
reservation
WHERE
room_id = $1
`, roomId)
if err != nil {
return err
}
return nil
}
Every time i call it I get conn busy back from pgx. I have an insert and select function and they both seem to work fine. Im pretty sure this did work earlier today. Any one know of a reason why the conn busy would be coming back for the above call? I tried using QueryRow too and got the same issue