You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
Reporter: aubreyholland[at]gmail.com [Submitted to the original trac issue database at 9.04am, Wednesday, 21st October 2009]
There are several places where osm2pgsql drops tables without checking to see if they exist first. We have a monitoring service that is being alerted when this happens if the tables don't exist and causing problems.
I'm attaching a patch that will check to see if tables exist before dropping them. It does this by doing a select against pg_tables to see if the table is in the list before attempting to drop it.
The text was updated successfully, but these errors were encountered:
Author: TomH [Added to the original trac issue at 8.16pm, Wednesday, 21st October 2009]
One for you, though personally I'd probably just change to "DROP TABLE IF EXISTS" now that the tile server is running a version of postgres which supports that,
Author: jburgess777[at]googlemail.com [Added to the original trac issue at 8.58pm, Wednesday, 21st October 2009]
I have been wanting to get rid of those error messages in the logs too.
Backwards compatibility would be nice to have but postgresql-8.2 has been around for nearly 3 years so it seems reasonable to require that as a minimum version. I could be persuaded to go with either solution.
Author: aubreyholland[at]gmail.com [Added to the original trac issue at 9.34pm, Wednesday, 21st October 2009]
Sorry, I made a major screwup in my patch there, and it would delete the main tables instead of the tmp ones. Found out the hard way. I'm attaching another patch. I'm in favor of the IF EXISTS solution rather than this one, for what it's worth.
Reporter: aubreyholland[at]gmail.com
[Submitted to the original trac issue database at 9.04am, Wednesday, 21st October 2009]
There are several places where osm2pgsql drops tables without checking to see if they exist first. We have a monitoring service that is being alerted when this happens if the tables don't exist and causing problems.
I'm attaching a patch that will check to see if tables exist before dropping them. It does this by doing a select against pg_tables to see if the table is in the list before attempting to drop it.
The text was updated successfully, but these errors were encountered: