Re: pgsql: Assert(IsTransactionState()) in RelationIdGetRelation().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Assert(IsTransactionState()) in RelationIdGetRelation().
Date: 2014-02-11 19:45:00
Message-ID: 27338.1392147900@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-02-06 16:28:23 +0000, Tom Lane wrote:
>> Assert(IsTransactionState()) in RelationIdGetRelation().

> Hm, I am not sure if it works this way. In a patched postgres I just
> got:
> #2 0x00000000008b4b27 in ExceptionalCondition (conditionName=0xa90a78 "!(IsTransactionState())", errorType=0xa90708 "FailedAssertion",
> fileName=0xa905c8 "/home/andres/src/postgresql/src/backend/utils/cache/relcache.c", lineNumber=1622)
> at /home/andres/src/postgresql/src/backend/utils/error/assert.c:54
> #3 0x00000000008a3fd6 in RelationIdGetRelation (relationId=1259) at /home/andres/src/postgresql/src/backend/utils/cache/relcache.c:1622
> #4 0x00000000004a25ea in relation_open (relationId=1259, lockmode=1) at /home/andres/src/postgresql/src/backend/access/heap/heapam.c:1038
> #5 0x00000000004a2898 in heap_open (relationId=1259, lockmode=1) at /home/andres/src/postgresql/src/backend/access/heap/heapam.c:1201
> #6 0x00000000008a10ba in ScanPgRelation (targetRelId=2693, indexOK=1 '\001', suspend_snap=1 '\001')
> at /home/andres/src/postgresql/src/backend/utils/cache/relcache.c:308
> #7 0x00000000008a268c in RelationInitPhysicalAddr (relation=0x7fac2a842658)
> at /home/andres/src/postgresql/src/backend/utils/cache/relcache.c:1019

Um ... what is RelationInitPhysicalAddr doing calling ScanPgRelation?
That function shouldn't be doing any new catalog access.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-02-11 20:15:26 Re: pgsql: Assert(IsTransactionState()) in RelationIdGetRelation().
Previous Message Andres Freund 2014-02-11 19:39:43 Re: pgsql: Assert(IsTransactionState()) in RelationIdGetRelation().