PostgreSQL invalid frontend message type 74
I'm getting this error and I have no idea where it's coming from or
  what it means. I can't find any documentation on frontend message
  types in the PostgreSQL documentation.


They're listed here:

https://www.postgresql.org/docs/current/static/protocol-message-formats.html

and a more general description of the protocol is at:

https://www.postgresql.org/docs/current/static/protocol-overview.html#PROTOCOL-MESSAGE-CONCEPTS

The type of the message is given by the first byte. For example, if a client issues a "Bind", the first byte is the ASCII code for 'B', or 66.

The value 74 from the error message would be 'J', but according to the doc this message type is not used for anything in any version of the protocol, so the client or middleware sending it must be misbehaving.

If the traffic is not encrypted, a packet inspection tool like Wireshark might help to look into these packets. Wireshark knows about the PGSQL protocol. On the postgres server side, I don't think you can get more information beyond the mentioned error, because the backend gives up on the message at the first byte. As far as it's concerned, it's not correlated to any query.