diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
--- a/django/db/backends/__init__.py
+++ b/django/db/backends/__init__.py
@@ -255,6 +255,11 @@
     def make_debug_cursor(self, cursor):
         return util.CursorDebugWrapper(cursor, self)
 
+    def check_constraints(self):
+        sql = self.ops.check_constraints_sql()
+        for s in sql:
+            self.cursor().execute(s)
+
 class BaseDatabaseFeatures(object):
     allows_group_by_pk = False
     # True if django.db.backend.utils.typecast_timestamp is used on values
@@ -440,6 +445,12 @@
         """
         return ''
 
+    def check_constraints_sql(self):
+        """
+        Returns the SQL necessary to force deferred constraints to be checked.
+        """
+        return []
+
     def drop_foreignkey_sql(self):
         """
         Returns the SQL command that drops a foreign key.
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py
--- a/django/db/backends/postgresql_psycopg2/operations.py
+++ b/django/db/backends/postgresql_psycopg2/operations.py
@@ -48,6 +48,9 @@
     def deferrable_sql(self):
         return " DEFERRABLE INITIALLY DEFERRED"
 
+    def check_constraints_sql(self):
+        return ["SET CONSTRAINTS ALL IMMEDIATE"]
+
     def lookup_cast(self, lookup_type):
         lookup = '%s'
 
diff --git a/django/test/testcases.py b/django/test/testcases.py
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -304,6 +304,7 @@
     def _post_teardown(self):
         """ Performs any post-test things. This includes:
 
+            * Tearing down database fixtures, if any.
             * Putting back the original ROOT_URLCONF if it was changed.
             * Force closing the connection, so that the next test gets
               a clean cursor.
@@ -597,8 +598,13 @@
 
         restore_transaction_methods()
         for db in databases:
-            transaction.rollback(using=db)
-            transaction.leave_transaction_management(using=db)
+            # Force constraints check execution (on backends that support
+            # deferring them) before rolling back the transaction.
+            try:
+                connections[db].check_constraints()
+            finally:
+                transaction.rollback(using=db)
+                transaction.leave_transaction_management(using=db)
 
 def _deferredSkip(condition, reason):
     def decorator(test_func):
