Blog Columns
Six thematic columns, each with its own dedicated RSS feed.
Database Guru
77posts
Database news, industry surveys, architecture, and best practices.
Cloud-Exiter
67posts
Cloud economics, repatriation, and building sovereign infrastructure.
Postgres Mage
130posts
PostgreSQL ecosystem, internals, extensions, and production tuning.
AI Agent Explorer
100posts
Practical engineering with coding agents, LLMs, AI4DB, and DB4AI.
Travel Notes
12posts
Trips, hikes, landscapes, and field notes across mountains and seas.
Miscellaneous
41posts
Essays, reflections, and personal writing inside and outside of tech.

PostgreSQL Common Replication Topology Plans
Replication is one of the core issues in system architecture.

Warm Standby: Using pg_receivewal
There are various backup strategies. Physical backups can usually be divided into four types.

Is running postgres in docker a good idea?
Thou shalt not run a prod database inside a container

The Sorrow of the Internet
The future may not necessarily be bright, but the path will certainly be tortuous.

Understanding Time - Leap Years, Leap Seconds, Time and Time Zones
A proper understanding of time is very helpful for correctly handling time-related issues in work and life. For example, time representation and processing in computers, as well as time handling in …

Incident-Report: Connection-Pool Contamination Caused by pg_dump
Sometimes, interactions between components manifest in subtle ways. For example, using pg_dump to export data from a connection pool can cause connection pool contamination issues.

New Year Reflections
The future is not necessarily bright, but the path is definitely winding. During this rare leisure time alone in the New Year, I write these random thoughts, writing wherever my mind wanders.

The Internet Winter
It was the best of times, it was the worst of times. We were all going direct to Heaven, we were all going direct the other way.

Knowledge of China's Administrative Divisions
Information about administrative division levels, numbers, the meaning of administrative division codes, urban-rural classification, etc.

PostgreSQL Data Page Corruption Repair
Using binary editing to repair PostgreSQL data pages, and how to make a primary key query return two records.

Understanding the Internet
The world trends flow mightily. Those who follow prosper; those who resist perish. This article discusses the essence of the internet, the world under internet rule, the transfer of power, and future …

Relation Bloat Monitoring and Management
PostgreSQL uses MVCC as its primary concurrency control technology. While it has many benefits, it also brings other effects, such as relation bloat.

Everest East Face: Gamma Gou Trekking
13-day journey with 8 days of trekking, completing the legendary hardcore route - Gamma Gou. Finally witnessed the most beautiful sunrise on Everest's east face.

TimescaleDB Quick Start
TimescaleDB is a PostgreSQL extension plugin that provides time-series database functionality.

Getting Started with PipelineDB
PipelineDB is a PostgreSQL extension for streaming analytics. Here’s how to install it and build continuous views over live data.

Incident-Report: PostgreSQL Transaction ID Wraparound
XID WrapAround is perhaps a unique type of failure specific to PostgreSQL

Incident-Report: Integer Overflow from Rapid Sequence Number Consumption
If you use Integer sequences on tables, you should consider potential overflow scenarios.

Several Levels of Learning Knowledge
Through observation and contemplation, we can divide the process of deepening understanding in the mind from accepting knowledge to the highest level of "intuition" into four stages: knowledge, …

PostgreSQL Trigger Usage Considerations
Detailed understanding of trigger management and usage in PostgreSQL

GeoIP Geographic Reverse Lookup Optimization
A common requirement in application development is GeoIP conversion - converting source IP addresses to geographic coordinates or administrative divisions (country-state-city-county-town-village)

Understanding Character Encoding Principles
Without understanding the basic principles of character encoding, even simple string operations like comparison, sorting, and random access can easily lead you into pitfalls. This article attempts to …

Understanding Character Encoding
Code is literally “encoding,” and everything collapses if you mishandle text. Here’s a practical tour of characters, glyphs, Unicode, and UTF encodings.

PostgreSQL Development Convention (2018 Edition)
Without rules, there can be no order. This article compiles a development specification for PostgreSQL database principles and features, which can reduce confusion encountered when using PostgreSQL.

Concurrency Anomalies Explained
Concurrent programs are hard to write correctly and even harder to write well. Many programmers simply throw these problems at the database... But even the most sophisticated databases won't help if …

PostgreSQL Common Replication Topology Plans
Replication is one of the core issues in system architecture.

Warm Standby: Using pg_receivewal
There are various backup strategies. Physical backups can usually be divided into four types.

Is running postgres in docker a good idea?
Thou shalt not run a prod database inside a container

The Sorrow of the Internet
The future may not necessarily be bright, but the path will certainly be tortuous.

