Skip to content

CHINESE-LANGUAGE FIELD GUIDE · PostgreSQL 18.6 · Pigsty v4.5.0

PostgreSQL 36 Stratagems

A 36-chapter path from writing SQL to delivering, operating, recovering, and continuously improving PostgreSQL in production.

This landing page is in English; the manuscript, labs, and detailed indexes are currently in Chinese.

Read the Chinese guide, safety rules, and lab contract

What the book is for

Turn database knowledge into evidence-backed engineering capability

PostgreSQL is the subject. Pigsty is the common lab environment, observation surface, and one production reference implementation.

This is not a catalogue of commands, parameters, or product features. The first volume moves from objects, modeling, queries, concurrency, and releases toward reliable application delivery. The second moves from deployment, HA, backup, observability, and capacity toward incident recovery and durable improvement.

Every chapter is expected to produce something reproducible, reviewable, or drillable. Platform claims return to PostgreSQL SQL, catalogs, logs, or component evidence; sample output is never presented as a version-free universal truth.

Six parts

From system foundations to recovery and improvement

Three parts for application engineering and three for operations, six chapters each.

01 · ch01–ch06

Foundations

Connection targets, object maps, relational modeling, transaction semantics, and delivery baselines.

Open this part

02 · ch07–ch12

Applications

Plans, statistics, indexes, concurrency control, and release discipline for dependable services.

Open this part

03 · ch13–ch18

Extensions

Where procedures, extensions, search, spatiotemporal, and analytical capabilities fit—and where they stop.

Open this part

04 · ch19–ch24

Planning

Derive deployment, HA, backup, access, and security from SLOs, failure domains, and recovery goals.

Open this part

05 · ch25–ch30

Operations

Observability, capacity baselines, resource governance, maintenance, migration, and upgrades.

Open this part

06 · ch31–ch36

Recovery

Scene preservation, PITR, failover, overload control, data forensics, and postmortem hardening.

Open this part

Operational indexes

A live problem should not require starting at Chapter 1

Five indexes map roles, tasks, capability boundaries, and symptoms to the formal chapters; the numbered contents locates every section and stable anchor.

Developer · DBA · Platform · Responder

Read by role

Find the core, supporting, and incident chapters adjacent to your responsibilities.

Open the Chinese index

Modeling · Release · Migration · Capacity

Find by task

Work backward from an engineering task to its concepts, labs, and acceptance checks.

Open the Chinese index

PostgreSQL · Platform · Pigsty

Capability boundaries

Separate native mechanisms, generic platform duties, and a concrete reference implementation.

Open the Chinese index

Preserve the scene before choosing a route

Incident symptoms and first safe actions

Route symptoms into PITR, HA, overload, or integrity work while naming the first prohibited action.

Open the Chinese index

Model · Query · Maintain · Migrate · Recover

Five partitioning touchpoints

Evaluate partitioning across the data lifecycle instead of reducing it to table syntax.

Open the Chinese index

36 chapters · 242 sections · 772 anchors

Complete numbered contents

Locate every chapter, standalone section page, and stable third-level anchor.

Open the Chinese index

Lab contract

A command succeeding proves only that the command succeeded

Every lab follows the same evidence chain:

  1. Goal and prerequisites — version, topology, credentials, data state, and acceptance criteria.
  2. Risk and stop line — R0–R3 distinguish observation, reversible change, fault injection, and destructive work.
  3. Action and evidence — SQL, configuration, logs, plans, timelines, and monitoring facts are kept together.
  4. Acceptance and reset — prove the result, state what cannot be generalized, and restore a usable environment.

PostgreSQL 18.6 and Pigsty v4.5.0 are the current reproducibility baseline. Other versions are called out where they matter.

Contents are for browsing; indexes are for solving; the guide keeps labs safe.Before Chapter 1, confirm the Chinese reader assumptions, safety rules, and disposable lab contract.