Documentation
¶
Overview ¶
Package migrateretry runs grove migration groups on PostgreSQL and retries the one failure replicas booting together can hit.
Grove v1.10.0 creates grove_migrations and grove_migration_locks before it takes the migration lock, so replicas starting at once on a database without those tables race on the CREATE, and the losers fail with duplicate_table or duplicate_object. Run retries that failure a few times with a short jittered pause. By the next attempt the tables exist and grove's lock serialises the replicas.
Index ¶
Constants ¶
const Attempts = 5
Attempts bounds how many times Run runs the orchestrator.
Variables ¶
This section is empty.
Functions ¶
func IsConcurrentCreate ¶
IsConcurrentCreate reports duplicate_table (42P07) or duplicate_object (42710), what Postgres raises when two sessions run the same CREATE TABLE IF NOT EXISTS at once and one loses. The string check covers a wrapper that flattens the PgError.
Types ¶
This section is empty.