Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped
Дата
Msg-id 16792.1765258920@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped  (tushar <tushar.ahuja@enterprisedb.com>)
Ответы Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped
Список pgsql-hackers
tushar <tushar.ahuja@enterprisedb.com> writes:
> So this query is a failed query and now if i give 'postgres' instead of
> 'abc123', Am I not supposed to get the same error , instead of
> pg_dump overwriting the postgres executable.

No.  You are supposed to be someone who knows better --- and if you
don't, you should not be running with write privileges on those
files.  pg_dump has absolutely no way to know that that particular
output file is something important.  Even if we tried to put that
knowledge into it, there are tiny variations of this case that
would still break, such as

    ./pg_dump ... >postgres

or for that matter

    echo oops >postgres

There is no point in trying to prevent pg_dump from overwriting a
postgres executable when there are thousands of other ways to do
that, if you're foolish enough to not be more careful with file
permissions.

            regards, tom lane



В списке pgsql-hackers по дате отправления: