Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped
Date
Msg-id 16792.1765258920@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped  (tushar <tushar.ahuja@enterprisedb.com>)
Responses Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped
List 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 by date:

Previous
From: Peter Smith
Date:
Subject: Re: [WIP]Vertical Clustered Index (columnar store extension) - take2
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: schema variables