SQL command "SET CONSTRAINTS ALL IMMEDIATE" not supported. Django Testing

I’m running django test. But after 1 test . I’m getting this error. Anyone know the cause ?

Traceback (most recent call last):
  File "/opt/venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 83, in _execute
    return self.cursor.execute(sql)
psycopg2.errors.FeatureNotSupported: SQL command "SET CONSTRAINTS ALL IMMEDIATE" not supported.

Check you are using a supported version of PostgreSQL as per the relevant section in the docs: Databases | Django documentation | Django

psycopg2==2.9.3

and

services:
    db:
      image: postgres
      restart: always
      ports:
        - 5432:5432
      env_file:
        - ./.env.dev

Everything is fine already.