New answers tagged osm2pgsql
You can have a closer look at tools like osmosis or even better, faster, easier and smaller: osmfilter Read instructions in the OSM wiki how to filter data types like nodes, ways or relations, by key or by value. Maybe you can get a result file that can be imported in any database much faster.
Found it: osmosis --read-pbf south-america-latest.osm.pbf --tag-filter accept-nodes seamark:type=* --write-xml seamarks.osm
Top 50 recent answers are included