pgapi-bfs-propagation-in-python

IN premise

PgApi implements BFS propagation in application-level Python (not stored procedures), using JSONB containment queries (`@>`) against GIN indexes to find dependents

Summary

The system's truth propagation logic runs as breadth-first search in Python application code rather than inside the database. It finds dependent beliefs by querying JSONB support lists with PostgreSQL's containment operator, which hits GIN indexes for fast lookup. This means propagation performance depends on round-trips between the app and database rather than being handled entirely within PostgreSQL, and the efficiency of dependent lookups hinges on those GIN indexes being properly maintained.

Dependents

These beliefs depend on this one:

Details

Sourceentries/2026/04/28/reasons_lib-pg.md