Dev-iL commented on code in PR #52976:
URL: https://github.com/apache/airflow/pull/52976#discussion_r2281841861


##########
providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:
##########
@@ -421,10 +562,12 @@ def get_ui_field_behaviour(cls) -> dict[str, Any]:
 
     def get_db_log_messages(self, conn) -> None:
         """
-        Log all database messages sent to the client during the session.
+        Log database messages.
 
-        :param conn: Connection object
+        For psycopg3, this is a no-op as notices are handled in real-time by 
the notice_handler.
         """
-        if self.enable_log_db_messages:
-            for output in conn.notices:
-                self.log.info(output)
+        if USE_PSYCOPG3 or not self.enable_log_db_messages:
+            return
+
+        for output in conn.notices:
+            self.log.info(output)

Review Comment:
   The end result is the same - no logs. Regardless, I added a debug log for 
this case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to