Re: Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Stephen Woodbridge <woodbri(at)swoodbridge(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"
Date: 2013-04-20 21:00:32
Message-ID: 20130420210032.GA24915@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-04-20 16:32:36 -0400, Stephen Woodbridge wrote:
> Hi all,
>
> I have been writing pg extensions for a while but I just ran into a problem
> that has me stumped.
>
> I have code for a SRF and it works fine on pg 9.2.2 on linux, but fails with
> am error in the logfile.
>
> TRAP: FailedAssertion("!(context != CurrentMemoryContext)", File: "mcxt.c",
> Line: 172)

This means that the current memory context is being deleted. Are you
doing that or did you maybe MemoryContextSwitchTo to some context but
not back?

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Woodbridge 2013-04-21 00:21:01 Re: Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"
Previous Message Stephen Woodbridge 2013-04-20 20:32:36 Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"