Understanding Time - Leap Years, Leap Seconds, Time and Time Zones
A proper understanding of time is very helpful for correctly handling time-related issues in work and life. For example, time representation and processing in computers, as well as time handling in …

Incident-Report: Connection-Pool Contamination Caused by pg_dump
Sometimes, interactions between components manifest in subtle ways. For example, using pg_dump to export data from a connection pool can cause connection pool contamination issues.

New Year Reflections
The future is not necessarily bright, but the path is definitely winding. During this rare leisure time alone in the New Year, I write these random thoughts, writing wherever my mind wanders.

The Internet Winter
It was the best of times, it was the worst of times. We were all going direct to Heaven, we were all going direct the other way.

Knowledge of China's Administrative Divisions
Information about administrative division levels, numbers, the meaning of administrative division codes, urban-rural classification, etc.

PostgreSQL Data Page Corruption Repair
Using binary editing to repair PostgreSQL data pages, and how to make a primary key query return two records.

Understanding the Internet
The world trends flow mightily. Those who follow prosper; those who resist perish. This article discusses the essence of the internet, the world under internet rule, the transfer of power, and future …

Relation Bloat Monitoring and Management
PostgreSQL uses MVCC as its primary concurrency control technology. While it has many benefits, it also brings other effects, such as relation bloat.

Everest East Face: Gamma Gou Trekking
13-day journey with 8 days of trekking, completing the legendary hardcore route - Gamma Gou. Finally witnessed the most beautiful sunrise on Everest's east face.

TimescaleDB Quick Start
TimescaleDB is a PostgreSQL extension plugin that provides time-series database functionality.

Getting Started with PipelineDB
PipelineDB is a PostgreSQL extension for streaming analytics. Here’s how to install it and build continuous views over live data.

Incident-Report: PostgreSQL Transaction ID Wraparound
XID WrapAround is perhaps a unique type of failure specific to PostgreSQL

Incident-Report: Integer Overflow from Rapid Sequence Number Consumption
If you use Integer sequences on tables, you should consider potential overflow scenarios.

Several Levels of Learning Knowledge
Through observation and contemplation, we can divide the process of deepening understanding in the mind from accepting knowledge to the highest level of "intuition" into four stages: knowledge, …

PostgreSQL Trigger Usage Considerations
Detailed understanding of trigger management and usage in PostgreSQL

GeoIP Geographic Reverse Lookup Optimization
A common requirement in application development is GeoIP conversion - converting source IP addresses to geographic coordinates or administrative divisions (country-state-city-county-town-village)

Understanding Character Encoding Principles
Without understanding the basic principles of character encoding, even simple string operations like comparison, sorting, and random access can easily lead you into pitfalls. This article attempts to …

Understanding Character Encoding
Code is literally “encoding,” and everything collapses if you mishandle text. Here’s a practical tour of characters, glyphs, Unicode, and UTF encodings.

PostgreSQL Development Convention (2018 Edition)
Without rules, there can be no order. This article compiles a development specification for PostgreSQL database principles and features, which can reduce confusion encountered when using PostgreSQL.

Concurrency Anomalies Explained
Concurrent programs are hard to write correctly and even harder to write well. Many programmers simply throw these problems at the database... But even the most sophisticated databases won't help if …
PostgreSQL Common Replication Topology Plans

Replication is one of the core issues in system architecture. Cluster Topology Suppose we use a standard 4-unit configuration: primary, synchronous replica, delayed backup, and remote replica, identified by letters M, S, O, R respectively. M: Master, …
Replication is one of the core issues in system architecture. Cluster Topology Suppose we use a standard 4-unit configuration: primary, synchronous replica, delayed backup, and remote replica, identified by letters M, S, O, R respectively. M: Master, …
Warm Standby: Using pg_receivewal

Author: Vonng (@Vonng) Backup is the foundation of a DBA’s livelihood and one of the most critical tasks in database management. There are various types of backups, but the backups discussed here are all physical backups. Physical backups can …
Author: Vonng (@Vonng) Backup is the foundation of a DBA’s livelihood and one of the most critical tasks in database management. There are various types of backups, but the backups discussed here are all physical backups. Physical backups can …
Is running postgres in docker a good idea?

For stateless app services, containers are an almost perfect devops solution. However, for stateful services like databases, it’s not so straightforward. Whether production databases should be containerized remains controversial. From a developer’s …
For stateless app services, containers are an almost perfect devops solution. However, for stateful services like databases, it’s not so straightforward. Whether production databases should be containerized remains controversial. From a developer’s …
The Sorrow of the Internet

