Possible to disable prepared statements on postgres?

Whenever I do a database migration that changes a table structure, I
get a zillion of these errors:

ActiveRecord::StatementInvalid: PGError: ERROR: cached plan must not
change result type : SELECT "products".* FROM "products" WHERE
"products"."id" = $1 LIMIT 1

The Rails processes throw the above exception until they are
restarted.

This screws up my zero-downtime deploys completely.

I wonder if it would be possible for ActiveRecord to catch this
exception and retry it?