Extracting land areas and borders

Hello,

I want to create a PostGIS database using OSM data, but am only interested in maritime related information.
Therefore, when it comes to land related information i am only interested in the land area itself, together with country borders.

How can i extract only land area and/or water area, and country borders from, for example, the planet.osm file?

I am familiar with the use of osm2pgsql and osmfilter, but have not managed to filter in agood way.

(I am also aware of shapefiles for land/water polygons can be found on http://openstreetmapdata.com/data/land-polygons, but am looking for other possibilities)

Thanks in advance!

your error report ist too vague that we can give more hints, I fear.

Please tell us in detail about your filter parameters, your source file, and why the result is not good for you.