update portal-related memory context names and API

Started by Peter Eisentrautalmost 9 years ago4 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t37900
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 27, 2026 at 09:34 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t37900_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t37900_1 && git checkout t37900_1

Patchset v1 (message #1) is on t37900_1

Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

ISTM that some of the portal-related memory context naming is a bit
antiquated and at odds with current terminology. In this patch, I
propose to rename PortalMemory to TopPortalContext and rename
Portal->heap to Portal->portalContext, and then clean up some
surrounding APIs.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

t37900_1
0001-Update-portal-related-memory-context-names-and-API.patchtext/plain; charset=UTF-8; name=0001-Update-portal-related-memory-context-names-and-API.patch; x-mac-creator=0; x-mac-type=0Download+35-37
0002-Remove-PortalGetQueryDesc.patchtext/plain; charset=UTF-8; name=0002-Remove-PortalGetQueryDesc.patch; x-mac-creator=0; x-mac-type=0Download+5-11
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#1)
Re: update portal-related memory context names and API

On 12/19/2017 12:31 PM, Peter Eisentraut wrote:

ISTM that some of the portal-related memory context naming is a bit
antiquated and at odds with current terminology. In this patch, I
propose to rename PortalMemory to TopPortalContext and rename
Portal->heap to Portal->portalContext, and then clean up some
surrounding APIs.

Seems reasonable - 100% cosmetic AFAICT. Marking ready for committer.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Peter Eisentraut (#1)
Re: update portal-related memory context names and API

Peter Eisentraut wrote:

Subject: [PATCH 1/2] 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.

This one looks good to me. I was long confused by that "heap"
terminology.

Subject: [PATCH 2/2] Remove PortalGetQueryDesc()

After having gotten rid of PortalGetHeapMemory(), there seems little
reason to keep one Portal access macro around that offers no actual
abstraction and isn't consistently used anyway.

This macro does look quite pointless.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#2)
Re: update portal-related memory context names and API

On 1/8/18 15:30, Andrew Dunstan wrote:

On 12/19/2017 12:31 PM, Peter Eisentraut wrote:

ISTM that some of the portal-related memory context naming is a bit
antiquated and at odds with current terminology. In this patch, I
propose to rename PortalMemory to TopPortalContext and rename
Portal->heap to Portal->portalContext, and then clean up some
surrounding APIs.

Seems reasonable - 100% cosmetic AFAICT. Marking ready for committer.

committed

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services