Tag: postgresql

Enterprise PostgreSQL Solutions

Deciphering PostgreSQL Encryption: A Beginner’s Guide

Introduction In this blog, we’ll go over the different methods we can use to encrypt and decrypt data in a PostgreSQL database. Having some experience with Linux and PostgreSQL is necessary, while experience with encryption is not but is nice to have. This blog was written using PostgreSQL 16 running on Ubuntu 23.04. First I’ll…
Read more

JSON in PostgreSQL: Revolutionizing Data Flexibility in Your Database

Introduction In this blog, we’ll go over PostgreSQL’s implementation and handling of JSON objects. Having some experience with Linux, Postgres, and JSON is necessary as we’ll not only be going over these new features but also how to implement them. This blog was written using PostgreSQL 16 (Development Version) running on Ubuntu 23.04. First I’ll…
Read more

New in PostgreSQL 16: Bi-Directional Logical Replication

Introduction In this blog, we’ll be going over some more advanced topics new in Postgres 16. Having some experience with Linux, Postgres, and SQL is necessary as we’ll not only be going over these new features but also how to implement them. This blog was written using PostgreSQL 16 (Development Version) running on Ubuntu 23.04.…
Read more

Managing PostgreSQL Like a Pro: A Kubernetes-based pgAdmin Tutorial

Introduction This blog is aimed at beginners trying to learn the basics of PostgreSQL, pgAdmin and Kubernetes but already have some experience under their belt. For this tutorial, we will assume you have PostgreSQL correctly installed on Ubuntu. All of these steps were done using PostgreSQL 16 (development version), minikube v1.26.3 as the Kubernetes implementation,…
Read more

Getting Started with Psycopg2: Python’s PostgreSQL Adapter

Introduction This blog is aimed at beginners trying to learn the basics of PostgreSQL and Python but already have some experience under their belt. For this tutorial, we will assume you have PostgreSQL correctly installed on Ubuntu. All of these steps were done using PostgreSQL 16 (development version) and Python 3.11.4 on Ubuntu 23.04. We’ll…
Read more

PostgreSQL Load Balancing Made Easy: A Deep Dive into pgpool

Introduction This blog is aimed at beginners trying to learn the basics of PostgreSQL and PGPool but already have some experience under their belt. For this tutorial, we will assume you have PostgreSQL correctly installed on Ubuntu. All of these steps were done using PostgreSQL 16 (development version) and PGPool 4.4.3 on Ubuntu 23.04. We’ll…
Read more

Balancing Act: Achieving High Availability with HAProxy for PostgreSQL

Introduction This blog is aimed at beginners trying to learn the basics of PostgreSQL and HAProxy but already have some experience under their belt. For this tutorial, we will assume you have PostgreSQL correctly installed on Ubuntu. All of these steps were done using PostgreSQL 16 (development version) and HAProxy 2.6.9 on Ubuntu 23.04. We’ll…
Read more

New Module Initialization vs Bootstrap in PostgreSQL

1.0 Introduction In the last couple weeks, I have been preparing a training material for PostgreSQL developers. One of the sections explains the basic principles on how to add a custom module to PostgreSQL backend. In addition to writing code logics for this new module, there are several things you need to be aware of…
Read more

Putting Postgres to the Test: How to Create and Run Regression and TAP Tests

Introduction This blog is aimed at beginners trying to learn the basics of PostgreSQL but already have some experience under their belt. For this tutorial, we will assume you have PostgreSQL correctly installed on Ubuntu. All of these steps were done using PostgreSQL 16 (development version) and Ubuntu 23.04. We’ll go over 3 different but…
Read more

Building PostgreSQL in a Modern Way – With Meson

1.0 Introduction Starting in PostgreSQL 16, we will have an option to build PostgreSQL software using a modern build system, meson, in addition to the traditional ./configure and Makefile. I started practicing meson when I was working on a community patch a few weeks ago for PostgreSQL, where I have been told to update the…
Read more

Using NGINX as a PostgreSQL Reverse Proxy and Load Balancer

Introduction This blog will go over the use cases of setting up NGINX (Engine X) as both a reverse proxy and load balancer for PostgreSQL. NGINX is an excellent feature-rich and open-source project that can help make an application more cohesive. It does this by exposing a single port to the user and proxy requests…
Read more

Various Restoration Techniques Using PostgreSQL Point-In-Time Recovery

Introduction This blog is aimed at beginners trying to learn the basics of PostgreSQL but already have some experience under their belt. For this tutorial, we will assume you have PostgreSQL correctly installed on Ubuntu. All of these steps were done using PostgreSQL 16 (development version) and Ubuntu 22.10. We’ll go over 3 different restoration…
Read more

Setting Up PostgreSQL Failover and Failback, the Right Way!

Introduction This blog was written to help beginners understand and set up server replication in PostgreSQL using failover and failback. Much of the information found online about this topic, while detailed, is out of date. Many changes have been made to how failover and failback are configured in recent versions of PostgreSQL. In this blog,…
Read more

Setting Up a PostgreSQL Replica Server Locally

Getting Started This blog is aimed at beginners who want to practice the fundamentals of database replication in PostgreSQL but who might not have access to a remote server. I believe it is essential when learning a new technology to go through examples on one’s own machine in order to solidify concepts. This can be…
Read more

Upcoming feature in PostgreSQL 15 – MERGE statement

The MERGE statement is one of the long awaited features and it’s coming in the upcoming Major version of PostgreSQL 15. Although the PostgreSQL 15 release is quite a distance away, the MERGE statement patch has been committed to the development branch and it should become available as early as beta release around May, 2022.…
Read more

PostgreSQL 14 Continuous archiving and Point In Time Recovery

1. Introduction Recently I have been practicing the internals of PostgreSQL continuous archiving and the point in time recovery features that are required for my current development work. Today I would like to demonstrate these important features with the recently released PostgreSQL 14 on Ubuntu 18.04. 2. Write Ahead Log? Before going into the details…
Read more

Implement Foreign Scan With FDW Interface API

1. Introduction Recently I have been tasked to familiarize myself with the Foreign Data Wrapper (FDW) interface API to build a new FDW capable of doing vertical / columnar sharding, meaning that the FDW is capable of collecting column information from multiple sources and combine them together as a result query. I will document and…
Read more

Horizontal Scalability Options in PostgreSQL

So for one reason or another you have decided that you need horizontal scalability and you need to achieve it with PostgreSQL as your database. So what options do you have? The PostgreSQL database supports vertical scalability and can run on bigger and faster machines to increase the performance. But when it comes to horizontal…
Read more

Understanding the Security Around PostgreSQL

1. What Is Security? The word “Security” is a very broad concept and could refer to completely different procedures and methodology to achieve. Knowing what security means to your application is very important, so you could execute proper security practices and procedures to ensure the safety of your company’s assets. Data compromises could often lead…
Read more

Using GDB To Trace Into a Parallel Worker Spawned By Postmaster During a Large Query

1. Introduction I am working on a new PostgreSQL feature that redefines the way a tuple’s visibility status is determined. The feature is working very nicely until I start doing a large SELECT query, which triggers PostgreSQL to spawn multiple parallel workers to process the request. When this happens, the feature I am working on…
Read more