DatabaseError: current transaction is aborted, commands ignored until end of transaction block?
This is what postgres does when a query produces an error and you try to run another query without first rolling back the transaction. (You might think of it as a safety feature, to keep you from corrupting your data.)
To fix this, you'll want to figure out where in the code that bad query is being executed. It might be helpful to use the log_statement and log_min_error_statement options in your postgresql server.
Django+Postgres: current transaction is aborted, commands ignored until end of transaction block
You can try this:
from django.db import connection
connection._rollback()
The more detailed discussion of This issue can be found here
ERROR: current transaction is aborted, commands ignored until end of transaction block --- export data from Aqua studio
You probably shouldn't be exporting millions of rows through a JDBC/ODBC connection, especially for Redshift.
For Redshift, please use the UNLOAD
command documented here. You'll have to UNLOAD
the file to S3 and download it from there.
For Postgres, use COPY TO
as documented here.
Related Topics
Separation of Business Logic and Data Access in Django
How to Remove Packages Installed with Python's Easy_Install
Peak-Finding Algorithm for Python/Scipy
Convert a List of Characters into a String
Get Lat/Long Given Current Point, Distance and Bearing
Find First Element in a Sequence That Matches a Predicate
Python Nested Functions Variable Scoping
What Is the Point of Indexing in Pandas
How to Unzip a List of Tuples into Individual Lists
Validate Ssl Certificates with Python
How to Set Class Attributes from Variable Arguments (Kwargs) in Python
Convert Rgba Png to Rgb with Pil
Django Db Settings 'Improperly Configured' Error