mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Update portal-related memory context names and API
Rename PortalMemory to TopPortalContext, to avoid confusion with PortalContext and align naming with similar top-level memory contexts. Rename PortalData's "heap" field to portalContext. The "heap" naming seems quite antiquated and confusing. Also get rid of the PortalGetHeapMemory() macro and access the field directly, which we do for other portal fields, so this abstraction doesn't buy anything. Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
This commit is contained in:
@ -1608,7 +1608,7 @@ exec_bind_message(StringInfo input_message)
|
||||
* don't want a failure to occur between GetCachedPlan and
|
||||
* PortalDefineQuery; that would result in leaking our plancache refcount.
|
||||
*/
|
||||
oldContext = MemoryContextSwitchTo(PortalGetHeapMemory(portal));
|
||||
oldContext = MemoryContextSwitchTo(portal->portalContext);
|
||||
|
||||
/* Copy the plan's query string into the portal */
|
||||
query_string = pstrdup(psrc->query_string);
|
||||
|
Reference in New Issue
Block a user