Skip to content

Tags: styk-tv/pgRDF

Tags

v0.6.27

Toggle v0.6.27's commit message
v0.6.27 — configuration fail-closed, edition 2024, oracle strictness

Toolchain currency and the wave's fail-closed doctrine applied to
configuration. No catalog change — the upgrade bridge is a deliberate no-op
(the v0.5.25 precedent); everything this release carries lives in the library.

CHANGED

* Three GUCs are native enum GUCs (#71): pgrdf.ingest_dict_path,
  pgrdf.on_path_truncation, pgrdf.staged_resolve_strategy. An unrecognised
  value is REFUSED AT SET by PostgreSQL itself, naming the valid values.
  Previously a typo was accepted silently and each reader fell back to a
  default — set wrong, run different, no error anywhere. Valid values and
  defaults are unchanged; RESET restores the documented default.
  Calling-contract note: a script relying on an invalid SET being silently
  defaulted now errors at the SET.

* Edition 2021 -> 2024, resolver "3" (#72). pgrx 0.17+ migrated and 0.19
  restated it; staying on 2021 was drift, not breakage. Mechanical
  migration, no behaviour delta.

* Differential oracle: numeric folding is family-scoped (#62, harness-only).
  "2" vs "2.0" now diverges — integer vs fractional is a datatype
  distinction the independent judge exists to catch — while "1.0E1" vs
  "10.0" still folds (the documented false-divergence noise). Lock fixtures
  added; the test that blessed cross-family folding now asserts the
  divergence.

UPGRADING

  ALTER EXTENSION pgrdf UPDATE;   -- moves extversion; the bridge is a no-op

DELIBERATELY NOT HERE

so it ships alone with a green dual-arch gate, per the discipline held since
the v0.6.21 burn.

VERIFIED

  cargo fmt --check                                     clean
  cargo clippy --features pg18 (edition 2024)           -D warnings, clean
  cargo pgrx test --features pg18 pg18                  356 passed, 0 failed
  oracle harness                                        38 green
  regression                                            green (130/133 migrated
                                                        to pin the SET refusal)
  scripts/pre-tag-check.sh 0.6.27                       14/14 on the merge commit

v0.6.26

Toggle v0.6.26's commit message
v0.6.26 — the verification cut

Three defects the v3.11 wave surfaced in pgRDF's own verification story,
shipped together because each changes what a verifier can trust.

ADDED

* pgrdf.graph_integrity(graph_id) (#104) — one read-only call reporting
  type-illegal terms per position (a Literal or BlankNode stored as a
  predicate, a Literal as a subject) and dangling ids (quads referencing no
  dictionary row), with a single `clean` boolean a monitor can alarm on.
  The witness that forced it: a graph carried 592 literal-predicates for
  weeks — written under a since-fixed cache defect — and the diagnosis took
  a raw forensic session. This function is that session as one call.
  Refuses an unknown graph id rather than reporting a clean audit of
  nothing. Runs with the caller's privileges.

CHANGED

* Strict validate refusals now RAISE (#103). The in-band
  {"conforms": null, "error": ...} was fail-open at the call site:
  NOT (conforms)::bool over null is NULL, which WHERE drops. Every
  non-verdict under strict now raises — vacuous shapes graph, unenforced
  constraint component, and the engine-failure paths. strict => false
  keeps the in-band report-and-continue contract, unchanged. Callers that
  parsed the in-band refusal must catch the error instead.

* validate(g, g) warns on self-validation (#102), in the log and as a
  "warnings" array in the report. sh:target* over a common predicate
  selects the shape declarations too, and their violations present as
  data defects — that exact misreading produced a wrong cross-repo
  diagnosis. Still legal: metamodel validation is a real use.

UPGRADING

  ALTER EXTENSION pgrdf UPDATE;

sql/pgrdf--0.6.25--0.6.26.sql ships with the release; the 0.5.1 direct
bridge carries the same delta. #103 is a calling-contract change under the
default strict — no catalog change, but catch the error where you parsed
the in-band refusal.

VERIFIED

  cargo fmt --check                                     clean
  cargo clippy --no-default-features --features pg18    -D warnings, clean
  cargo pgrx test --features pg18 pg18                  352 passed, 0 failed
  regression                                            green (70/122 migrated
                                                        to the raise contract)
  scripts/pre-tag-check.sh 0.6.26                       PASS on the merge commit

v0.6.25

Toggle v0.6.25's commit message
v0.6.25 — dictionary cache correctness, build identity, partition ACLs

Two independent defects behind one symptom — a term cached under one identity
being returned under another — plus the build identity needed to tell which
binary is answering, and a partition-permission fix that unblocks downstream
extensions composing over pgRDF graphs.

FIXED

* Shared-memory dictionary cache survived an extension lifetime (#88, #89).
  CREATE EXTENSION now bumps the cache generation, so a fresh install cannot
  read slots warmed before it.

* The cache was not scoped by database (#90, #91). The fingerprint hashed
  term_type, lexical value, datatype and language only, while the cache lives
  in postmaster shared memory and _pgrdf_dictionary is per-database. The same
  term in two databases shared one slot, and database B read database A's
  dict_id — writing quads referencing ids it did not own. The database OID now
  seeds both halves of the key. This needed no DROP EXTENSION: two databases on
  one instance were sufficient, and the generation counter never covered it.

* Per-graph partitions were unreadable by downstream definer rings (#96).
  PostgreSQL does not propagate ACLs to partitions, so a SECURITY DEFINER
  function owned by a non-superuser role could read pgrdf._pgrdf_quads and fail
  on the partition holding the rows. Partitions now inherit the parent's ACL at
  creation; the upgrade script backfills partitions created before this release.

ADDED

* pgrdf.build_id() (#92, #93) reports WHICH build of a version is loaded, from
  git describe --tags --always --dirty. version() reports the release line and
  is identical across every build of it, so after replacing a library it cannot
  say whether the binary now serving queries is the one installed. Deliberately
  narrow: tag, commits-since, short commit, dirty marker — no filesystem paths,
  host names or build users.

CHANGED

* module_pathname is now a bare name. PostgreSQL resolves a module_pathname
  containing a separator directly against pkglibdir and never consults
  dynamic_library_path, which made a library placed in an override directory
  unreachable regardless of path order, with no error raised. Backward
  compatible — the default dynamic_library_path is $libdir.

* pgrx =0.19.1 -> =0.19.2 (#70).

UPGRADING

  ALTER EXTENSION pgrdf UPDATE;
  SELECT pgrdf.version(), pgrdf.build_id();

sql/pgrdf--0.6.22--0.6.25.sql ships with the release. A fresh database needs
nothing beyond CREATE EXTENSION pgrdf.

Two operational notes for anyone granting on pgrdf._pgrdf_quads: grant BEFORE
creating graphs (granting afterwards covers only graphs that already exist),
and grant in its OWN transaction — GRANT locks the parent while partition
creation takes the DDL gate then the parent's AccessExclusiveLock, so doing
both in one transaction can deadlock against a concurrent add_graph.

VERSION NOTE

0.6.23 and 0.6.24 are both skipped and will never be tagged.

0.6.23 was already allocated to a planned type-closure release (now v0.6.26)
before this work needed a version. v0.6.24 was tagged and REFUSED by
release.yml's pre-build gate: META.json still read 0.6.22 while the tag said
0.6.24, so nothing was built, published or attested and LATEST.md correctly
stayed at v0.6.22. META.json is a documented member of the Rule 7 source set
(PROVENANCE.md, "Cutting a release" step 2); the cut swept for version strings
by file glob instead of following the protocol, and META.json is the one a
glob over *.toml/*.control/*.yml does not reach.

Versions are not reused here. A missing number is cleaner to explain than two
tags on different commits, and a gate that refuses is the reason this cost a
number instead of shipping a mislabelled artifact.

UPGRADE PATHS

Both shipped scripts land a COMPLETE 0.6.25:

  sql/pgrdf--0.6.22--0.6.25.sql
  sql/pgrdf--0.5.1--0.6.25.sql   (carries the 0.6.22->0.6.25 delta too)

The 0.5.1 bridge is a DIRECT path and postgres takes the shortest update
route, so an install on 0.5.1 never reads the 0.6.22 script. Renaming the
bridge without replaying the delta would land it labelled 0.6.25 with no
build_id() and no partition ACL backfill.

VERIFIED

  cargo fmt --check                                     clean
  cargo clippy --no-default-features --features pg18    -D warnings, clean
  cargo pgrx test --features pg18 pg18                  348 passed, 0 failed
  regression                                            green

v0.6.24

Toggle v0.6.24's commit message
v0.6.24 — dictionary cache correctness, build identity, partition ACLs

Two independent defects behind one symptom — a term cached under one identity
being returned under another — plus the build identity needed to tell which
binary is answering, and a partition-permission fix that unblocks downstream
extensions composing over pgRDF graphs.

FIXED

* Shared-memory dictionary cache survived an extension lifetime (#88, #89).
  CREATE EXTENSION now bumps the cache generation, so a fresh install cannot
  read slots warmed before it.

* The cache was not scoped by database (#90, #91). The fingerprint hashed
  term_type, lexical value, datatype and language only, while the cache lives
  in postmaster shared memory and _pgrdf_dictionary is per-database. The same
  term in two databases shared one slot, and database B read database A's
  dict_id — writing quads referencing ids it did not own. The database OID now
  seeds both halves of the key. This needed no DROP EXTENSION: two databases on
  one instance were sufficient, and the generation counter never covered it.

* Per-graph partitions were unreadable by downstream definer rings (#96).
  PostgreSQL does not propagate ACLs to partitions, so a SECURITY DEFINER
  function owned by a non-superuser role could read pgrdf._pgrdf_quads and fail
  on the partition holding the rows. Partitions now inherit the parent's ACL at
  creation; the upgrade script backfills partitions created before this release.

ADDED

* pgrdf.build_id() (#92, #93) reports WHICH build of a version is loaded, from
  git describe --tags --always --dirty. version() reports the release line and
  is identical across every build of it, so after replacing a library it cannot
  say whether the binary now serving queries is the one installed. Deliberately
  narrow: tag, commits-since, short commit, dirty marker — no filesystem paths,
  host names or build users.

CHANGED

* module_pathname is now a bare name. PostgreSQL resolves a module_pathname
  containing a separator directly against pkglibdir and never consults
  dynamic_library_path, which made a library placed in an override directory
  unreachable regardless of path order, with no error raised. Backward
  compatible — the default dynamic_library_path is $libdir.

* pgrx =0.19.1 -> =0.19.2 (#70).

UPGRADING

  ALTER EXTENSION pgrdf UPDATE;
  SELECT pgrdf.version(), pgrdf.build_id();

sql/pgrdf--0.6.22--0.6.24.sql ships with the release. A fresh database needs
nothing beyond CREATE EXTENSION pgrdf.

Two operational notes for anyone granting on pgrdf._pgrdf_quads: grant BEFORE
creating graphs (granting afterwards covers only graphs that already exist),
and grant in its OWN transaction — GRANT locks the parent while partition
creation takes the DDL gate then the parent's AccessExclusiveLock, so doing
both in one transaction can deadlock against a concurrent add_graph.

VERSION NOTE

0.6.23 is skipped and will never be tagged. That number was already allocated
to a planned type-closure release (now v0.6.25) before this work needed a
version. Versions are not reused here: a missing number is cleaner to explain
than two tags on different commits.

VERIFIED

  cargo fmt --check                                     clean
  cargo clippy --no-default-features --features pg18    -D warnings, clean
  cargo pgrx test --features pg18 pg18                  348 passed, 0 failed
  regression                                            green

v0.6.22

Toggle v0.6.22's commit message
pgRDF v0.6.22 — dual-arch trixie build parity; base bookworm→trixie; …

…repack upgrade-SQL guard (#67, supersedes v0.6.21)

v0.6.21

Toggle v0.6.21's commit message
pgRDF v0.6.21 — dual-arch trixie build parity; contractual base bookw…

…orm→trixie (#67)

v0.6.20

Toggle v0.6.20's commit message
pgRDF v0.6.20 — pgrx 0.19.1 + PostgreSQL 18

Resolves ERRATA E-006, the largest deferred upstream item: pgRDF moves from
pgrx 0.16.1 to 0.19.1 and adds PostgreSQL 18 to the supported matrix (14–18).

A build/runtime migration only — no schema change and no query-surface change.
Validated end-to-end on PostgreSQL 18.4: the full pgrx test suite, the compose
regression suite, and the W3C SPARQL/SHACL harnesses are all green (0.6.20).

- The pgrx 0.17/0.18 compile blockers (E0658 / E0716) cleared: E0658
  (`NonNull::from_mut`) is a Rust >= 1.96 gate (pgrx MSRV); E0716
  (`impl_table_iter`) is fixed by pgrx 0.18's SqlTranslatable ->
  associated-const migration. pgRDF has no hand-written SqlTranslatable impls.
- Drops the two-pass pgrx_embed bin; local builder on Rust 1.96; CI and the
  attested release chain now target PG 18.

PG 19 (currently beta) is a tracked follow-up.

Closes #63.

v0.6.19

Toggle v0.6.19's commit message
pgRDF v0.6.19 — SPARQL expression surface + differential oracle + fai…

…l-closed truncation

Scoring-loop expression surface (#50/#51: IF, numeric fns, math# tier,
aggregates over expressions), W3C differential oracle (#17), fail-closed
truncation (#14), CONSTRUCT set semantics (#54), HAVING-alias documented
extension (#55). .so + test only, no schema delta.

v0.6.18

Toggle v0.6.18's commit message
v0.6.18 — carve hardening + pg_dump dictionary fix

EXTRACT (~35x at 8.2B), #35 pg_dump _pgrdf_dictionary registration + CI round-trip.

v0.6.17

Toggle v0.6.17's commit message
v0.6.17 — carve_graph neighbourhood overload (seeds + K hops, #30)

Carve by query: carve_graph(src, seeds[], dst, max_hops) carves the K-hop
neighbourhood of a seed set into a new graph (shared dictionary, id-space
recursive-CTE BFS over the source partition). Completes C1's carve-by-query.
.so-only, no schema delta. See CHANGELOG.md [0.6.17].