mirror of
https://github.com/block/buzz.git
synced 2026-11-03 07:51:22 +00:00
Every channel-bearing INSERT INTO events now checks created_at against database clock_timestamp() minus CREATED_AT_FLOOR_SECS on the admitted transaction before inserting, and returns the typed, non-retryable DbError::CreatedAtFloorRejected. The check samples the clock after BEGIN, so the replica-fence wall min(oldest_xact_start, S) - floor - margin still covers it. Migration 0021's deferred trigger and the writer-pool GUC stay in place as the mixed-version backstop until phase 2. A source policy requires the check on every channel-bearing events INSERT and forbids production UPDATEs of events.created_at/channel_id. The admin seed script now refuses non-local PGHOST. Refs BUZZ-316. Signed-off-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>