Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

"does not exist, skipping" output is confusing #4216

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments
Closed

"does not exist, skipping" output is confusing #4216

openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments

Comments

@openstreetmap-trac
Copy link

Reporter: Harry Wood
[Submitted to the original trac issue database at 3.13pm, Tuesday, 7th February 2012]

This bit of output when you first run osm2pgsql is exceedingly confusing!

Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping

...repeated for all tables.

It's actually saying it is skipping a DROP step, but it looks a lot like something is going wrong.

Yes I know it says "NOTICE", but this has confused me a few times. It should state what it is'' doing rather than what it is not doing. It's not just me. We have to explain that it's not a problem in all the tutorials, but people still seem to get confused about it and it deflects attention from ''real errors occurring later in the output (e.g. [http://forum.openstreetmap.org/viewtopic.php?pid=219107 forum recently])

Suggest we just remove this notice

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 8.52am, Wednesday, 8th February 2012]

I'm not sure we can easily remove it as I believe that is from postgres not from osm2pgsql.

@openstreetmap-trac
Copy link
Author

Author: Harry Wood
[Added to the original trac issue at 6.49pm, Wednesday, 8th February 2012]

Ah yeah. [http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/output-pgsql.c#L1238 output-pgsql.c#L1238] No way to suppress the skipping NOTICE output at this line? How annoying

@openstreetmap-trac
Copy link
Author

Author: jburgess777[at]googlemail.com
[Added to the original trac issue at 6.59pm, Wednesday, 8th February 2012]

I looked at this a while back and I don't particularly like either of the obvious ways to fix it:

  • replace the 'IF EXISTS' with a manual check to see if the table exists before issuing the delete.
  • register a handler for all notifications from postgres and filter out any we want to hide.

@openstreetmap-trac
Copy link
Author

Author: pnorman
[Added to the original trac issue at 10.31am, Tuesday, 3rd January 2017]

I don't know when we made the change, but this is fixed by setting client_min_messages so no NOTICE is generated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant