Date: Thu, 16 Feb 2023 03:39:22 GMT
<p>Creating a listener on the backend application that accepts connections is simple. You listen on an address-port pair, connection attempts to that address and port will get added to an accept queue; The application accepts connections from the queue and start reading the data stream sent on the connection.</p> <p>However, what part of your application does the accepting and what part does the reading and what part does the execution? You can architect your application in many ways based on your use cases. I have a medium post just exploring the different options.</p> <p>In this video I explore the PostgreSQL process architecture in details. Please note that the information here is derived from both the Postgres <a href="https://www.postgresql.org/docs/current/index.html"><u>doc</u></a> and <a href="https://github.com/postgres/postgres/tree/master/src/backend"><u>code</u></a>. Discussions about scalability and performance are solely based on my opinions.</p> <p>0:00 Intro</p> <p>1:30 Overview</p> <p>3:30 Postgres MVCC</p> <p>5:30 Processes vs Threads</p> <p>7:40 Postmaster Process</p> <p>8:00 Backend Processes</p> <p>13:30 Shared Buffers</p> <p>14:52 Background Workers</p> <p>17:18 Auxiliary Processes</p> <p>17:45 Background Writer</p> <p>22:30 Checkpointer</p> <p>23:40 Logger</p> <p>24:06 Autovacuum Launcher and Workers</p> <p>25:30 WAL Processes</p> <p>28:53 Startup Process</p> <p>Read full article</p> <p><a href="https://medium.com/@hnasr/postgresql-process-architecture-f21e16459907">https://medium.com/@hnasr/postgresql-process-architecture-f21e16459907</a></p>