Opened 8 years ago

Closed 4 years ago

#4216 closed enhancement (fixed)

"does not exist, skipping" output is confusing

Reported by: Harry Wood Owned by: jburgess777@…
Priority: minor Milestone:
Component: osm2pgsql Version:
Keywords: Cc:


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. forum recently)

Suggest we just remove this notice

Change History (4)

comment:1 Changed 8 years ago by Tom Hughes

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

comment:2 Changed 8 years ago by Harry Wood

Ah yeah. output-pgsql.c#L1238 No way to suppress the skipping NOTICE output at this line? How annoying

comment:3 Changed 8 years ago by jburgess777@…

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.

comment:4 Changed 4 years ago by pnorman

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.