Documentation
¶
Overview ¶
Package postgres provides the kit's production storage backend over pgx/v5's database/sql driver (R7). Per-account write concurrency: sequence reservation serializes on a chain_account_locks row via INSERT … ON CONFLICT DO NOTHING + SELECT … FOR UPDATE (AcquireAccountLock), so different (chain_id, source_address) accounts reserve concurrently while one account's reservations are strictly ordered. The schema's UNIQUE constraints remain the last-line guarantee.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireAccountLock ¶
AcquireAccountLock serializes work for one (chain_id, source_address) inside tx: it creates the chain_account_locks row on demand, then takes a row lock held until the transaction ends (data model §6 lock key CHAIN_ACCOUNT:{chain_id}:{source_address}).
Types ¶
This section is empty.