Page MenuHomePhabricator

Running importDump for Pg reveals savepoints outside of transactions
Open, MediumPublic

Description

I found the following in my logs while running importDump:

2011-02-09 13:07:13 EST LOG:  statement: COMMIT
2011-02-09 13:07:13 EST LOG:  statement: SELECT /* LinksUpdate::getExistingLinks 127.0.0.1 */  pl_namespace,pl_title  FROM pagelinks  WHERE pl_from = '438'   FOR UPDATE
2011-02-09 13:07:13 EST LOG:  statement: SAVEPOINT mw
2011-02-09 13:07:13 EST ERROR:  SAVEPOINT can only be used in transaction blocks
2011-02-09 13:07:13 EST STATEMENT:  SAVEPOINT mw
2011-02-09 13:07:13 EST LOG:  statement: INSERT /* LinksUpdate::incrTableUpdate 127.0.0.1 */ INTO pagelinks (pl_from,pl_namespace,pl_title) VALUES ('438','0','Analysis_of_variance')
2011-02-09 13:07:13 EST LOG:  statement: RELEASE mw
2011-02-09 13:07:13 EST ERROR:  RELEASE SAVEPOINT can only be used in transaction blocks
2011-02-09 13:07:13 EST STATEMENT:  RELEASE mw

(Set up verbose logging using the following at the end of postgresql.conf:

log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_statement = 'all'
)

Version: 1.18.x

Details

Reference
bz27282

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:21 PM
bzimport set Reference to bz27282.
bzimport added a subscriber: Unknown Object (MLST).

The LinksUpdate using INSERT IGNORE which is emulated with savepoints etc. in DatabasePostgres

That could be a possible cause for this. But it is using startAtomic and endAutomic which should be the right order to avoid such notice.

Would be nice to known if that is still an issue in current releases.