Re: [BUGS] NOTICE:AbortTransaction and not in in-progress state
От | Vadim Mikheev |
---|---|
Тема | Re: [BUGS] NOTICE:AbortTransaction and not in in-progress state |
Дата | |
Msg-id | 3582199D.1EEDB546@krs.ru обсуждение исходный текст |
Ответ на | Re: [BUGS] NOTICE:AbortTransaction and not in in-progress state (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [BUGS] NOTICE:AbortTransaction and not in in-progress state
|
Список | pgsql-hackers |
Bruce Momjian wrote: > > > > QUERY: drop table test; > > > WARN:Relation test Does Not Exist! > > > QUERY: create table test (i int4); > > > QUERY: create index iindex on test using btree(i); > > > QUERY: begin; > > > QUERY: insert into test values (100); There will be dirty heap & index buffers in the pool after insertion ... > > > QUERY: select * from test; > > > i > > > --- > > > 100 > > > (1 row) > > > > > > QUERY: rollback; They are still marked as dirty... > > > QUERY: drop table test; heap_destroy_with_catalog () calls ReleaseRelationBuffers: * this function unmarks all the dirty pages of a relation * in the buffer pool so that at the end of transaction * these pages will not be flushed. before unlinking relation, BUT index_destroy() unlinks index and DOESN'T call this func ... > > > NOTICE:AbortTransaction and not in in-progress state > > > NOTICE:AbortTransaction and not in in-progress state COMMIT (of drop table) tries to flush all dirty buffers from pool but there is no index file any more ... > ERROR: cannot write block 1 of iindex [test] blind smgrblindwrt () fails. > NOTICE: AbortTransaction and not in in-progress state > NOTICE: EndTransactionBlock and not inprogress/abort state ...transaction state is IN_COMMIT... Seems that ReleaseRelationBuffers() should be called by index_destroy() ... Note that heap_destroy() also calls /* ok - flush the relation from the relcache */ RelationForgetRelation(rid); at the end... Vadim
В списке pgsql-hackers по дате отправления: