mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Rename VACOPT_NOWAIT to VACOPT_SKIP_LOCKED
When it comes to SELECT ... FOR or LOCK, NOWAIT means to not wait for something to happen, and issue an error. SKIP LOCKED means to not wait for something to happen but to move on without issuing an error. The internal option of autovacuum and autoanalyze mentioned above, used only when wraparound is not involved was named NOWAIT, but behaves like SKIP LOCKED which is confusing. Author: Nathan Bossart Discussion: https://postgr.es/m/20180307050345.GA3095@paquier.xyz
This commit is contained in:
@ -143,7 +143,7 @@ analyze_rel(Oid relid, RangeVar *relation, int options,
|
||||
* matter if we ever try to accumulate stats on dead tuples.) If the rel
|
||||
* has been dropped since we last saw it, we don't need to process it.
|
||||
*/
|
||||
if (!(options & VACOPT_NOWAIT))
|
||||
if (!(options & VACOPT_SKIP_LOCKED))
|
||||
onerel = try_relation_open(relid, ShareUpdateExclusiveLock);
|
||||
else if (ConditionalLockRelationOid(relid, ShareUpdateExclusiveLock))
|
||||
onerel = try_relation_open(relid, NoLock);
|
||||
|
Reference in New Issue
Block a user