symfonic.memory.backends.postgres_edge_index_preflight¶
postgres_edge_index_preflight ¶
Read-only catalog and data preflight for the scoped edge-index migration.
This is evidence for an operator, not a migration or a write-barrier probe. Fleet writer state cannot be inferred from one PostgreSQL connection.
DirectEdgeIndexNotReady ¶
Bases: RuntimeError
The configured edge index cannot protect a direct mutation.
EdgeIndexPreflight
dataclass
¶
EdgeIndexPreflight(schema: str, indexes: tuple[EdgeIndexMetadata, ...], old_index_present: bool, new_index_present: bool, null_scope_rows: int, duplicate_effective_owner_groups: int, sibling_tuple_groups: int, fleet_writer_state: str = 'UNKNOWN')
migration_authorized
property
¶
A database snapshot cannot establish the fleet write barrier.
EdgeIndexPreflightError ¶
Bases: RuntimeError
The database cannot be inspected completely and safely.
LegacyEdgeBootstrapRefused ¶
Bases: RuntimeError
A default host cannot restore the tenant-wide index after cutover.
inspect_edge_indexes
async
¶
Inspect one schema under a consistent read-only transaction.
The caller supplies an asyncpg-style connection. No row identifiers or scope values leave the database; only counts and index metadata do.
Source code in src/symfonic/memory/backends/postgres_edge_index_preflight.py
require_direct_edge_index
async
¶
Check the writer's resolved table on its acquired connection.
Source code in src/symfonic/memory/backends/postgres_edge_index_preflight.py
require_legacy_bootstrap_safe
async
¶
Refuse default index DDL once the scoped index has replaced it.
The resolved table is the same unqualified table used by ensure_schema. A fresh database has neither index and keeps legacy bootstrap behavior.