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

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped
Date: 2025-12-09 05:32:51
Message-ID: CAC6VRoYkZo706vamN41No1P6XsC2qC_fiSXH0ZMr0zrN80rZnA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 8, 2025 at 11:50 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> writes:
> > I found a scenario where, after firing the wrong way of using the
> pg_dump
> > command, not only server fail to start,
> > But later, I am not able to perform initdb/pg_ctl as well
>
> > The result is :
> > edb(at)1a1c15437e7c bin]$ ./pg_dump -Ft -s -c -v -f postgres
> schema_clean.tar1
> > qemu: uncaught target signal 7 (Bus error) - core dumped
>
> I think what you are showing here is that you ran this command in the
> installation's bin directory, and where you write "-f postgres",
> that caused pg_dump to overwrite the postgres executable.
>
> > Is there any way we can generate some error messages?
>
> Don't do that. Generally speaking, you don't want installed files to
> be writable at all by ordinary user accounts ... but if they are,
> for heaven's sake don't cd into those directories before doing work.
> You're just setting yourself up for trouble.
>
> right, that was unintentional 😊, Instead of "postgres", if i give any
other name , i am getting an error e,g

[edb(at)1a1c15437e7c bin]$ ./pg_dump -Ft -s -c -v -f abc123
schema_clean.tar1
pg_dump: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed:
FATAL: database "schema_clean.tar1" does not exist

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.

regards,

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-12-09 05:33:20 Re: add some errhint for regexp* functions.
Previous Message Chao Li 2025-12-09 05:23:56 Re: [Proposal] Adding callback support for custom statistics kinds