نظرة عامة على بنية PostgreSQL
استكشفوا البنية الداخلية لـ PostgreSQL، بما في ذلك العمليات وهياكل الذاكرة ومكوّنات التخزين.
نظرة عامة على بنية PostgreSQL درس مجاني في PostgreSQL Performance & Query Optimization على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في PostgreSQL Performance & Query Optimization، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة PostgreSQL Performance & Query Optimization 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
PostgreSQL's Inner Workings
To master PostgreSQL performance, you need its architecture — the processes, memory, and storage that work together to serve your data.
The Big Picture: Core Parts
PostgreSQL's architecture splits into three areas: processes that run the work, memory structures for fast access, and storage that persists data to disk.
Processes: The Postmaster
The Postmaster is PostgreSQL's central parent process. It listens for client connections and spawns a dedicated backend process for each one.
Processes: Backend Processes
Each connection gets its own backend process handling all of that client's queries — isolation so one client's work doesn't trip up another's.
Processes: Background Workers
Several background workers handle upkeep: the WAL Writer flushes the log, Autovacuum cleans dead tuples, and the Checkpointer writes dirty pages to disk.
Memory: Shared Buffers
Shared Buffers is the shared memory cache for frequently used disk blocks. Bigger cuts disk I/O, but too big wastes memory or triggers OS swapping. Check it below.
SHOW shared_buffers;Memory: Work Memory (work_mem)
work_mem is private memory per backend for sorting, hashing, and merging. Exceed it and the operation spills to disk, slowing the query. Check it below.
SHOW work_mem;Storage: Data Files & WAL
Every change hits the Write-Ahead Log (WAL) before the data files — that's what guarantees durability and crash recovery. The query below shows the current WAL LSN.
SELECT pg_current_wal_lsn();A Client's Journey
A query's journey: the Postmaster spawns a backend, which uses shared buffers and work_mem to process data, writes changes to the WAL, then returns results.
Architecture Quick Check
Which PostgreSQL process is responsible for listening for client connections and spawning new backend processes?
Recap: PostgreSQL's Core
Recap: PostgreSQL's architecture is processes (Postmaster, backends, workers), memory (shared buffers, work_mem), and storage (data files plus the WAL).
الأسئلة الشائعة
هل درس «نظرة عامة على بنية PostgreSQL» مجاني؟
نعم — نص درس «نظرة عامة على بنية PostgreSQL» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة PostgreSQL Performance & Query Optimization، انتقل إلى CoddyKit PRO. تتضمن دورة PostgreSQL Performance & Query Optimization 4 دروس في المجموع.
ماذا ستتعلم في «نظرة عامة على بنية PostgreSQL»؟
استكشفوا البنية الداخلية لـ PostgreSQL، بما في ذلك العمليات وهياكل الذاكرة ومكوّنات التخزين. تتمرن على PostgreSQL Performance & Query Optimization مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ PostgreSQL Performance & Query Optimization؟
لا تُشترط خبرة سابقة. PostgreSQL Performance & Query Optimization على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.
كم من الوقت يستغرق درس «نظرة عامة على بنية PostgreSQL»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس PostgreSQL Performance & Query Optimization هذا؟
نعم. كل درس في PostgreSQL Performance & Query Optimization يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- فهم أساسيات أداء قواعد البيانات
- نظرة عامة على بنية PostgreSQL
- سير عمل تنفيذ الاستعلام الأساسي
- قراءة مخرجات EXPLAIN وEXPLAIN ANALYZE