activerecord4-redshift-adapter
activerecord4-redshift-adapter copied to clipboard
DISCARD isn't valid in Redshift, so connection#reset! throws
https://github.com/aamine/activerecord4-redshift-adapter/blob/master/lib/active_record/connection_adapters/redshift_adapter.rb#L247 runs DISCARD ALL, but that's not valid in Redshift, so it throws an exception instead:
# DISCARD ALL;
ERROR: syntax error at or near "DISCARD"
LINE 1: DISCARD ALL;
^
This should probably be replaced with something like pg_terminate_backend, but that might not behave exactly the same way.