This is just something I noticed in passing. (I did a quick check of all
the other uses of readlink in the source, and they do get this right.)
-- Abhijit
P.S. Also in passing, I note that pg_rewind will follow links under any
directory anywhere named pg_tblspc (which probably doesn't matter), and
does not follow pg_xlog if it's a symlink (which probably does). If you
want, I can submit a trivial patch for the latter.