[Tile-serving] [openstreetmap/osm2pgsql] middle-pgsql: Flush between type changes (#889)

Sarah Hoffmann notifications at github.com
Thu Dec 13 23:05:35 UTC 2018


Introduce flush when type of import object changes, which replaces the endCopy operation in the middle_t
read functions. These functions are const and never should have called a function that changes state.
Instead of falling out of copy then, all copy operations are finished, when processing of an OSM type is done. Read functions should never be called when actually processing the same table, so the one-time end-copy is sufficient.

Also remove vector of table_desc and use a fixed sized array instead. Remove the pointer indirections to the vector entries and use index consts into the array.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/889

-- Commit Summary --

  * Introduce flush when type of import object changes
  * middle-pgsql: reorganise table descriptions

-- File Changes --

    M middle-pgsql.cpp (147)
    M middle-pgsql.hpp (15)
    M middle-ram.hpp (2)
    M middle.hpp (3)
    M osmdata.cpp (5)
    M osmdata.hpp (4)
    M parse-osmium.cpp (16)
    M parse-osmium.hpp (2)
    M tests/mockups.hpp (2)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/889.patch
https://github.com/openstreetmap/osm2pgsql/pull/889.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/889
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20181213/abf9b876/attachment.html>


More information about the Tile-serving mailing list