PrefectHQ
prefect
BlogDocsChangelog

Add PostgreSQL search_path support via PREFECT_API_DATABASE_SCHEMA

#19620
Comparing
devin/1764822034-postgres-schema-support
(
527c44e
) with
main
(
290d70f
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
0%
462 µs462 µs
bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s

Ignored

bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-8%
5.1 ms5.5 ms
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-31%
33.2 ms48.1 ms
bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+2%
177.5 ms174 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
107.7 ms107.8 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+16%
10.3 ms8.9 ms

Commits

Click on a commit to change the comparison range
Base
main
290d70f
-0.47%
Add PostgreSQL search_path support via PREFECT_API_DATABASE_SCHEMA This adds support for custom PostgreSQL schemas by introducing a new search_path setting that can be configured via: - PREFECT_API_DATABASE_SCHEMA - PREFECT_SERVER_DATABASE_SCHEMA - PREFECT_API_DATABASE_SEARCH_PATH - PREFECT_SERVER_DATABASE_SEARCH_PATH When set, PostgreSQL connections will include the search_path in their server_settings, allowing Prefect to operate within a custom schema instead of the default public schema. This feature applies to: - SQLAlchemy engine connections (main application queries) - Raw asyncpg connections for LISTEN/NOTIFY functionality Closes #18015 Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
ed74a0c
6 hours ago
by devin-ai-integration[bot]
+0.39%
Fix CI: simplify validation_alias and add to SUPPORTED_SETTINGS - Remove extra *_DATABASE_SEARCH_PATH aliases to keep API surface minimal - Add PREFECT_API_DATABASE_SCHEMA and PREFECT_SERVER_DATABASE_SCHEMA to SUPPORTED_SETTINGS in test_settings.py Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
b0b4bf4
5 hours ago
by devin-ai-integration[bot]
-0.12%
Fix CI: mark both DATABASE_SCHEMA settings as legacy Both PREFECT_API_DATABASE_SCHEMA and PREFECT_SERVER_DATABASE_SCHEMA are aliases for the deeply nested search_path field at server.database.sqlalchemy.connect_args.search_path. Since the canonical env var name would be PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_SEARCH_PATH, both short aliases need to be marked as legacy to skip the to_environment_variables() assertion in tests. Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
527c44e
5 hours ago
by devin-ai-integration[bot]
© 2025 CodSpeed Technology
Home Terms Privacy Docs