Re: [HACKERS] [PATCH] readlink missing nul-termination in pg_rewind

2015-05-28 Thread Michael Paquier
On Fri, May 29, 2015 at 1:46 AM, Tom Lane wrote: > Abhijit Menon-Sen writes: >> 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

Re: [HACKERS] [PATCH] readlink missing nul-termination in pg_rewind

2015-05-28 Thread Tom Lane
Abhijit Menon-Sen writes: > 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 latte

Re: [HACKERS] [PATCH] readlink missing nul-termination in pg_rewind

2015-05-28 Thread Tom Lane
Abhijit Menon-Sen writes: > 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.) There's more random inconsistency than just this. I think we should standardize on the coding exhibited at, eg, basebackup

[HACKERS] [PATCH] readlink missing nul-termination in pg_rewind

2015-05-28 Thread Abhijit Menon-Sen
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), an