Atesz <atesz@ritek.hu> writes:
> My question: Why need this strict locking?
> In my opinion there isn't exclusion between the DROP CONSTRAINT and the
> SELECT.
This isn't going to be changed, because the likely direction of future
development is that the planner will start making use of constraints
even for SELECT queries. This means that a DROP CONSTRAINT operation
could invalidate the plan of a SELECT query, so the locking will be
essential.
regards, tom lane