try:
            cursor.close()
        except (psycopg2.Error, psycopg2.Warning) as error:
            LOGGER.debug('Error closing the cursor: %s', error)