Skip to content

pq: unexpected message 'E'; expected ReadyForQuery #777

@yansal

Description

@yansal

We see this error regularly on a production system, and unfortunately we can't reproduce and there's very little information to help debugging.

It would be cool to add a 'E' case in this switch statement so that the error from Postgres can be shown.

pq/conn.go

Lines 1575 to 1585 in a8bb68e

func (cn *conn) readReadyForQuery() {
t, r := cn.recv1()
switch t {
case 'Z':
cn.processReadyForQuery(r)
return
default:
cn.bad = true
errorf("unexpected message %q; expected ReadyForQuery", t)
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions