DEV Community

Saif Ali
Saif Ali

Posted on

1

Processes in PostgreSQL - Internal of PostgreSQL

PostgreSQL might be one of the most commonly used SQL Database in present. In rose in popularity for its convenient use, faster query execution and easy to understand syntax.

But...

Few know about the extremely complicated depths of this exciting database. In this article we will be focusing on different processes in PostgreSQL.

Overview

PostgreSQL follows a client/server mechanism, and has a multi-process architecture. There are different kinds of underlying processes running concurrently.

Different Processes in PostgreSQL

1. Server Process
This process is the parent of all running processes. It is the first to start, and it initiates all other process as its child processes.

  • Runs on default port 5432.
  • Initiates all other processes.
  • Referred as "postmaster" in previous versions.

2. Backend Process
Commonly referred as "postgres", this process handles all the queries and communication of connected clients.

  • You need to specify database to establish connection.
  • It is connects to clients by a single TCP connection.
  • Single process can work on only one database.

3. Background Process(es)
Each new function creates a separate background process of its own. There might be more than one background processes running at a single instance.

4. Replication Process
Replicating databases is quite common. Replication process is created on replicating your database.

  • This process is responsible for maintaining a consistency in all replicas of your database.

5. Worker Process(es)
These are user created processes that are responsible for one or more functionality in your database.

  • User can customize functionalities of these process as per need.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Postgres on Neon - Get the Free Plan

No credit card required. The database you love, on a serverless platform designed to help you build faster.

Get Postgres on Neon

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay