#647-2 (P0, инфра — клиентскую цену НЕ меняет). Делает mv_quarter_price_index (#760) читаемым estimator'ом за O(1) + периодический refresh. - tradein 085_quarter_price_index_fdw.sql: FOREIGN TABLE quarter_price_index над main public.mv_quarter_price_index через существующий server gendesign_remote (паттерн 060_postgres_fdw_extension.sql, per-table). Колонки 1:1 с MV (varchar(30)/float8/bigint/text/timestamptz). DROP IF EXISTS идемпот. - main 99b_grant_quarter_price_index_fdw.sql: GRANT SELECT на MV роли tradein_fdw_reader (иначе foreign table падает; зеркало 122_grant_rosreestr). - main refresh: Celery beat (pg_cron нет). quarter_price_index_refresh.py — chained REFRESH mv_quarter_price_per_m2 → mv_quarter_price_index CONCURRENTLY; task refresh_quarter_price_index.py; beat-entry 'refresh-quarter-price-index' cron '0 2 5 * *' (05:00 MSK 5-го, после ekb-districts-medians). Lookup-индекс: MV уже несёт UNIQUE mv_quarter_price_index_uq (O(1) remote); foreign table не нуждается в локальном. Валидация (postgres-gendesign): MV 1972 строки, 0 NULL, UNIQUE indisunique=true, REFRESH CONCURRENTLY валиден. Разблокирует #647-3 (estimator integration, за гейтом #763). |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| best_layouts.py | ||
| cadastre_fetch.py | ||
| competitors.py | ||
| custom_pois.py | ||
| filters.py | ||
| gate_verdict.py | ||
| layout_signature.py | ||
| layout_velocity_refresh.py | ||
| noise_loader.py | ||
| parser.py | ||
| poi_loader.py | ||
| poi_score.py | ||
| pzz_loader.py | ||
| quarter_dump_lookup.py | ||
| quarter_price_index_refresh.py | ||
| quarter_price_refresh.py | ||
| scorer.py | ||
| velocity.py | ||
| weight_profiles.py | ||