Ticket #1248 (assigned enhancement)

Opened 2 years ago

Last modified 1 year ago

Please add transaction support to ogr2ogr for the postgres driver

Reported by: daniel@ceregatti.org Assigned to: mloskot (accepted)
Priority: low Milestone:
Component: default Version: unspecified
Severity: minor Keywords:
Cc: neteler

Description

I found out recently that ogr2ogr does not support transactions when inserting into postgres. I believe this is essential when doing large batch imports, such as importing TIGER. It helps avoid duplicate rows from being inserted and should make bulk data loads faster. I imagine a command line argument could be added to the ogr2ogr command line that would then perform all inserts and even DDL in a transaction which would get rolled back on error or abort, and commit on successful exit.

Thanks,

Daniel Ceregatti (AKA Primer on freenode)

Change History

07/20/06 11:07:18 changed by warmerdam

Mateusz,

Perhaps in late September or October, once you are a PostGIS guru, perhaps
you could look into implementing transactions properly in the PostGIS driver.
Make sure you talk to me as we might need to alter the transaction model 
in OGR to get this right. 

11/04/06 11:18:44 changed by neteler@itc.it

Hi,

it seems that
http://bugzilla.remotesensing.org/show_bug.cgi?id=1265
contains some related code.

Markus

03/11/07 01:28:37 changed by warmerdam

Mateusz,

I think the approach to this bug should be to apply the patches from 
#1265 in trunk and then do some serious testing.  I think we should
leave this till after the GDAL 1.4.1 release though since it is to
substantial to back port. 

03/11/07 07:37:38 changed by mloskot

Frank,

I've reviewed patches from the #1265 but I'm sure they need to be reviewed in very details. OK, let's leave it after 1.4.1.

May be it's a good idea to create a branch where I could play with various approaches and you would be able to checkout and test them too, without messing the trunk?