The database name is specified in the stylesheet (the XML file) that you give to renderd which tells it how to render the data. Each layer listed in the stylesheet details the source of the data for that layer, which in the case of a postgis layer, includes the database name.
There is no need to renderd
to "contact mapnik" because renderd is linked against mapnik, so it just calls functions in libmapnik
to ask mapnik to do things.
As to your specific problem, either renderd
is not running or you have not configured it to listen on the right socket, or have not told render_list
to connect to the right socket.