Re: [BUGS] NOTICE:AbortTransaction and not in in-progress state

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>, t-ishii(at)sra(dot)co(dot)jp, hackers(at)postgreSQL(dot)org
Subject: Re: [BUGS] NOTICE:AbortTransaction and not in in-progress state
Date: 1998-06-13 06:18:05
Message-ID: 3582199D.1EEDB546@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Varga 1998-06-13 07:08:38 my strftime func doesn't work. please help.
Previous Message Bruce Momjian 1998-06-13 05:32:57 Re: [HACKERS] Re: Odd behavior in regression test?