jyotisharma7 commented on issue #23965:
URL: 
https://github.com/apache/shardingsphere/issues/23965#issuecomment-1418577158

   @TeslaCN I tried to fix this issue by using a connection pool. After that I 
am getting another erro which is given below:-
   ```
   asyncpg.exceptions.SyntaxOrAccessError: You have an error in your SQL 
syntax: SELECT pg_advisory_unlock_all();
   CLOSE ALL;
   UNLISTEN *;
   RESET ALL;, no viable alternative at input '();CLOSE' at line 2, position 0, 
near [@5,33:37='CLOSE',<547
   ```
   These are advisory SQL statements which runs by default but somehow these 
statements are getting executed in one life and inverted commas are not coming. 
   Below is the code of asyncpg connection:-
   ```
    def _get_reset_query(self):
           if self._reset_query is not None:
               return self._reset_query
   
           caps = self._server_caps
   
           _reset_query = []
           if caps.advisory_locks:
               _reset_query.append('SELECT pg_advisory_unlock_all();')
           if caps.sql_close_all:
               _reset_query.append('CLOSE ALL;')
           if caps.notifications and caps.plpgsql:
               _reset_query.append('UNLISTEN *;')
           if caps.sql_reset:
                _reset_query.append('RESET ALL;')
   
           _reset_query = '\n'.join(_reset_query)
           self._reset_query = _reset_query
           print(_reset_query)
           return _reset_query
   ```
   Could you please let me know which file in ShardingSphere is actually 
causing this issue?


-- 
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