Closed nasc17 closed 1 year ago
the new changes lgtm. Is the reason why we have disable_auto_commit and user_transaction because of
if bool(self._execution_plan_options):
if self._execution_plan_options.include_estimated_execution_plan_xml:
sql_statement_text = Query.EXPLAIN_QUERY_TEMPLATE.format(sql_statement_text)
elif self._execution_plan_options.include_actual_execution_plan_xml:
self._disable_auto_commit = True
sql_statement_text = Query.ANALYZE_EXPLAIN_QUERY_TEMPLATE.format(sql_statement_text)
in query.py? I was wondering why we have two variables for the same purpose.
the new changes lgtm. Is the reason why we have disable_auto_commit and user_transaction because of
if bool(self._execution_plan_options): if self._execution_plan_options.include_estimated_execution_plan_xml: sql_statement_text = Query.EXPLAIN_QUERY_TEMPLATE.format(sql_statement_text) elif self._execution_plan_options.include_actual_execution_plan_xml: self._disable_auto_commit = True sql_statement_text = Query.ANALYZE_EXPLAIN_QUERY_TEMPLATE.format(sql_statement_text)
in query.py? I was wondering why we have two variables for the same purpose.
We were resetting auto commit based on Analyze Explain, which I did not believe had anything to do with transactions. So added the user transaction property. Also use this particular property to determine if we should force rollback command if error found. (We do not do this for user transaction, raise error to end block manual)
Psycopg 3 update, auto commit set to true automatically. Need to check for user defined transaction. addressing: #433
Edit messaging: