[root@controller cinder(keystone_admin)]# cinder snapshot-rename 6ebbd38a-98f3-49e9-95ea-63ccfa567490 snapshot-w5new Request to rename snapshot '6ebbd38a-98f3-49e9-95ea-63ccfa567490' has been accepted.
解决方案: 在同步方式连接时,可以通过主动结束驱动开启的事务。 cursor = conn.cursor() # 增加end语句主动结束驱动开启的事务 cursor.execute("end; select * from test order by 1;") rows = cursor.fetchall() 使用异步连接方式主动开启事务,异步连接介绍具体请参见pyscopg官网。 #!