NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

I am maintaining my postgresql database using osm2pgsql to maintain my database. I want to track the changes made by the daily replication files.

I was thinking of creating triggers that fired after delete, update and insert. But I have concerns that is might slow down the daily update process. Has anyone done this?

Can you export the change files to polygons in another table? or to a shapefile?

Thank you

Andrew

asked 02 Nov '14, 20:53

ajc2014's gravatar image

ajc2014
46335
accept rate: 0%


I did something along such lines for a map I produced during the licence change (slightly over two years ago).

It is slightly tricky in particular, except if something has changed, osm2pgsql will not update any objects, it deletes and then inserts a new copy. This is relevant if you have added additional columns to the schema and want to retain the information (essentially you have to copy the extra information on delete and then re-add on insert). I would not have any concerns performance wise if you are running this on a reasonably fast machine.

permanent link

answered 03 Nov '14, 17:08

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

Can you post how you made it work?

(06 Nov '14, 01:03) ajc2014

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×362
×263
×165
×18

question asked: 02 Nov '14, 20:53

question was seen: 5,078 times

last updated: 06 Nov '14, 01:03

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum