I was working on docs and notice that Postgres no longer responds with a
warning if a database is dropped multiple times:

postgres=> drop database yahoo;
DESTROYDB
postgres=> drop database yahoo;
DESTROYDB
postgres=> \c yahoo
connecting to new database: yahoo
FATAL 1:  Database 'yahoo' does not exist.
golem$ psql
postgres=> drop database yahoo;
DESTROYDB

The destroydb command behaves similarly. The behavior documented by
Jose' was:

postgres=> drop database yahoo;
DESTROYDB
postgres=> drop database yahoo;
WARN: destroydb: database "yahoo" does not exist.

Bruce, this should probably go on the open issues list and be fixed for
v6.4...

                        - Tom

Tue, 22 Sep 1998 13:46:33 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Problem dropping databases
> I was working on docs and notice that Postgres no longer responds with 
> a warning if a database is dropped multiple times: 
> Bruce, this should probably go on the open issues list and be fixed 
> for v6.4...

Oops. There isn't a problem. I had left a line of diagnostic code in the
backend, and it turns out to have been important :*(

Sorry for the false alarm...

                  - Tom

Tue, 22 Sep 1998 16:20:37 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Problem dropping databases
> I was working on docs and notice that Postgres no longer responds with a
> warning if a database is dropped multiple times:
> 
> postgres=> drop database yahoo;
> DESTROYDB
> postgres=> drop database yahoo;
> DESTROYDB
> postgres=> \c yahoo
> connecting to new database: yahoo
> FATAL 1:  Database 'yahoo' does not exist.
> golem$ psql
> postgres=> drop database yahoo;
> DESTROYDB
> 
> The destroydb command behaves similarly. The behavior documented by
> Jose' was:
> 
> postgres=> drop database yahoo;
> DESTROYDB
> postgres=> drop database yahoo;
> WARN: destroydb: database "yahoo" does not exist.
> 
> Bruce, this should probably go on the open issues list and be fixed for
> v6.4...

Yep.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
http://www.op.net/~candle              |  (610) 353-9879(w)
  +  If your life is a hard drive,     |  (610) 853-3000(h)
  +  Christ can be your backup.        |

Tue, 22 Sep 1998 15:43:05 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: Problem dropping databases
Hello Bruce,

martedï¿½, 22 settembre 98, you wrote:

>> I was working on docs and notice that Postgres no longer responds with a
>> warning if a database is dropped multiple times:
>> 
>> postgres=> drop database yahoo;
>> DESTROYDB
>> postgres=> drop database yahoo;
>> DESTROYDB
>> postgres=> \c yahoo
>> connecting to new database: yahoo
>> FATAL 1:  Database 'yahoo' does not exist.
>> golem$ psql
>> postgres=> drop database yahoo;
>> DESTROYDB
>> 
>> The destroydb command behaves similarly. The behavior documented by
>> Jose' was:

Sorry for interference, I'm Jose'.
Seems that my problem is a little bit different. I've tried almost all
PostgreSQL commands and the result is that only the following commands
kill the backend, i.e.:

   - DELETE
   - DROP DATABASE
   - DROP USER
   - LOCK TABLE

PQexec() -- Request was sent to backend, but backend closed the channel before
responding.
        This probably means the backend terminated abnormally before or while
processing the request.

-------------------------------------------------------------
I tried also with success the following commands:

alter table
alter user
begin
copy
create aggregate
create database
create function
create index
create language
create operator
create sequence
create table
create trigger
create type
create user
create view
declare
drop aggregate
drop function
drop index
drop language
drop operator
drop sequence
drop table
drop trigger
drop type
drop view
fetch
grant
insert
move
revoke
rollback
select
update
vacuum
---------------------------------------------
Any ideas ?

 Jose'              



Thu, 24 Sep 1998 14:35:52 +0200
Sferacarta Software <sferac@bo.nettuno.it>
Re: [HACKERS] Re: Problem dropping databases
> >> I was working on docs and notice that Postgres no longer responds 
> >> with a warning if a database is dropped multiple times:
> Sorry for interference, I'm Jose'.
> Seems that my problem is a little bit different.

I hope so :) My problem was entirely my fault; I'd left some debugging
code in the backend which affected most queries...

> only the following commands
> kill the backend, i.e.:
> 
>    - DELETE
>    - DROP DATABASE
>    - DROP USER
>    - LOCK TABLE
> Any ideas ?

Just guessing: is there an underlying (Unix) permissions problem with
the existing tables? That doesn't seem to fit exactly with the symptoms
though.

                      - Tom

Thu, 24 Sep 1998 14:17:27 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Re: Problem dropping databases
> >> 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

Fri, 25 Sep 1998 14:40:13 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Re: Problem dropping databases