انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-020-L01

لماذا تسبب الترحيلات انقطاعات

  • الدرس 1 من 6
  • Mid-level
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

see how a schema change can block production.

الموضوعات المخطط لها

  • Many ALTER TABLE forms take an ACCESS EXCLUSIVE lock, which blocks all reads and writes on the table.
  • A waiting DDL statement also blocks later queries queued behind it, so one slow transaction can cause a pile-up.
  • Table rewrites (changing a column type, some defaults on older versions) hold the lock while copying data.
  • Old and new application versions run together during a deploy, so the schema must work for both.
تفاصيل المخطط المبدئي

عرض عملي

a timeline: a long transaction holds a lock, ALTER TABLE waits, new queries queue behind the ALTER, and the API times out.

اختبر فهمك

Why does a waiting ALTER TABLE hurt even before it runs?

أظهر الإجابة

It queues in the lock queue and blocks everything behind it.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.