Re: [HACKERS] Re: Problem dropping databases

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it>
Cc: Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Re: Problem dropping databases
Date: 1998-09-25 14:40:13
Message-ID: 360BAB4D.F23825E1@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-09-25 14:50:08 Installation instructions
Previous Message The Hermit Hacker 1998-09-25 11:18:08 Re: [HACKERS] unfortunately...