Hi,

Howabout using Spatialite instead of PostGIS? It is only one file which contains both the data and the database. Spatialite seems to have function for calculating distance (http://www.gaia-gis.it/spatialite-2.4.0/spatialite-sql-2.4.html)
and therefore I suppose that this PostGIS recipe could be used with Spatialite as well (http://www.bostongis.com/?content_name=postgis_nearest_neighbor).
I played a bit with Spatialite and OSM data about a year ago and I wrote also a short tutorial then. It is still online at
http://sourceforge.net/apps/mediawiki/jump-pilot/index.php?title=OpenJUMP_with_SpatialLite