> But I would like to add two internal lock modes due to VACUUM.
>
> 6. AccessShareLock - acquired by each DML statement
> (INSERT, UPDATE, DELETE, SELECT)
> for the duration of statement.
>
> 7. AccessExclusiveLock - acquired by VACUUM
>
> : we can't vacuum a relation scanned by some other backend...
> (BTW, having these ones we get rid of pg_vlock file...)
On the other hand, we could use ObjExclusiveLock for vacuum -
vacuuming relations opened by running transaction is not
much usefull thing for now...
>
> And now yet two another locks for DDL statements
> (DROP/ALTER) for tables and indices only.
>
> 8. ObjShareLock - acquired by heap/index open for the duration
> of transaction.
>
> 9. ObjExclusiveLock - acquired by DROP/ALTER.
Vadim