Re: Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)" - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"
Date
Msg-id 20130420210032.GA24915@awork2.anarazel.de
Whole thread Raw
In response to Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"  (Stephen Woodbridge <woodbri@swoodbridge.com>)
Responses Re: Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"
List 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



pgsql-hackers by date:

Previous
From: Stephen Woodbridge
Date:
Subject: Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"
Next
From: Stephen Woodbridge
Date:
Subject: Re: Need help with TRAP: FailedAssertion("!(context != CurrentMemoryContext)"