Well like most things in the world of cg it's one of those things were there's no definitive number.
Main factors are:
How far will it realistically be viewed (not many people are going to get really close to a 3x4m image)
^Though this can be untrue if the next factor comes to play which is the level of detail. If the image contains a lot of texture or distance detail then you'll want a larger output file
What medium is it going to be printed on
What you could do is render an area out at different resolutions, then set them out on a document to resemble the scale they'll be, then print that on A4/3 and see the quality.
Photoshop and an online print size calculator both say it should be 35433 x 47244px for a 300dpi print