gendesign/data/sql/188_regrant_quarter_price_index_fdw.sql
bot-backend 99757c6370
All checks were successful
Deploy / changes (push) Successful in 8s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 33s
Deploy / build-worker (push) Successful in 32s
Deploy / deploy (push) Successful in 1m18s
fix(sql): re-grant mv_quarter_price_index to tradein_fdw_reader (C3, #2583) (#2641)
2026-08-04 18:42:22 +00:00

22 lines
1.3 KiB
PL/PgSQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 188_regrant_quarter_price_index_fdw.sql
-- C3 (#2583): tradein-эстиматор потерял квартальный индекс 2026-07-05.
--
-- Причина: 179_mv_quarter_price_cadastral_floor.sql делает
-- DROP MATERIALIZED VIEW mv_quarter_price_index CASCADE; CREATE ...
-- DROP+CREATE не сохраняет гранты — GRANT из 99b_grant_quarter_price_index_fdw.sql
-- пропал, и tradein-сторона (foreign table quarter_price_index, роль
-- tradein_fdw_reader) с 05.07 получала:
-- permission denied for materialized view mv_quarter_price_index
--
-- Симптом «не выполняется с 5 июля» — это дата применения 179, а не поломка
-- рефреша: REFRESH MATERIALIZED VIEW (beat: 05:00 МСК 5-го числа) гранты не трогает.
--
-- Применено вживую на прод 2026-08-04 (FDW-чтение проверено: 1894 строки).
-- Этот файл — идемпотентное закрепление. Парный фикс: GRANT дописан в конец 179,
-- чтобы повторное применение 179 больше не теряло грант.
BEGIN;
GRANT SELECT ON public.mv_quarter_price_index TO tradein_fdw_reader;
COMMIT;