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

النسخ المتماثل ونسخ القراءة

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

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

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

في هذا الدرس

understand streaming replication and its lag.

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

  • Streaming replication ships WAL from the primary to standbys, which replay it continuously.
  • Standbys can serve read-only queries (read replicas) and can be promoted on failure.
  • Asynchronous replication can lag; synchronous replication waits for the standby but adds write latency.
  • Reading your own write from a lagging replica returns stale data; route such reads to the primary or wait for the LSN.
  • Replication is not a backup: a bad DELETE replicates too.
تفاصيل المخطط المبدئي

عرض عملي

sql
-- on primary
SELECT client_addr, state, replay_lag FROM pg_stat_replication;

اختبر فهمك

Does a replica protect against an accidental DROP TABLE?

أظهر الإجابة

No; the change replicates.

التطبيق

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

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

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

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