← All notes

PostgreSQL table partitioning

Short answer

Partitioning splits one logical table into smaller physical pieces. Queries can skip irrelevant partitions; bulk load and delete can add or drop whole partitions. [S1]

Sketch

CREATE TABLE measurement (
  logdate date not null, peaktemp int
) PARTITION BY RANGE (logdate);

Points

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).

Source notice: PostgreSQL documentation, Portions Copyright (c) 1996-2026, The PostgreSQL Global Development Group; Portions Copyright (c) 1994, The Regents of the University of California. Used under the PostgreSQL License (https://www.postgresql.org/about/licence/).

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: PostgreSQL Global Development Group, PostgreSQL: Documentation: 18: 5.12. Table Partitioning, PostgreSQL License; PostgreSQL Global Development Group, CREATE TABLE, PostgreSQL License.

Cite this

Permanent ID: iil:note:shrgk9e7

iinventedlight. 2026. "PostgreSQL table partitioning: when and which kind." iinventedlight Library, iil:note:shrgk9e7, version of 2026-11-04. https://iinventedlight.com/library/notes/postgres-partitioning/. License: CC-BY-4.0.

@misc{iil_note_shrgk9e7,
  author = {{iinventedlight}},
  title = {{PostgreSQL table partitioning: when and which kind}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-04},
  url = {https://iinventedlight.com/library/notes/postgres-partitioning/},
  note = {Permanent ID iil:note:shrgk9e7. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/postgres-partitioning.md.