activerecord4-redshift-adapter icon indicating copy to clipboard operation
activerecord4-redshift-adapter copied to clipboard

DISCARD isn't valid in Redshift, so connection#reset! throws

Open smcgivern opened this issue 9 years ago • 0 comments

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.

smcgivern avatar Apr 20 '16 07:04 smcgivern