Обсуждение: Re: Bug#43221: postgresql: When disk is full, insert corrupts indices
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 thedisk was full, the >insert failed with a NOTICE: transaction abort and not in progress >error. Stopping and startingthe 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 indicesand 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 1999i68 >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 ID32B8FAA1 ======================================== "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
Re: [HACKERS] Re: Bug#43221: postgresql: When disk is full, insert corrupts indices
От
Vadim Mikheev
Дата:
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
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
Re: [HACKERS] Re: Bug#43221: postgresql: When disk is full, insert corrupts indices
От
Vadim Mikheev
Дата:
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...