In Understanding the Internet, I discussed my views on the internet. Today, let’s talk about the part I deliberately omitted: the setbacks the internet will face. Destiny It was the best of times, it was the worst of times; It was the age of wisdom, …
In Understanding the Internet, I discussed my views on the internet. Today, let’s talk about the part I deliberately omitted: the setbacks the internet will face. Destiny It was the best of times, it was the worst of times; It was the age of wisdom, …
Understanding Time - Leap Years, Leap Seconds, Time and Time Zones

A few days ago, we encountered the quadrennial leap year February 29th. Every time this day comes around, some poorly written software experiences major failures. If you’re unlucky, this type of problem might take four years to surface. For example, …
A few days ago, we encountered the quadrennial leap year February 29th. Every time this day comes around, some poorly written software experiences major failures. If you’re unlucky, this type of problem might take four years to surface. For example, …
Incident-Report: Connection-Pool Contamination Caused by pg_dump

PostgreSQL is great, but that doesn’t mean it’s Bug-Free. This time in the production environment, I encountered another very interesting case: a production incident caused by pg_dump. This is a very subtle bug triggered by Pgbouncer, search_path, …
PostgreSQL is great, but that doesn’t mean it’s Bug-Free. This time in the production environment, I encountered another very interesting case: a production incident caused by pg_dump. This is a very subtle bug triggered by Pgbouncer, search_path, …
New Year Reflections

This article may cause discomfort. Please read with caution. During this rare leisure time alone in the New Year, I write these random thoughts, writing wherever my mind wanders. I’ve always believed that choice is more important than effort: a …
This article may cause discomfort. Please read with caution. During this rare leisure time alone in the New Year, I write these random thoughts, writing wherever my mind wanders. I’ve always believed that choice is more important than effort: a …
The Internet Winter

It was the best of times, it was the worst of times; It was the age of wisdom, it was the age of foolishness; It was the epoch of belief, it was the epoch of incredulity; It was the season of Light, it was the season of Darkness; It was the spring …
It was the best of times, it was the worst of times; It was the age of wisdom, it was the age of foolishness; It was the epoch of belief, it was the epoch of incredulity; It was the season of Light, it was the season of Darkness; It was the spring …
Knowledge of China's Administrative Divisions

China’s administrative divisions are divided into several levels. The constitution stipulates three levels, but there are actually five levels: the four-tier system of “province—region—county (district)—township,” which becomes five tiers when …
China’s administrative divisions are divided into several levels. The constitution stipulates three levels, but there are actually five levels: the four-tier system of “province—region—county (district)—township,” which becomes five tiers when …
PostgreSQL Data Page Corruption Repair

PostgreSQL is a very reliable database, but even the most reliable database will struggle when faced with unreliable hardware. This article introduces methods for dealing with data page corruption in PostgreSQL. The Initial Problem A statistics …
PostgreSQL is a very reliable database, but even the most reliable database will struggle when faced with unreliable hardware. This article introduces methods for dealing with data page corruption in PostgreSQL. The Initial Problem A statistics …
Understanding the Internet

I used to think that the essence of the internet, the development of the internet industry, and the strategies of internet companies—these “lofty” matters should be pondered by government officials and corporate executives. As an internet …
I used to think that the essence of the internet, the development of the internet industry, and the strategies of internet companies—these “lofty” matters should be pondered by government officials and corporate executives. As an internet …
Relation Bloat Monitoring and Management

Author: Vonng (@Vonng) PostgreSQL uses MVCC as its primary concurrency control technology. While it has many benefits, it also brings other effects, such as relation bloat. Relation bloat (table and index) negatively impacts database performance and …
Author: Vonng (@Vonng) PostgreSQL uses MVCC as its primary concurrency control technology. While it has many benefits, it also brings other effects, such as relation bloat. Relation bloat (table and index) negatively impacts database performance and …
Everest East Face: Gamma Gou Trekking

This year’s National Day holiday was perfect - taking six days off could connect Mid-Autumn Festival with National Day for a 16-day consecutive break. I’ve visited most of China’s provinces, but Tibet remained unexplored. Seeing a Gamma Gou/Everest …
This year’s National Day holiday was perfect - taking six days off could connect Mid-Autumn Festival with National Day for a 16-day consecutive break. I’ve visited most of China’s provinces, but Tibet remained unexplored. Seeing a Gamma Gou/Everest …
TimescaleDB Quick Start

Official website: https://www.timescale.com Official documentation: https://docs.timescale.com/v0.9/main Github: https://github.com/timescale/timescaledb Why Use TimescaleDB What is Time-Series Data? We keep talking about what “time-series data” is, …
Official website: https://www.timescale.com Official documentation: https://docs.timescale.com/v0.9/main Github: https://github.com/timescale/timescaledb Why Use TimescaleDB What is Time-Series Data? We keep talking about what “time-series data” is, …
Getting Started with PipelineDB

