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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: [PATCH] readlink missing nul-termination in pg_rewind
Date: 2015-05-28 16:46:56
Message-ID: 18909.1432831616@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> 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 latter.

As far as that goes, I think it does look at the whole parentpath, which
means it would not be fooled by sub-subdirectories named pg_tblspc.
A bigger problem is that whoever coded this forgot that parentpath could
be null, which I blame on the lack of an API specification for the
function.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-05-28 17:04:40 Re: fsync-pgdata-on-recovery tries to write to more files than previously
Previous Message Devrim GÜNDÜZ 2015-05-28 16:34:59 Re: rhel6 rpm file locations