Re: [HACKERS] Re: Problem dropping databases - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] Re: Problem dropping databases
Date
Msg-id 360BAB4D.F23825E1@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] Re: Problem dropping databases  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
List pgsql-hackers
> >> Seems that my problem is a little bit different.
> >> only the following commands
> >> kill the backend, i.e.:
> >>
> >>    - DELETE
> >>    - DROP DATABASE
> >>    - DROP USER
> >>    - LOCK TABLE
> I dont' think that I have Linux permission problems, I can create a
> new database but I can't destroy it, but I can remove the database
> directory.
>
> $ createdb jose
> $ destroydb jose
> PQexec() -- Request was sent to backend, but backend closed the
> channel before responding.
> $ rm -r /usr/local/pgsql/data/base/jose/
> Just guessing, seems this problem is connected with DELETE statement
> because every one of the incriminate commands use it:
> - DELETE:              itself
> - DROP DATABASE:       delete from pg_database where datname =
>                                                      'my_db';
> - DROP USER:           delete from pg_user where usename = 'my_name';
> - LOCK TABLE:          mydb=> lock cities;
>                        DELETE 0
> Any ideas?

No. The destroydb script uses several environment variables, but so does
the createdb script, which is not failing for you.

1) I might check the environment variables, just to be sure.
2) Run the backend with "-d99" and see if the debugging output gives you
a clue
3) Recompile the backend with "-g -O0" (includes symbols in the image)
and then try running your query through gdb. It is pretty easy (now that
Bruce showed me how :):
 $ gdb postgres
 (gdb) run -D<your data path>
 > drop database jose
 <segfault message>
 (gdb) where

This will show you the backtrace of where it is crashing.

Have you tried a clean install? It's a bit perplexing because we don't
get very many reports of this kind of trouble...

                    - Tom

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] unfortunately...
Next
From: "Thomas G. Lockhart"
Date:
Subject: Installation instructions