PipelineDB extends PostgreSQL with streaming primitives—continuous views over unbounded input. Although the upstream project was discontinued, the concepts remain useful. Install & configure PipelineDB ships as an extension. Install the RPM/DEB, then …
PipelineDB extends PostgreSQL with streaming primitives—continuous views over unbounded input. Although the upstream project was discontinued, the concepts remain useful. Install & configure PipelineDB ships as an extension. Install the RPM/DEB, then …
Incident-Report: PostgreSQL Transaction ID Wraparound

Encountered a transaction wraparound failure caused by disk bad blocks: Primary database (PostgreSQL 9.3) disk bad blocks caused VACUUM FREEZE execution failure on several tables. Unable to reclaim old transaction IDs, causing database transaction …
Encountered a transaction wraparound failure caused by disk bad blocks: Primary database (PostgreSQL 9.3) disk bad blocks caused VACUUM FREEZE execution failure on several tables. Unable to reclaim old transaction IDs, causing database transaction …
Incident-Report: Integer Overflow from Rapid Sequence Number Consumption

0x01 Overview Incident symptoms: A table using auto-increment columns had sequence numbers reach the integer limit, preventing writes. Discovered large gaps in auto-increment columns, with many sequence numbers consumed without corresponding records. …
0x01 Overview Incident symptoms: A table using auto-increment columns had sequence numbers reach the integer limit, preventing writes. Discovered large gaps in auto-increment columns, with many sequence numbers consumed without corresponding records. …
Several Levels of Learning Knowledge

Original WeChat Article Levels of Knowledge When we say “learning knowledge,” what exactly are we talking about? When we say someone is “smart,” what exactly do we mean? Through observation and contemplation, we can divide the process of deepening …
Original WeChat Article Levels of Knowledge When we say “learning knowledge,” what exactly are we talking about? When we say someone is “smart,” what exactly do we mean? Through observation and contemplation, we can divide the process of deepening …
PostgreSQL Trigger Usage Considerations

Overview Trigger behavior overview Trigger classification Trigger functionality Trigger types Trigger firing Trigger creation Trigger modification Trigger queries Trigger performance Trigger Overview Trigger behavior overview: English, Chinese …
Overview Trigger behavior overview Trigger classification Trigger functionality Trigger types Trigger firing Trigger creation Trigger modification Trigger queries Trigger performance Trigger Overview Trigger behavior overview: English, Chinese …
GeoIP Geographic Reverse Lookup Optimization

Efficient implementation of IP geolocation lookups In application development, a ‘very common’ requirement is GeoIP conversion - converting source IP addresses from requests into corresponding geographic coordinates or administrative divisions …
Efficient implementation of IP geolocation lookups In application development, a ‘very common’ requirement is GeoIP conversion - converting source IP addresses from requests into corresponding geographic coordinates or administrative divisions …
Understanding Character Encoding Principles

Programmers deal with Code (both programming code and encoding), and character encoding is the most fundamental type of encoding. The problem of how to represent characters using binary numbers - this character encoding problem is not as simple as it …
Programmers deal with Code (both programming code and encoding), and character encoding is the most fundamental type of encoding. The problem of how to represent characters using binary numbers - this character encoding problem is not as simple as it …
Understanding Character Encoding

WeChat original Programmers spend their lives with code—both source code and encodings. Representing text with bits is harder than it looks: character sets, comparators, normalization, locale rules, variable-length encodings, BOMs, surrogate pairs, …
WeChat original Programmers spend their lives with code—both source code and encodings. Representing text with bits is harder than it looks: character sets, comparators, normalization, locale rules, variable-length encodings, BOMs, surrogate pairs, …
PostgreSQL Development Convention (2018 Edition)

0x00 Background Without rules, there can be no order. PostgreSQL is extremely powerful, but to use PostgreSQL well requires coordinated effort from backend developers, operations teams, and DBAs. This article compiles a development specification …
0x00 Background Without rules, there can be no order. PostgreSQL is extremely powerful, but to use PostgreSQL well requires coordinated effort from backend developers, operations teams, and DBAs. This article compiles a development specification …
Concurrency Anomalies Explained

Concurrent programs are hard to write correctly and even harder to write well. Many programmers haven’t truly figured out these problems - they just dump them all on the database. Concurrency anomalies aren’t just theoretical problems: these …
Concurrent programs are hard to write correctly and even harder to write well. Many programmers haven’t truly figured out these problems - they just dump them all on the database. Concurrency anomalies aren’t just theoretical problems: these …