GUC Reference — pg_trickle

129 configuration parameters extracted from src/config/.

See docs/CONFIGURATION.md for full descriptions and usage examples.

GUC nameTypeDefaultDescription
pg_trickle.adaptive_batch_coalescingbooltrueDisable if the batched query plan is unexpectedly slow (rare).
pg_trickle.adaptive_merge_strategyboolfalseDefault false — the fixed merge_strategy GUC governs.
pg_trickle.agg_diff_cardinality_thresholdint41000Set to 0 to disable the cardinality warning.
pg_trickle.aggregate_fast_pathbooltrueB-1: Aggregate fast-path — use explicit DML instead of MERGE for GROUP BY queries where all aggregates are algebraically invertible (COUNT, SUM, AVG, etc.).
pg_trickle.algebraic_drift_reset_cyclesint40Set to 0 to disable periodic drift reset (default).
pg_trickle.allow_circularboolfalseWhen false (default), cycle detection rejects any stream table creation that would introduce a cycle in the dependency graph.
pg_trickle.analyze_before_deltabooltrueWhen enabled, ANALYZE pgtrickle_changes.changes_<oid> is run before the delta SQL is executed.
pg_trickle.auto_backoffbooltrueThis prevents CPU runaway when a stream table's refresh cost exceeds its schedule budget and an operator is not available to respond manually.
pg_trickle.auto_indexbooltrueWhen enabled, create_stream_table() automatically creates indexes on GROUP BY keys, DISTINCT columns, and adds INCLUDE clauses to the __pgt_row_id index for stream tables with ≤ 8 output columns.
pg_trickle.backpressure_consecutive_limitint43Default: 3 cycles.
pg_trickle.block_source_ddlbooltrueDefault is true (enabled) as of v0.11.0 — set to false to restore the previous permissive behavior (DDL triggers reinitialization instead of blocking).
pg_trickle.buffer_alert_thresholdint41000000When any source table's change buffer exceeds this number of rows, a BufferGrowthWarning alert is emitted.
pg_trickle.buffer_partitioningtext"off"Controls whether change buffer tables use PARTITION BY RANGE (lsn): - "off" (default): Unpartitioned heap tables (current behaviour).
pg_trickle.cdc_capture_modetext"discard"Use pgtrickle.cdc_capture_mode() to inspect the active mode at runtime.
pg_trickle.cdc_modetext"auto"- "auto" (default): Use triggers for creation, transition to WAL if wal_level = logical is available.
pg_trickle.cdc_pausedboolfalseDefault: false (CDC writes are enabled).
pg_trickle.cdc_trigger_modetext"statement"Changing this GUC takes effect for newly created stream tables.
pg_trickle.change_buffer_durabilitytext"logged"This GUC supersedes pg_trickle.unlogged_buffers (which is now a compatibility alias: true maps to "unlogged", false to "logged").
pg_trickle.change_buffer_schematext"pgtrickle_changes"Schema name for change buffer tables.
pg_trickle.citus_st_lock_lease_msint460000Default: 60 000 ms (60 seconds).
pg_trickle.citus_worker_retry_ticksint45Default: 5 ticks.
pg_trickle.cleanup_use_truncatebooltrueSet to false if the TRUNCATE AccessExclusiveLock on the change buffer is problematic for concurrent DML on the source table.
pg_trickle.columnar_backendtext"none"When set, create_stream_table() uses the specified columnar backend and routes differential refresh to the delete_insert strategy (columnar backends are append-only).
pg_trickle.commit_timestamp_trackingboolfalseDefault: false (disabled to avoid overhead when track_commit_timestamp is off).
pg_trickle.compact_thresholdint4100000Set to 0 to disable compaction.
pg_trickle.connection_pooler_modetext"off"Overrides the per-ST pooler_compatibility_mode for all stream tables.
pg_trickle.cost_cache_capacityint4256Default: 256.
pg_trickle.cost_model_safety_marginfloat80.8Default 0.8 — DIFFERENTIAL is chosen unless it's estimated to cost more than 80% of FULL.
pg_trickle.deep_join_l0_scan_thresholdint44Default: 4 (matches the previously hardcoded DEEP_JOIN_L0_SCAN_THRESHOLD).
pg_trickle.default_schedule_secondsint41Default: 1 s.
pg_trickle.delta_amplification_thresholdfloat8100.0Set to 0.0 to disable amplification detection.
pg_trickle.delta_enable_nestloopbooltrueWhen enabled, SET LOCAL enable_nestloop = off is applied inside execute_delta_sql before running the generated delta SQL.
pg_trickle.delta_work_memint40Set to 0 (default) to inherit the session work_mem.
pg_trickle.delta_work_mem_cap_mbint4256PERF-004 (v0.70.0): Default changed from 0 (disabled) to 256 MB.
pg_trickle.diff_output_formattext"split"Controls how the DI-2 aggregate UPDATE-split surfaces changes: - "split" (default): Emit DELETE+INSERT pairs for aggregate UPDATEs.
pg_trickle.differential_max_change_ratiofloat80.15Set to 0.0 to disable adaptive fallback (always use DIFFERENTIAL).
pg_trickle.drain_timeoutint460Default: 60 seconds.
pg_trickle.enable_change_buffer_fanoutbooltrueDisable only if the shared cache is producing incorrect change-detection results (should not occur in practice).
pg_trickle.enable_fused_refreshbooltrueDisable if a specific DAG shape causes unexpected planner behaviour.
pg_trickle.enable_trace_propagationboolfalseWhen true, trace context is propagated through refresh cycles for distributed tracing with OpenTelemetry.
pg_trickle.enable_vector_aggboolfalseF4 (v0.37.0): Enable pgVectorMV — incremental vector aggregate operators.
pg_trickle.enabledbooltrueMaster enable/disable switch for the extension.
pg_trickle.enforce_backpressureboolfalseDefault: false (alerts only, no throttling).
pg_trickle.force_full_refreshboolfalseUseful for SRE diagnosis when a cluster-wide refresh_strategy = 'full' still has DIFFERENTIAL STs due to explicit per-ST row values.
pg_trickle.foreign_table_pollingboolfalseWhen enabled, foreign tables used in DIFFERENTIAL / IMMEDIATE mode defining queries will be supported via a snapshot-comparison approach: before each refresh cycle the scheduler materializes a snapshot of the foreign table into a local shadow table, then computes EXCEPT ALL deltas against the previous snapshot.
pg_trickle.frontier_holdback_modetext"xmin"| Value | Meaning | |-------|---------| | "xmin" (default) | Probe pg_stat_activity + pg_prepared_xacts once per tick and cap the frontier to the safe upper bound.
pg_trickle.frontier_holdback_probe_cache_msint4250Set to 0 to disable caching and probe on every scheduler tick.
pg_trickle.frontier_holdback_warn_secondsint460#536: Emit a WARNING when the frontier holdback has been active for longer than this many seconds.
pg_trickle.fuse_default_ceilingint40Set to 0 to disable the global default ceiling (per-ST ceiling only).
pg_trickle.fused_refresh_max_delta_rowsint4500000Default: 500 000.
pg_trickle.history_prune_interval_secondsint460Default: 60 seconds.
pg_trickle.history_retention_daysint490Default: 90 days.
pg_trickle.invalidation_ring_capacityint41024Default: 1024.
pg_trickle.ivm_recursive_max_depthint4100Set to 0 to disable the depth guard (allow unlimited recursion).
pg_trickle.ivm_topk_max_limitint41000TopK queries with LIMIT > threshold are rejected in IMMEDIATE mode because inline recomputation of large result sets adds unacceptable latency to the trigger path.
pg_trickle.ivm_use_enrboolfalseWhen false, the legacy temp-table copy behaviour is used.
pg_trickle.l1_cache_max_entriesint4256Note: pg_trickle.template_cache_max_entries caps the L2 (MERGE template) cache; this GUC caps the L0/L1 (delta-template / placeholder-resolver) caches that live in src/dvm/mod.rs.
pg_trickle.lag_aware_schedulingboolfalseOff by default — use static quotas.
pg_trickle.log_delta_sqlboolfalseDo not enable in production — every refresh will emit potentially large SQL strings to the server log.
pg_trickle.log_formattext"text"- "text" (default): Standard PostgreSQL log format.
pg_trickle.log_merge_sqlboolfalseIntended for debugging MERGE query generation only.
pg_trickle.matview_pollingboolfalseWhen true, materialized views referenced in DIFFERENTIAL/IMMEDIATE defining queries will be supported via a snapshot-comparison approach (same mechanism as foreign table polling).
pg_trickle.max_buffer_rowsint41000000Set to 0 to disable the limit.
pg_trickle.max_change_buffer_alert_rowsint40Set to 0 to disable (default).
pg_trickle.max_concurrent_refreshesint44Default: 4.
pg_trickle.max_consecutive_errorsint43Default: 3.
pg_trickle.max_delta_estimate_rowsint40Set to 0 to disable the estimation check (default).
pg_trickle.max_diff_ctesint41000Complex queries with many operators, joins, and set operations can produce hundreds of CTEs.
pg_trickle.max_dynamic_refresh_workersint44This is distinct from pg_trickle.max_concurrent_refreshes, which is the per-database dispatch cap.
pg_trickle.max_fixpoint_iterationsint4100When stream tables form a cyclic dependency (circular reference), the scheduler iterates to a fixed point.
pg_trickle.max_grouping_set_branchesint464Maximum allowed grouping set branches for CUBE/ROLLUP expansion (EC-02).
pg_trickle.max_parallel_workersint40Default 0 = serial mode (existing behavior preserved).
pg_trickle.max_parse_depthint464Prevents stack-overflow crashes on pathological queries with deeply nested subqueries, CTEs, or set operations.
pg_trickle.max_parse_nodesint40Queries that exceed this limit are rejected with QueryTooComplex to prevent unbounded memory allocation in the parse advisory warnings cache and CTE registry.
pg_trickle.merge_batch_sizeint450000Default: 50 000.
pg_trickle.merge_join_strategytext"auto"Controls the join strategy hint applied via SET LOCAL during MERGE: - "auto" (default): delta-size heuristics choose the strategy.
pg_trickle.merge_planner_hintsbooltrueDeprecated — use pg_trickle.planner_aggressive instead.
pg_trickle.merge_seqscan_thresholdfloat80.001Set to 0.0 to disable this optimization.
pg_trickle.merge_strategytext"auto"The former "delete_insert" value was removed in v0.19.0 (CORR-1).
pg_trickle.merge_strategy_thresholdfloat80.01Default: 0.01 (1%).
pg_trickle.merge_work_mem_mbint464A higher value lets PostgreSQL use larger hash tables for the MERGE join, avoiding disk-spilling sort/merge strategies on large deltas.
pg_trickle.metrics_portint40Set to 0 (default) to disable the exporter.
pg_trickle.metrics_request_timeout_msint45000Default: 5000 (5 seconds).
pg_trickle.min_schedule_secondsint41Default: 1 s.
pg_trickle.notify_coalesce_msint4250Default: 250 ms.
pg_trickle.online_schema_evolutionboolfalseDefault: false (standard ALTER QUERY reinit behaviour).
pg_trickle.otel_endpointtextNoneSet to NULL / empty to disable OTEL export (default).
pg_trickle.parallel_refresh_modetext"on"- "on" (default as of v0.11.0): Enable true parallel refresh via dynamic workers.
pg_trickle.part3_max_scan_countint45Default: 5 (matches the previously hardcoded PART3_MAX_SCAN_COUNT).
pg_trickle.per_database_worker_quotaint40Set to 0 (default) to disable per-database quotas — all databases share max_dynamic_refresh_workers on a first-come-first-served basis, bounded per coordinator by max_concurrent_refreshes.
pg_trickle.planner_aggressivebooltrueReplaces the old merge_planner_hints and merge_work_mem_mb GUCs (both still accepted but emit deprecation warnings).
pg_trickle.prediction_min_samplesint45When fewer than this many data points exist, the predictor falls back to the existing fixed-threshold logic.
pg_trickle.prediction_ratiofloat81.5When predicted_diff_ms > last_full_ms × prediction_ratio, the scheduler overrides the strategy to FULL refresh.
pg_trickle.prediction_windowint460The forecaster fits duration_ms ~ delta_rows over this many minutes of pgt_refresh_history data per stream table.
pg_trickle.publication_lag_warn_bytesint40Set to 0 to disable subscriber lag tracking (default).
pg_trickle.refresh_strategytext"auto"This GUC is a cluster-wide override.
pg_trickle.reindex_drift_thresholdfloat80.20Default: 0.20.
pg_trickle.schedule_alert_cooldown_secondsint4300Prevents alert spam when the cost model consistently predicts SLA breach.
pg_trickle.schedule_recommendation_min_samplesint420When fewer samples are available, confidence is returned as 0.0 and the recommendation fields are NULL or conservative defaults.
pg_trickle.scheduler_drain_timeoutint430Default: 30 seconds.
pg_trickle.scheduler_interval_msint41000Default: 1,000 ms (1 s).
pg_trickle.self_heal_lock_timeoutbooltrueWhen true, a refresh error containing "lock timeout" doubles the effective refresh interval for the affected stream table (exponential backoff).
pg_trickle.self_heal_oombooltrueWhen true, a refresh error containing "out of memory" causes the scheduler to reduce the effective merge_work_mem_mb for the affected stream table by 25% on the next tick and retry.
pg_trickle.self_monitoring_auto_applytext"off"Controls when self-monitoring insights are automatically applied: - "off" (default): Never auto-apply.
pg_trickle.sla_window_hoursint424Default: 24 hours.
pg_trickle.slot_lag_critical_threshold_mbint41024When a WAL-mode source retains more than this amount of WAL, pgtrickle.check_cdc_health() reports a slot_lag_exceeds_threshold alert for the source.
pg_trickle.slot_lag_warning_threshold_mbint4100When a WAL-mode source retains more than this amount of WAL, pg_trickle: - emits a slot_lag_warning NOTIFY event from the scheduler, and - reports a WARN row in pgtrickle.health_check().
pg_trickle.spill_consecutive_limitint43When a stream table accumulates this many consecutive differential refreshes where temp_blks_written > spill_threshold_blocks, the scheduler marks the ST for reinitialization (FULL refresh) on the next cycle.
pg_trickle.spill_threshold_blocksint40Set to 0 to disable spill detection (default).
pg_trickle.template_cachebooltrueG14-SHC: Enable the cross-backend template cache backed by an UNLOGGED catalog table (pgtrickle.pgt_template_cache).
pg_trickle.template_cache_max_age_hoursint4168Prevents stale entries accumulating after ALTER QUERY without DROP or source-OID renumbering.
pg_trickle.template_cache_max_bytesint40Set to 0 to disable byte-based eviction and rely only on template_cache_max_entries.
pg_trickle.template_cache_max_entriesint40When the cache reaches this size, the least-recently-used entry is evicted.
pg_trickle.temporal_stream_tablesboolfalseDefault: false (standard non-temporal storage).
pg_trickle.test_chaos_for_tabletextNoneActivate with: ALTER SYSTEM SET pg_trickle.test_chaos_for_table = 'name' followed by SELECT pg_reload_conf().
pg_trickle.tick_watermark_enabledbooltrueDisable only if you need stream tables to always advance to the very latest available LSN regardless of cross-source consistency.
pg_trickle.tiered_schedulingbooltrueDefault changed to true in v0.12.0 (PERF-3) — prevents large deployments from wasting CPU refreshing cold STs at full speed.
pg_trickle.trace_idtextNoneSet to NULL to disable trace ID injection (default).
pg_trickle.unlogged_buffersboolfalseDeprecated (COR-003/ARCH-001, v0.68.0): Use pg_trickle.change_buffer_durability instead.
pg_trickle.use_prepared_statementsbooltrueDisable if prepared-statement parameter sniffing produces poor plans (e.g., highly skewed LSN distributions).
pg_trickle.use_sqlstate_classificationbooltrueThe SQLSTATE-based classification is locale-safe: it works correctly regardless of lc_messages.
pg_trickle.user_triggerstext"auto"- "auto" (default): Detect user-defined row-level triggers on the stream table and automatically use explicit DML (DELETE + UPDATE + INSERT) so triggers fire with correct TG_OP, OLD, and NEW.
pg_trickle.validate_delta_invariantsboolfalseDefault: false.
pg_trickle.volatile_function_policytext"reject"Controls how volatile functions in defining queries are handled: - "reject" (default): Error — volatile functions are rejected.
pg_trickle.wal_max_changes_per_pollint410000Default: 10 000.
pg_trickle.wal_max_lag_bytesint465536Default: 65 536 (64 KiB).
pg_trickle.wal_transition_timeoutint4300Maximum time (seconds) to wait for the WAL decoder to catch up during transition from triggers to WAL-based CDC before falling back to triggers.
pg_trickle.watermark_holdback_timeoutint40Set to 0 to disable stuck-watermark detection (default).
pg_trickle.worker_pool_sizeint40Set to 0 (default) to use the existing spawn-per-task model.