Re: BUG #1580: pg_dumpall aborts when cwd is unreadable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: David Elliott <elliott(at)stcnet(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1580: pg_dumpall aborts when cwd is unreadable
Date: 2005-04-11 06:07:46
Message-ID: 22121.1113199666@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> The code right now tests for 'cwd' first and just errors out if it can't
> find it. Is it worth refactoring it so you can run pg_dumpall from a
> directory you can't view? Instead of checking 'cwd' right at the start
> we would have to find it only when we need it, and in several places or
> in a function call. It doesn't seem worth it to me.

... and it would *still* fail if you tried to call pg_dumpall via a
symlink or relative path. Unless someone knows a portable way to
resolve symlinks without doing a chdir first, I think there's no
way to avoid the surprise factor.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Diego Cattelan 2005-04-11 06:21:45 Re: BUG #1547: CREATE TYPE AS error
Previous Message Tom Lane 2005-04-11 06:03:37 Re: BUG #1577: round(dp) function does not round to nearest integer properly