Thanks for the reply; glad it looks like a probable bug with a straightforward fix.
FWIW, here's a discussion from last year that looks like people hitting the same problem. Same mysterious EINVAL logged opening a file, on Macs. No conclusion in that discussion. http://comments.gmane.org/gmane.comp.db.postgresql.general/162465