Close postgres locking races; gate batch valuation with a txn advisory lock
Fixes two phantom-insert races where concurrent operations could create duplicate stock entries on postgres; gates batch valuation with transaction-scoped advisory locks.
Fixes two phantom-insert races where concurrent operations could create duplicate stock entries on postgres; gates batch valuation with transaction-scoped advisory locks.