Skip to content
Home » Archives for David Zhang

David Zhang

Hello, this is David, one of the authors at Currently working as a software architect at Highgo Software Canada, I enjoy tinkering with software and have huge curiosity for all things tech. With over 15 years experience in software technology, please allow me to be your go-to guide for navigating this digital universe. Find more blogs from me at

ocsp stapling

Modernize PostgreSQL Certificate Revocation List with OCSP Stapling

The Online Certificate Status Protocol (OCSP) serves to real-time validate the status of a certificate, offering a much better alternative to the Certificate Revocation List (CRL). OCSP Stapling, utilized in SSL/TLS protocols, involves the server proactively transmitting a recent OCSP response alongside its certificate during the handshake. This enables the client to verify the certificate’s status without direct communication with the OCSP responder

Postgresql tls security

A Guide to Set up TLS Security in PostgreSQL

PostgreSQL is a robust open-source database management system, earning the distinction of DBMS of the Year 2023. Users choose PostgreSQL due to various reasons, such as SQL support, Query Optimization, and Reliability, etc. In this blog, I will guide you through the process of setting up a TLS connection between a PostgreSQL server and the psql client using self-signed certificates

Understanding Incremental Data Backup in pg_rman

Previously, we discussed how to perform a simple backup using pg_rman. As pg_rman can back up PostgreSQL at the physical file copy level, it is quite useful for daily database maintenance. Particularly, pg_rman supports incremental backup, which only backs up the changed data. In this blog, I will explain how incremental backup works in pg_rman. Firstly, all of this relies on the table and index page layout implemented in PostgreSQL. In PostgreSQL, each data page is laid out like this. The pageHeaderData has many attributes, and one of the most important attributes is pd_lsn, which is updated to the last… Read More »Understanding Incremental Data Backup in pg_rman

Restore PostgreSQL with pg_rman

We discussed a topic on how to create simple backups using pg_rman. In this blog post, we will demonstrate how to restore PostgreSQL using a backup generated by pg_rman. In continuation of the previous blog, let’s execute a simple query before simulating an error. Now, let’s insert some new records into the database. At this point, let’s consider the insertion of 2000 records as a mistake. Instead of correcting or deleting these records individually, we aim to roll back the entire database to the previous stage, i.e., before inserting the last 2000 records. Now, let’s start by checking our backup.… Read More »Restore PostgreSQL with pg_rman

in-memory postgresql database

A simple way to backup PostgreSQL with pg_rman

Introduction PostgreSQL, a powerful open-source relational database, is known for its robustness and extensibility. One critical aspect of database management is ensuring reliable backup and recovery processes. While PostgreSQL provides tools like pg_basebackup and WAL archiving for this purpose, there’s a powerful external tool called pg_rman that takes this process to the next level. In this blog post, we’ll explore what pg_rman is, how to perform a simple backup with pg_rman. What is pg_rman? pg_rman is an advanced backup and recovery manager designed specifically for PostgreSQL databases. Developed by the open source community, it provides a range of features to… Read More »A simple way to backup PostgreSQL with pg_rman