Infrastructure at your Service

All Posts By

Daniel Westermann

Daniel Westermann

Why is the default postgres database slightly larger than template1?

By | Database Administration & Monitoring | No Comments

You probably know that a fresh initialized PostgreSQL cluster comes with three databases by default: template0, template1, and postgres. If you want to know why they are there, and what their purpose is, check this post. In this post we’ll look at something you may never have noticed: Why is the postgres database, even after a fresh initdb, slightly larger than template1 and template0?

Read More
Daniel Westermann

Getting started with Citus – Setting up a four node cluster

By | AWS, Database Administration & Monitoring | No Comments

One issue with traditional database systems like PostgreSQL is, that you cannot easily scale vertically. Of course you could add read replicas and offload read operations, but that either requires changes in the application, or putting something in front that understands the PostgreSQL dialect and automatically routes writes to the primary and spreads reads across one or more replicas (e.g. pgpool-II). But even if you have something in place, you need to deal with replications…

Read More
Daniel Westermann

PostgreSQL: set_config and current_setting

By | Database Administration & Monitoring | No Comments

PostgreSQL comes with a rich set of administrative functions for various use cases. There are functions to control parameters, there are functions for index maintenance, others are for recovery and or backup control and there is much more. In this post we’ll look at how you can use the build-in functions to set and get parameters without touching the configuration file (or setting parameters at the cluster, database and user level). In the posts that…

Read More
Daniel Westermann

Building a PostgreSQL EC2 AMI for testing the latest commits

By | AWS, Database Administration & Monitoring | No Comments

Testing the latest features or bug fixes in PostgreSQL can easily be done by pulling the latest commits from the git repository and compile PostgreSQL from source code. I am doing that frequently on my local sandbox VM but this becomes limited when I need more CPUs or more memory. This is where the public cloud really shines, as you can easily deploy new VMs, do your tests and get rid of it afterwards with…

Read More
Daniel Westermann

temBoard on SLES15 – 2 – The agent

By | Database Administration & Monitoring | No Comments

In the last post we’ve installed the temBoard repository and the UI. As this alone is not so much fun, we’ll be installing the temBoard agent on another SLES 15 machine in this post. We’ll end up with one PostgreSQL instance registered in the temBoard repository and this instance is constantly monitored. With the repository and the UI we had the requirement to use Python 2.7, but this is not anymore required for the temBoard…

Read More
Daniel Westermann

temBoard on SLES15 – 1 – The WebUI

By | Database Administration & Monitoring | No Comments

During our last SwissPUG online meeting there was a presentation about monitoring PostgreSQL with temBoard. A question that came up afterwards was: How to install that on SLES 15 as there are only packages for Debian and CentOS/RHEL. As temBoard is written in Python you can also install it using pip. That requires a bit more work compared to the package method, but it is perfectly fine. The only downside (but this is true for…

Read More
Daniel Westermann

PostgreSQL 14: LZ4 compression for TOAST

By | Database Administration & Monitoring | No Comments

In PostgreSQL a row or tuple can not span multiple pages (a page is typically 8kB), but of course you can store larger rows and PostgreSQL brakes and compresses these rows into smaller chunks by using a technique called TOAST. Once your table contains a toast-able data type a so-called toast table is created automatically. Up to PostgreSQL 13 you had no choice how the data is compressed, but a recent commit brings the option…

Read More
Daniel Westermann

Getting started with the Zalando Operator for PostgreSQL

By | Database Administration & Monitoring | No Comments

In the previous posts (Rancher, up and running, on EC2 – 1 – One node, Rancher, up and running, on EC2 – 2 – Three nodes, Rancher, up and running, on EC2 – 3 – Rancher setup, Rancher on SLES 15 as a demo environment, and Deploying a Kubernetes cluster on EC2 with Rancher) it was all about deploying a Kubernetes cluster and getting Rancher up and running. In this post we’ll use one of…

Read More
Daniel Westermann

Deploying a Kubernetes cluster on EC2 with Rancher

By | AWS, Cloud, DevOps, Docker, Kubernetes | 2 Comments

Once Rancher is up and running, it makes the deployment and management of Kubernetes clusters quite easy. In this post we’ll deploy a brand new cluster on top of EC2. If you want to have a simple and quick Rancher playground you can follow this post, which will give you a Rancher setup on SLES 15. If you want to have a more production like Rancher setup, you can follow these posts: Rancher, up and…

Read More