HOTFIX web: /status/full 500 (str→tzinfo), /plan/compare 500 (chybějící comparison), canonical PV fn 4.5s→0.4s (force_custom_plan)
1) full_status._iso_utc dostával z JSONB bundle stringy → AttributeError → 500 celého /status/full; nyní parsuje přes _parse_ts. 2) /plan/compare: NameError — 'comparison = _bundle_from_current(compare_raw)' se nikdy nesestavilo (smazaný řádek), endpoint vždy 500. 3) fn_forecast_pv_slots_range_canonical_ab: PG 18 cachuje plány SQL funkcí → generický plán 4.5 s / 607k buffers; set plan_cache_mode=force_custom_plan → 0.4 s / 34k (změřeno explain analyze na živé DB). Táhne /plan/current, /plan/compare i rolling plánovač. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,9 @@ returns jsonb
|
||||
language sql
|
||||
stable
|
||||
set work_mem = '64MB'
|
||||
-- PG 18 cachuje plány SQL funkcí → generický plán bez znalosti hodnot parametrů
|
||||
-- (4.5 s / 607k buffers); s custom planem dle skutečných hodnot 0.4 s / 34k.
|
||||
set plan_cache_mode = force_custom_plan
|
||||
as $fn$
|
||||
with tz as (
|
||||
select coalesce(nullif(trim(s.timezone), ''), 'Europe/Prague') as tz_name
|
||||
|
||||
Reference in New Issue
Block a user