Glossary — in plain language

Portal

Also called: execution portal, cursor

In plain English

A portal is the container that holds the state of a query while it runs: its plan, its position in the result, and the memory it uses. When you open a cursor, you are creating a portal you can fetch from a few rows at a time.

Why it matters

Portals are how PostgreSQL streams results without materializing everything at once, and how the extended protocol’s “execute” step is implemented. Understanding them demystifies cursors, FETCH, and why a held cursor keeps resources alive.

Was this helpful?

← Browse the full glossary