Hey. You should turn on all statement logging and tail the postgresql logs to see what your python app is really doing.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных