WARNING: there is already a transaction in progress
От | Matevž Mrak |
---|---|
Тема | WARNING: there is already a transaction in progress |
Дата | |
Msg-id | CAF3mAgnJy3O0+q0_AgLp0kVPBYR4FUVkv++c1O=8BXJgsjwLmw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: WARNING: there is already a transaction in progress
(Matevž Mrak <matevz.mr@gmail.com>)
Re: WARNING: there is already a transaction in progress (David G Johnston <david.g.johnston@gmail.com>) |
Список | pgsql-odbc |
"""
Engages the lock
@return: None
"""
log.info("mutex lock %d" % self.locked)
if not self.locked:
cur = self.conn.cursor()
log.info("mutex start tran")
self.locked = True
try:
cur.execute('BEGIN TRANSACTION; LOCK TABLE "%s" IN EXCLUSIVE MODE;' % self.table)
except:
log.info("mutex tran failed")
log.exception()
raise
else:
log.info("mutex tran started")
cur.close()
del cur
def unlock(self):
"""
Releases the lock
@return: None
"""
log.info("mutex unlock %d" % self.locked)
if self.locked:
try:
cur = self.conn.cursor()
except:
log.exception()
raise
log.info("mutex end trans")
self.locked = False
cur.execute("END TRANSACTION")
log.info("mutex trans ended")
cur.close()
del cur
InterfaceError: ('25001', -1, 'WARNING: there is already a transaction in progress', 8489)
- File "/Users/user/ana/ana/srv/orm/driver.py", line 100, in execute
[0m[31m14:58:53.862 0.0.0.0 {unknown} - Query to execute: BEGIN TRANSACTION; LOCK TABLE "Sys_sequencer" IN EXCLUSIVE MODE; - File "/Users/user/ana/ana/srv/orm/driver.py", line 101, in execute
Lep pozdrav,
В списке pgsql-odbc по дате отправления: