mirror of
https://github.com/status-im/migrate.git
synced 2025-02-22 07:58:05 +00:00
Merge pull request #287 from ctuong/pg-lock-comment
Update postgres driver Lock comment to reflect actual behavior
This commit is contained in:
commit
fc060940b4
@ -150,8 +150,7 @@ func (p *Postgres) Lock() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// This will either obtain the lock immediately and return true,
|
||||
// or return false if the lock cannot be acquired immediately.
|
||||
// This will wait indefinitely until the lock can be acquired.
|
||||
query := `SELECT pg_advisory_lock($1)`
|
||||
if _, err := p.conn.ExecContext(context.Background(), query, aid); err != nil {
|
||||
return &database.Error{OrigErr: err, Err: "try lock failed", Query: []byte(query)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user