Infrastructure at your Service

PostgreSQL Archives - Blog dbi services

Mouhamadou Diaw

PostgreSQL: When wal_level to logical

By | Database Administration & Monitoring, Postgres | No Comments

wal_level determines the quantity of information written to the WAL. With PostgreSQL 11 the parameter wal_level can have 3 values: -minimal : only information needed to recover from a crash or an immediate shutdown -replica : enough data to support WAL archiving and replication -logical : enough information to support logical decoding. If we want to use logical decoding, wal_level should be set to logical. Logical decoding is the process of extracting all persistent changes…

Read More
Daniel Westermann

Using Ansible to bring up a three node Patroni cluster in minutes

By | Database Administration & Monitoring | No Comments

Automation is key today, nobody wants to do the same tasks over and over and again. Cloud without automation is not even possible. There are several tools around that help with automation and one of the most popular is Ansible. We already have several posts about Ansible on our blog platform but this one will be rather long. Setting up PostgreSQL high available architectures is our daily business and we as well try to automate…

Read More
Mouhamadou Diaw

EDB Failover Manager 3.3 With Virtual Ip Address

By | Database Administration & Monitoring, Postgres | No Comments

In a previous blog , I talked about installing and configuring Edb Failover Manager with PostgreSQL. The configuration of a Virtual Ip Address was not discussed in this previous article.In this blog I am going to show how we can implement a virtual IP with EFM. We suppose that -The standby is already built -EFM is configured and running (see here for the configuration) Below our configuration ( Iam using PostgreSQL 11.1 with Centos 7)…

Read More
Mouhamadou Diaw

PAM Authentication With PostgreSQL

By | Database Administration & Monitoring, Postgres | No Comments

PostgreSQl supports many authentication methods. The PAM authentication method operates similarly to password except that it uses PAM (Pluggable Authentication Modules) as the authentication mechanism. The user must exist in the database before PAM can be used for authentication. In this blog I will configure PAM authentication for a PostgreSQL cluster 11 running on a centos 7. postgres=# select version(); version ——————————————————————————– ————————- PostgreSQL 11.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (R ed…

Read More
Mouhamadou Diaw

PostgreSQL : Get my database server name

By | Database Administration & Monitoring | No Comments

I was looking for a build-in function to get the hostname of the server hosting my PostgreSQL cluster. But seems that there is no build-in function. Looking in the extensions, I find the extension hostname which can allow to get the database server host name. In this this blog I am explaining how to install and how to use it. The installation is very easy. The first step is to download it here . After…

Read More
Daniel Westermann

PostgreSQL 12: log_statement_sample_rate

By | Database Administration & Monitoring | No Comments

A common way to identify long running queries in PostgreSQL is to set log_min_duration_statement to a value that is known to cause troubles. In other words: If you know most of your statements usually execute in under a second you could set log_min_duration_statement to “2s” (which means two seconds) so that whenever a statement takes longer than two seconds it will be reported in the log file. The issue with this however is, that this…

Read More