Skip to main content

What are temp buffers and how do they differ from shared buffers?

Senior PostgreSQL
Quick Answer Temp buffers are session-local buffers for temporary tables (SET temp_buffers). Unlike shared_buffers (shared across all connections), temp buffers are private to each session. Default is 8MB per session. Increase if your session creates large temp tables. Shared buffers are allocated at startup from shared memory; temp buffers are allocated per session on demand from the session's heap.

Answer

Temp buffers store session-local temporary table data and bypass shared buffers, affecting performance based on temp_buffers.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice