4 ms·
Mainly because it's somewhat of a convenience feature for which a viable workaround exists: do a normal update, concurrently add a conditional `where ... is nu
by pilif 8y ago
Mainly because it's somewhat of a convenience feature for which a viable workaround exists:
do a normal update, concurrently add a conditional `where ... is null` index, repeat in a loop (begin transaction, normal update, add constraint, commit) until it stops failing.
This will still take a lock, but thanks to most rows already updated and because of the conditional index, the lock will only last a very short amount of time.