Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAdvisoryLockAlreadyAcquired = errors.New("advisory lock already acquired by another process")
ErrAdvisoryLockAlreadyAcquired is returned when another process already holds the advisory lock
var ErrExtensionNotFound = errors.New("extension not found")
Functions ¶
func CreateIndexes ¶
CreateIndexes ensures that the necessary indexes on the users table exist. If the indexes already exist and are valid, it skips creation. It uses a Postgres advisory lock to prevent concurrent index creation by multiple processes. Returns an error either from index creation failure (partial or complete) or if the advisory lock could not be acquired.