Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: tushar <tushar.ahuja@enterprisedb.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-12-09T05:42:00Z
Lists: 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