The forum will be unavailable for maintenance at some point from Friday, April 13 at 19:00 EDT until Sunday, April 15 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

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?

asked 20 Jan '12, 16:23

Calvin%20Allen's gravatar image

Calvin Allen
accept rate: 25%

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.

permanent link

answered 23 Jan '12, 08:04

Glenn%20Paulley's gravatar image

Glenn Paulley
accept rate: 43%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Jan '12, 16:23

question was seen: 829 times

last updated: 23 Jan '12, 08:04