Configuration parameter

block_size — PostgreSQL configuration parameter

Category Preset Options Default 8192 bytes

Reports the size of a disk block.

At a glance

Property Value
Parameter block_size
Category Preset Options
Default 8192
Value type integer
Change scope Per-session (SET)
Available in PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12)

What it does

Reports the size of a disk block. It is determined by the value of BLCKSZ when building the server. The default value is 8192 bytes. The meaning of some configuration variables (such as shared_buffers) is influenced by block_size. See runtime_config_resource for information.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.

Inspect the current value and source with SHOW block_size; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'block_size';.

Tuning guidance

This is a preset, read-only parameter: it reports a value fixed when PostgreSQL was built or the cluster was initialized, and cannot be tuned at runtime. Read it to verify the server’s build or cluster configuration (for example when matching a replica or debugging a compatibility issue); there is no setting to adjust.

Reference

PostgreSQL documentation — block_size.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters