When is the MessageContext released?

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: When is the MessageContext released?
Date: 2019-02-27 06:08:47
Message-ID: CAKU4AWqTSs46HULxuWSq4rrAWYkjSqES3DtAQfssqx2xPCtUeQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi :
I run a query like "select * from t" and set the break like this:

break exec_simple_query
break MemoryContextDelete
commands
p context->name
c
end

I can see most of the MemoryContext is relased, but never MessageContext,
when will it be released?

/*
* Create the memory context we will use in the main loop.
*
* MessageContext is reset once per iteration of the main loop, ie, upon
* completion of processing of each command message from the client.
*/

I'm hacking the code with the latest commit.
https://github.com/postgres/postgres/commit/414a9d3cf34c7aff1c63533df4c40ebb63bd0840

Thanks!

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2019-02-27 06:14:16 Re: NOT IN subquery optimization
Previous Message Markus Winand 2019-02-27 05:50:08 Re: Index INCLUDE vs. Bitmap Index Scan