Limits and Quotas

This page documents the hard limits, default quotas, and tunable caps in pg_ripple. All GUC parameters listed here can be adjusted; see the GUC Reference for full details.


Query Limits

LimitDefaultGUCError code
Max SPARQL result rowsunlimitedpg_ripple.sparql_max_rowsPT640
SPARQL overflow actiontruncatepg_ripple.sparql_overflow_action
Max algebra tree depth256pg_ripple.sparql_max_algebra_depthPT440
Max triple patterns per query4096pg_ripple.sparql_max_triple_patternsPT440
Max DESCRIBE CBD depth16pg_ripple.describe_max_depth
Fuzzy match input length4096 charspg_ripple.fuzzy_max_input_lengthPT0308
All-nodes predicate expansion cap500 predicatespg_ripple.all_nodes_predicate_limit

Export Limits

LimitDefaultGUCError code
Export function max rows (Turtle/N-Triples/JSON-LD)unlimitedpg_ripple.export_max_rowsPT642
Arrow Flight batch size1000 rows/batchpg_ripple.arrow_batch_size

Inference Limits

LimitDefaultGUCError code
Datalog max depthunlimitedpg_ripple.datalog_max_depth
Datalog max derived factsunlimitedpg_ripple.datalog_max_derived
Well-founded semantics max rounds100pg_ripple.wfs_max_iterationsPT520
SHACL rule max iterations100pg_ripple.shacl_rule_max_iterationsPT301
Lattice inference max iterations1000pg_ripple.lattice_max_iterationsPT540
Probabilistic Datalog max iterations100pg_ripple.prob_datalog_max_iterations
SHACL score log retention30 dayspg_ripple.shacl_score_log_retention_days

Federation Limits

LimitDefaultGUCError code
Per-SERVICE timeout30 spg_ripple.federation_timeoutPT214
Connect timeout10 spg_ripple.federation_connect_timeout_secsPT214
Max rows per SERVICE call10,000pg_ripple.federation_max_results
Max response body per endpoint100 MiBpg_ripple.federation_max_response_bytesPT215
Partial recovery max bytes64 KiBpg_ripple.federation_partial_recovery_max_bytes
Circuit breaker threshold5 failurespg_ripple.federation_circuit_breaker_thresholdPT217
Parallel SERVICE workers4pg_ripple.federation_parallel_max

PageRank Limits

LimitDefaultGUCError code
Max PageRank iterations100pg_ripple.pagerank_max_iterations
Max seed IRIs per call1024pg_ripple.pagerank_max_seedsPT0411
Convergence check normL1pg_ripple.pagerank_convergence_norm

Storage Limits

LimitDefaultGUCNotes
VP promotion threshold1,000 triplespg_ripple.vp_promotion_thresholdBelow threshold: stored in vp_rare
Merge batch size1,000,000 rowspg_ripple.merge_batch_sizePer-merge INSERT…SELECT
Merge fence lock timeout5,000 mspg_ripple.merge_lock_timeout_ms
CDC watermark batch size100 eventspg_ripple.cdc_watermark_batch_size
VP promotion batch size10,000 rowspg_ripple.vp_promotion_batch_size
Bidi relay max in-flight1,000 opspg_ripple.bidi_relay_max_inflightDrop-oldest policy
Dictionary vacuum threshold10,000 termspg_ripple.dict_vacuum_thresholdPost-encode auto-VACUUM

Dictionary and Encoding

LimitDefaultGUCNotes
Dictionary LRU cache size65,536 entriespg_ripple.dictionary_cache_sizeXXH3-128 hash map
Shared memory budget64 MiBpg_ripple.cache_budget_mbpostmaster-scoped

HTTP API Limits

LimitDefaultConfigNotes
Max request body size10 MiBPG_RIPPLE_HTTP_MAX_BODY_BYTESApplies to SPARQL UPDATE body
Rate limitunlimitedPG_RIPPLE_HTTP_RATE_LIMITPer source IP, req/s
Arrow Flight ticket expiry3,600 spg_ripple.arrow_flight_expiry_secsSigned HMAC tickets
Connection pool size16PG_RIPPLE_HTTP_POOL_SIZEPostgres connections

Audit and Retention

LimitDefaultGUCNotes
Event audit retention90 dayspg_ripple.audit_retention_days_pg_ripple.event_audit
SHACL score log retention30 dayspg_ripple.shacl_score_log_retention_days_pg_ripple.shacl_score_log
CDC slot idle timeout3,600 spg_ripple.cdc_slot_idle_timeout_secondsOrphan slot cleanup
VACUUM dict batch size200 entriespg_ripple.vacuum_dict_batch_sizevacuum_dictionary()

Hard Limits (Not Configurable)

These limits are baked into the implementation:

ConstraintValueNotes
Dictionary hash space2^64 (XXH3-128)Collision probability negligible in practice
Maximum SID (statement ID)2^63 − 1 (i64)PostgreSQL sequence maximum
Maximum named graph ID2^63 − 1 (i64)Same sequence namespace
Maximum predicate ID2^63 − 1 (i64)Same sequence namespace
SPARQL 1.1 spec complianceFullSELECT, CONSTRUCT, DESCRIBE, ASK, UPDATE, LOAD, CLEAR, DROP, ADD, MOVE, COPY
PostgreSQL target18.x onlypgrx 0.18, no older PG support

For a 100 GB RDF dataset on a 32-core / 128 GB RAM server:

# postgresql.conf overrides
pg_ripple.dictionary_cache_size     = 1000000
pg_ripple.cache_budget_mb           = 512
pg_ripple.sparql_max_rows           = 100000
pg_ripple.export_max_rows           = 500000
pg_ripple.merge_threshold           = 50000
pg_ripple.merge_workers             = 4
pg_ripple.datalog_parallel_workers  = 8
pg_ripple.federation_timeout        = 60
pg_ripple.federation_parallel_max   = 8
pg_ripple.pagerank_max_iterations   = 200

See Performance Tuning for a full tuning guide.