Skip to content

libpq: another command is already in progress #177

@Chratho

Description

@Chratho

Every once in a while I am noting "another command is already in progress" errors from libpq. The respective application manages database connections in a resource pool.

I am now wondering whether the application sometimes puts broken connections (with PGASYNC_BUSY still set) back into the pool, letting a subsequent access to the connection fail.

The implementation of exec contains the following line:

_ <- PQ.consumeInput h -- FIXME?

Is ignoring the result really okay this way? Calling PQgetResult afterwards, you might not be able to decide whether the result indicates that fetching is simply done or an error occurred. If at least something was already received, an application might continue without even noting.

I am not sure whether this really is an issue, but currently its the only reason I could think of causing the above exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions