Prod prerequisites identified in deep review of the scheduler automation: - data/sql/122: GRANT SELECT ON rosreestr_deals TO tradein_fdw_reader. scheduler import reads gendesign.rosreestr_deals via FDW, but the reader role was REVOKE ALL (100_tradein_fdw_role.sql) with no grant → import would fail "permission denied for table rosreestr_deals". Single parent grant suffices for declarative partitioning. - tradein 072: seed next_run_at = next night-window (tomorrow + window_start hour, pinned UTC) instead of NULL. NULL made get_due_schedules() fire both rows within ~1 tick of deploy — outside the night window and (for cian) before the FDW grant lands. Stays enabled; just shifts first fire to night.
7 lines
375 B
PL/PgSQL
7 lines
375 B
PL/PgSQL
-- 122_grant_rosreestr_to_fdw_reader.sql
|
|
-- #563: tradein scheduler reads gendesign.rosreestr_deals via FDW; tradein_fdw_reader
|
|
-- was REVOKE ALL (100_tradein_fdw_role.sql) → grant SELECT on the partitioned parent.
|
|
-- Single parent grant suffices (PG declarative partitioning checks parent ACL).
|
|
BEGIN;
|
|
GRANT SELECT ON public.rosreestr_deals TO tradein_fdw_reader;
|
|
COMMIT;
|