on 2012 Jan 20 4:23 PM
Sometimes we find a need to modify publications/articles ahead of an extraction.
Naturally, there are sometimes users still in the system, since we're normally trying to make the change in the middle of a work day.
I'm curious why altering an article, say adding a WHERE clause of 1=2, would be rejected if a user has a lock on the corresponding table? By design or bug?
Request clarification before answering.
This is by design. Shared schema locks are held by "ordinary" transactions to ensure that the schema remains fixed over the life of the transaction, to ensure that (for example) the transaction can issue a ROLLBACK and the transaction's updates will be undone correctly.
So any schema modification, including altering an ARTICLE, requires an exclusive lock so as to ensure that any existing transactions can complete before the schema is modified.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.