Thanks for chiming in @jhogberg and @kip!
This was interesting to solve.
The DB is set to UTF8:
While I was trying to narrow down the problem I got a different error message:
09:44:01.258 [error] GenServer #PID<0.7186.0> terminating
** (Postgrex.Error) ERROR 22023 (invalid_parameter_value) payload string too long
(ecto_sql 3.11.0) lib/ecto/adapters/sql.ex:1054: Ecto.Adapters.SQL.raise_sql_call_error/1
Which leads to the real problem
The table has a trigger attached - and that trigger is converting the updated/inserted table row to JSON to send a message using pg_notify
=> trying to convert the binary data…
And I was able to verify it as soon as I had a look at the postgresql log files
Never thought of this