[OSM-dev] Killing osm2pgsql application while updating PostGIS. What happens?

Martijn van Oosterhout kleptog at gmail.com
Tue Jan 26 12:30:09 GMT 2010


On Sun, Jan 24, 2010 at 12:10 PM, Giuseppe Castagno
<giuseppe.castagno at acca-esse.eu> wrote:
> Though I didn'd find anything managing the SIGKILL event.

Because you can't catch SIGKILL. If you meant SIGINT or SIGHUP then I
suppose the reason is it doesn't matter. exit_nicely() is primarily
good at reducing the number of spurious messages in the postgresql
logs. You don't *have* to close the database connections, the OS and
the DB will handle it just fine, albeit with some messages.

osm2pgsql does use transactions (for performance primarily) so just
killing it will not break anything it's not all *one* transaction
however so if you're exceedingly unlucky and kill it just as it's
trying to commit everything you can get a partially commit change.
Just redoing the changeset will fix everything though.

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/




More information about the dev mailing list