pgx returning "conn busy" only on Delete statements

757 Views Asked by At

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

0

There are 0 best solutions below