Disable prepared statements for an individual query

I think I read blog post related to this problem Elixir and Postgres: A Rarely Mentioned Problem | Lainblog

  • Use PostgreSQL 12, if possible
  • If you use Ecto, set plan_cache_mode to force_custom_plan in the PostgreSQL config
  • If you use PostgreSQL before version 12, set prepare: :unnamed in you Ecto database settings

I think that means when you are using PostgreSQL 12 you can fix this by adding parameters: [plan_cache_mode: "force_custom_plan"] to Ecto config.

Edit: fixed typo paramaters to parameters