Some variables were not initialized correctly when parsing a style file,
which lead to some surprising behaviour with flags of one config line
re-used by the next if the flags field of that line was empty.
This could also have lead to buffer overflows in the first line being
parsed.
This commit also adds some more tests for the parsing code.
See #1590
These images are not available anymore. This means that we won't
be testing gcc < 7 and clang < 8 anymore, so add a note to that
end in the prerequisites section.
The outputs have a shared pointer to the middle_query_t to access the
data held by the middle. This in turn holds pointers to potentially
large datastructures and the flat node file. We need to release those
pointers after we don't need them any more so that if and when the
middle doesn't need those data structures any more they get cleaned up.
In effect this releases the memory used for the cache and flat node
store earlier.
Fixes#1563
The message "Done postprocessing on table '{}' in {}" was logged twice
when `--drop` is used. This changes one of the log messages to the
more specific "Table '{}' dropped in {}".
It is not clear how exactly the volatility classification works in
trigger functions, so it is better to be on the safe side here and not
declare the function IMMUTABLE (which makes it the default VOLATILE
instead).
https://www.postgresql.org/docs/current/xfunc-volatility.html
When importing a planet file or a huge extract, something with more than
about 1 billion nodes, the new RAM node location could overflow a 32bit
"offset" value which meant that the node locations would not be found
again. The result were missing features, because osm2pgsql just ignores
features with geometries that can not be built due to missing node
locations.
This fix has two parts: First, it fixes the typo which made the max
block size too large. This typo lead to a doubling of the max block size
which directly lead to the bug. The other fix is to check the "offset"
value and, if it becomes too large, start a new block. This probably
isn't necessary for "normal" OSM data which should usually work with the
new max block size, but it provides a safety net in case some the block
size becomes too large for some data.
See #1540
The directory where the Lua config file was read from is now available
in the osm2pgsql.config_dir variable. This is useful, for instance, when
we want to include other files into our config file.