I am running some code on jupyter notebook, there are some SQL queries to an aws redshift database.
The problem is after executing these queries even when I am not running anything on the notebook looks like the tables stay read-locked.
When I close the terminal running the notebook the lock releases.
Sample of running code
def met():
    con=psycopg2.connect(host=
                         ,user=
                         ,password=
                         ,port=
                         ,dbname =)
    table_data = pd.read_sql_query(query, con)
    con.close()
 
    