Re: Handling memory contexts in aggregate function invoking other built-in aggregate functions - Mailing list pgsql-general

From Matt Magoffin
Subject Re: Handling memory contexts in aggregate function invoking other built-in aggregate functions
Date
Msg-id A49268B1-0ED2-48D8-98C1-6619AC825B95@msqr.us
Whole thread Raw
In response to Re: Handling memory contexts in aggregate function invoking other built-in aggregate functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 5/12/2021, at 9:04 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
So that probably means that you weren't careful about allocating your
own state data in the long-lived context (agg_context), and so it
got freed between calls.

It turns out I wasn’t careful about setting isnull on the passed in state argument. After I fixed that [1] everything appears to be running smoothly!

— m@

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: libpq: Which functions may hang due to network issues?
Next
From: Dilip Kumar
Date:
Subject: Re: Max connections reached without max connections reached