Re: BUG #1580: pg_dumpall aborts when cwd is unreadable - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1580: pg_dumpall aborts when cwd is unreadable
Date
Msg-id 22121.1113199666@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1580: pg_dumpall aborts when cwd is unreadable  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-bugs
Bruce Momjian <pgman@candle.pha.pa.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1577: round(dp) function does not round to nearest integer properly
Next
From: Diego Cattelan
Date:
Subject: Re: BUG #1547: CREATE TYPE AS error