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

Giuseppe Castagno giuseppe.castagno at acca-esse.eu
Tue Jan 26 13:22:44 GMT 2010


Martijn van Oosterhout wrote:
> 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

ouch, I meant SIGINT here. I forgot SIGKILL cannot be masked out.

> 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.
> 

I'm already replaying the same changeset, if it's not properly finished 
(e.g. osm2pgsql not returning 0 at the end of the job).

So I think it's safe for me to just kill it, and replaying the last 
bunch of changesets applied.

Thanks,
BeppeC56
-- 
Kind Regards,
Giuseppe Castagno
Acca Esse http://www.acca-esse.eu
giuseppe.castagno at acca-esse.eu
beppec56 at openoffice.org




More information about the dev mailing list