camm@enhanced.com wrote:
  >Package: postgresql
  >Version: 6.5.1-6
  
I'm forwarding this to the hackers list, because it presumably is an issue
to be addressed in the code for rolling back an aborted transaction.  I
suppose that there is nothing there to handle the case that the index file
runs out of diskspace and that therefore the index became corrupt.

Mind you, I'm just guessing!

  >I tried inserting a record into the table 'rolo' described below.  Rolo
  >had two indices, also described below.  When the disk was full, the 
  >insert failed with a NOTICE: transaction abort and not in progress
  >error.  Stopping and starting the postmaster, clearing the disk, and
  >repeating then gave, alternately, a 'cannot insert duplicate' error (the
  >insert was not a duplicate) and a 'rolo_pkey is not a btree' error (which
  >it was, to start with).  Dropping both indices and rebuilding them restored
  >functionality.
  >
  >Here are the relevant table/index definitions:

There was nothing at all out of the ordinary about them: I think they are not
likely to be relevant to the problem.

  >
  >-- System Information
  >Debian Release: 2.1
  >Kernel Version: Linux intech19 2.2.7 #1 SMP Thu May 27 11:53:43 EDT 1999 i68
      >6 unknown
  >
  >Versions of the packages postgresql depends on:
  >ii  libc6           2.0.7.19981211 GNU C Library: shared libraries
  >ii  libc6           2.0.7.19981211 GNU C Library: shared libraries
  >ii  libncurses4     4.2-3          Shared libraries for terminal handling
  >ii  libpgsql2       6.5.1-6        Shared library libpq.so.2 for PostgreSQL
  >ii  debianutils     1.10           Miscellaneous utilities specific to Debia
      >n.
 

-- 
      Vote against SPAM: http://www.politik-digital.de/spam/
                 ========================================
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "But I would not have you to be ignorant, brethren, 
      concerning them which are asleep, that ye sorrow not, 
      even as others which have no hope. For if we believe 
      that Jesus died and rose again, even so them also 
      which sleep in Jesus will God bring with him."        
                                I Thessalonians 4:13,14 



Fri, 20 Aug 1999 06:08:50 +0100
"Oliver Elphick" <olly@lfix.co.uk>
Re: Bug#43221: postgresql: When disk is full, insert corrupts indices
Oliver Elphick wrote:
> 
> camm@enhanced.com wrote:
>   >Package: postgresql
>   >Version: 6.5.1-6
> 
> I'm forwarding this to the hackers list, because it presumably is an issue
> to be addressed in the code for rolling back an aborted transaction.  I
> suppose that there is nothing there to handle the case that the index file
> runs out of diskspace and that therefore the index became corrupt.

Whenever index insert fails (for _any_ reason) index may be
corrupted. I hope to address this with WAL...

Vadim

Fri, 20 Aug 1999 13:37:05 +0800
Vadim Mikheev <vadim@krs.ru>
Re: [HACKERS] Re: Bug#43221: postgresql: When disk is full, insert
	corrupts indices
Vadim Mikheev <vadim@krs.ru> writes:
> Whenever index insert fails (for _any_ reason) index may be
                               ^^^^^^^^^^^^^^^^
> corrupted. I hope to address this with WAL...

One certainly hopes that's not true in the case of "cannot insert
duplicate key into a unique index" failures !?

			regards, tom lane

Fri, 20 Aug 1999 09:21:31 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: Bug#43221: postgresql: When disk is full,
	insert corrupts indices
Tom Lane wrote:
> 
> Vadim Mikheev <vadim@krs.ru> writes:
> > Whenever index insert fails (for _any_ reason) index may be
>                                ^^^^^^^^^^^^^^^^
> > corrupted. I hope to address this with WAL...
> 
> One certainly hopes that's not true in the case of "cannot insert
> duplicate key into a unique index" failures !?

Oh, I meant cases when child btree page is splitted but
parent page is not updated, sorry.

BTW, duplicate check is made _before_ insertion...

Vadim
P.S. I'm on vacation till Aug 30...

Mon, 23 Aug 1999 19:12:58 +0800
Vadim Mikheev <vadim@krs.ru>
Re: [HACKERS] Re: Bug#43221: postgresql: When disk is full, insert
	corrupts indices