Thread

  1. dbcorruption

    Radhesh Mohandas <rod@arl.wustl.edu> — 2000-01-28T18:44:38Z

    If PostgreSQL failed to compile on your computer or you found a bug that
    is likely to be specific to one platform then please fill out this form
    and e-mail it to pgsql-ports@postgresql.org.
    
    To report any other bug, fill out the form below and e-mail it to
    
    If you not only found the problem but solved it and generated a patch
    then e-mail it to pgsql-patches@postgresql.org instead.  Please use the
    command "diff -c" to generate the patch.
    
    You may also enter a bug report at http://www.postgresql.org/ instead of
    e-mail-ing this form.
    
    ============================================================================
                            POSTGRESQL BUG REPORT TEMPLATE
    ============================================================================
    
    
    Your name		:	Radhesh Mohandas
    Your email address	:	rod@arl.wustl.edu
    
    
    System Configuration
    ---------------------
      Architecture (example: Intel Pentium)  	: Sun Sparc
    
      Operating System (example: Linux 2.0.26 ELF) 	: Solaris
    
      PostgreSQL version (example: PostgreSQL-6.5.3):   PostgreSQL-6.5.3 
    
      Compiler used (example:  gcc 2.8.0)		: gcc 2.95
    
    
    Please enter a FULL description of your problem:
    ------------------------------------------------
    The database is corrupted when I do the following
    
    I create a table using jdbc
    
    Open a transaction and delete the table
    Then I query select * from table and don't catch the SQLException
    The application exits
    and the database is now corrupt
    
    I can neither update the table, view it , recreate it or destroy it
    The table is visible when I connect to the database using psql and say \d
    Also I can see its structure using \dt but I can't see the contents using 
    select * .
    The following error is output
    
    db=> select * from keydb;
    ERROR:  mdopen: couldn't open keydb: No such file or directory
    db=>
    
    now If I try to create another table with the same name, the table exist !!
    db=> create table keydb ( something int);
    ERROR:  Relation 'keydb' already exists
    
    The following may be helpful
    
    db=> \d
    Database    = keydb
     +------------------+----------------------------------+----------+
     |  Owner           |             Relation             |   Type   |
     +------------------+----------------------------------+----------+
     | rod              | keydb                            | table    |
     +------------------+----------------------------------+----------+
    
    db=> \d keydb
    Table    = keydb
    +----------------------------------+----------------------------------+-------+
    |              Field               |              Type                | Length|
    +----------------------------------+----------------------------------+-------+
    | keyid                            | int4                             |     4 |
    | serial                           | int4                             |     4 |
    | packet                           | text                             |   var |
    | parent                           | int4                             |     4 |
    | type                             | char()                           |     1 |
    +----------------------------------+----------------------------------+-------+
    db=> insert into keydb values (1,1,"1",1,1);
    ERROR:  mdopen: couldn't open keydb: No such file or directory
    
    
    Please describe a way to repeat the problem.   Please try to provide a
    concise reproducible example, if at all possible: 
    ----------------------------------------------------------------------
    
    included above
    
    
    
    If you know how this problem might be fixed, list the solution below:
    ---------------------------------------------------------------------
    
    uncommited transactions should automatically be aborted when embeded sql 
    aplications are terminating
    
    
    
    Radhesh Mohandas  
    ****************************************************************************
    Residence:            	 #	Office:
    341,#B,Rosedale Ave.     #      Jolley 541, Computer Science Dept. 
    St.Louis,MO 63112        #      One Brookings Drive,Washington University,
                             #      St.Louis,MO - 63130.
    phone :  314-862-1418    #      314-935-7543
    ****************************************************************************
    		As Hungry as a WOLF - nop ??
    			As Hungry as a grad student - yep !
    ****************************************************************************