[Tile-serving] [osm2pgsql] Post Processing New/Altered Rows after append to database (#162)

Mark Cupitt notifications at github.com
Fri Jun 20 04:20:48 UTC 2014


I have been trying to determine if there s a way to tell which rows in planet_osm_lines, planet_osm_points and planet_osm_polygon are new or have been modified after an osm2pgsql APPEND and cannot see any way to do it.

We have a need to post process the new/altered rows after each append operation, and it would be a lot more efficient if we were able to tell the new/altered rows using an index

One solution would be to add a column (say 'osm2pgsql') that was set to a Non Null Value during the append if the row is new, or modified. an Index could be maintained on this column, something like

     create index planet_osm_point_updated_index on planet_osm_point (osm2pgsql NULLS LAST );

or

    create index planet_osm_point_updated_index on planet_osm_point (osm2pgsql) where is not null osm2pgsql;

(I am unsure if a reindex is required with this method or not to pick up the new rows and ensure they are included)


---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/162
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20140619/17f9301a/attachment.html>


More information about the Tile-serving mailing list