RahimullahShaheen commented on issue #354:
URL: https://github.com/apache/age/issues/354#issuecomment-1523413491

   **Here is a summary of the first 3 chapters of "The Internals of 
PostgreSQL"**
   
   - Chap-1: Database Cluster, Databases, and Table
   
   The first chapter gives us overview about the logical and physical 
structures of a postgresql database cluster.
   
   The logical structure of a database cluster consists of databases, which are 
collections of database objects which are internally managed by respective 
object identifiers (OIDs) and is stored in system catalogs. The physical 
structure of database cluster is also described, with each database being a 
subdirectory under the base directory and in the subdirectories there are other 
files containing particular data and configuration file.
   
   The chapter also gives us information about layout of databases and files 
associated with tables and indexes in a postgresql database cluster and about 
tablespace. Tablespaces are additional data area outside the base directory to 
store data.
   
   The internal layout of Heap Table file is explained later in the chapter, 
which is data file divided into pages of fixed length which are numbered 
sequentially from 0 and these numbers are called as block numbers.
   Finally this chapter explains about the methods of writing and reading 
tuples which are record data and are stacked in order from the bottom of the 
page within a heap table file.
   
   - Chap-2: Process and Memory Architecture
   
   The second chapter discusses about the process and memory architecture. 
   A postgresql server contains multiple types of processes to manage database 
cluster which are as follow.
   The server process which is the parent of all processes is responsible for 
starting various background processes and backend processes.
   
   The backend process which is also known as postgres is used for handling 
queries issued by connected clients.
   
   The background process is used for performing various task related to 
database management like checkpoints, background writer etc.
   
   Finally the chapter explains about the Memory architecture. It is classified 
into 2 types, the local memory area is allocated by each backend processes for 
querying process and is further divided into several sub-areas whose sizes are 
either fixed or variable. The shared memory is allocated by the postgresql 
server which is also divided in to several fixed size sub-areas.
   
   - Chap-3: Query Processing
   
   The third chapter explains how queries issued by the connected client are 
handled by the backend process.
   
   The backend process consists of five subsystems which are discussed below.
   
   When a query is send to postgres first thing it does is to convert it into a 
structure known as parser tree that is more easier for other components to 
understand and it is done by the parser.
   The analyzer then figures out what the query is trying to do. The optimizer 
optimizes the query the best it can and based on the given query postgres might 
be capable to execute the query in multiple ways and the planner chooses the 
best way for the execution from the available ways. Then finally when the above 
steps are done the query is executed.
   Further more the chapter discuses the cost estimation of a single query 
which includes sort, startup and cost run.
   
   Finally, the 3 join methods supported by the postgresql which are nested 
loop, merge and has join, are slighted explained.
    
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to