Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> >> Seems that my problem is a little bit different.
> >> only the following commands
> >> kill the backend, i.e.:
> >>
> >>    - DELETE
> >>    - 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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group