Infrastructure at your Service

PostgreSQL Archives - Page 2 of 20 - Blog dbi services

Daniel Westermann

Parallel pg_dump is slow by default?

By | Database Administration & Monitoring | No Comments

Short answer: Yes, it is. Being at a customer the last days we wanted to parallel pg_dump a 2TB database. We were quite surprised that it was quite slow and it was not immediately clear why it was. Well, the answer is in the documentation: When you go for parallel dumps you need to use the directory format and this comes with: “This format is compressed by default and also supports parallel dumps.”. Compression takes…

 
Read More
Daniel Westermann

Configuring huge pages for your PostgreSQL instance, RedHat/CentOS version

By | Database Administration & Monitoring | 2 Comments

Almost every PostgreSQL I get in touch with is not configured to use huge pages, which is quite a surprise as it can give you a performance boost. Actually it is not the PostgreSQL instance you need to configure but the operating system to provide that. PostgreSQL will use huge pages by default when they are configured and will fall back to normal pages otherwise. The parameter which controls that in PostgreSQL is huge_pages which…

 
Read More
Mouhamadou Diaw

Backup and Restore PostgreSQL with PgBackRest II

By | Database Administration & Monitoring | No Comments

In a precedent blog I shown a basic utilization of PgBackRest which is a tool to backup and restore PostgreSQL databases. In this blog I am going to talk some useful features of this tool. In practical examples we will see some tasks we can do with this tool. Of course the official documentation remains the best source of knowledges. Encryption Nowadays encryption of backups is very critical and is mandatory for many companies. PgBackRest…

 
Read More
Mouhamadou Diaw

Backup and Restore PostgreSQL with PgBackRest I

By | Database Administration & Monitoring | No Comments

Many tools can be used to backup PostgreSQL databases. In this blog I will talk about PgBackRest which is a simple tool that can be used to backup and restore a PostgreSQL database. Full, differential, and incremental backups are supported. In this first blog I will present a basic configuration of pgbackprest. Our configuration is composed of only one cluster and pgbackrest is installed on the server hosting the database. The goal is to explain…

 
Read More
Daniel Westermann

How we build our customized PostgreSQL Docker image

By | Database Administration & Monitoring | No Comments

Docker becomes more and more popular these days and a lot of companies start to really use it. At one project we decided to build our own customized Docker image instead of using the official PostgreSQL one. The main reason for that is that we wanted to compile from source so that we only get want is really required. Why having PostgreSQL compiled with tcl support when nobody will ever use that? Here is how…

 
Read More
Daniel Westermann

Does pg_upgrade in check mode raises a failure when the old cluster is running?

By | Database Administration & Monitoring | 2 Comments

Today I had the pleasure to have Bruce Momjian in my session about PostgreSQL Upgrade Best Practices at the IT Tage 2017 in Frankfurt. While browsing through the various options you have for upgrading there was one slide where I claimed that the old cluster needs to be down before you run pg_upgrade in check mode as you will hit a (non-critical) failure message otherwise. Lets see if that really is the case or I…

 
Read More