Skip to content

storagePillar 1 — Semantic storage

RDF storage in PostgreSQL. Turtle goes in; dictionary-encoded, hexastore-indexed, LIST-partitioned quads come out — addressable from any Postgres client.

v0.6 headline — the native staged bulk loader

v0.6 adds a native, multi-backend staged bulk loader — a background-worker pipeline that commits per phase (STAGE → DICT → RESOLVE → INDEX) and is resumable on failure. It loads the full 8.2-billion-triple Wikidata truthy graph into a single PostgreSQL instance, dictionary-encoded with a complete SPO/POS/OSP hexastore, and self-tunes down to ordinary hardware so the same load works out-of-the-box on stock PostgreSQL.

Features in this pillar

At a glance

sql
-- One-time
CREATE EXTENSION pgrdf;
SELECT pgrdf.add_graph(100);

-- Load
SELECT pgrdf.load_turtle('/fixtures/foaf.ttl', 100);
--  → 631

-- Inspect
SELECT pgrdf.count_quads(100);
SELECT * FROM pgrdf._pgrdf_dictionary
 WHERE term_type = 1 LIMIT 5;

Next — Load Turtle from disk →

auto_storiesTraining

A recommended path through Pillar 1 — read in this order and each page builds on the previous one:

Learn more

  • info Refresh on RDF foundations with the RDF 1.1 Primer.
  • description The RDF 1.1 Turtle spec — what parse_turtle is implementing.
  • code Postgres internals — partitioning chapter of the PG manual.

MIT licensed. Documentation for pgRDF — built with VitePress, served via GitHub Pages.