Skip to content

Database

Everything our consultants learn while running databases for customers: Oracle, PostgreSQL, SQL Server, MySQL, MariaDB, MongoDB and Delphix. Expect hands-on posts about installation, day-to-day administration, backup and recovery, performance tuning, replication and upgrades.

Enabling, disabling, and validating foreign key constraints in PostgreSQL

Constraints are in important concept in every realtional database system and they guarantee the correctness of your data. While constraints are essentials there are situations when it is required to disable or drop them temporarily. The reason could be performance related because it is faster to validate the constraints at once after a data load. The reason could also be,… 

A schema and a user are not the same in PostgreSQL

When people with an Oracle background attend our PostgreSQL DBA Essentials training there is always a bit of confusion about schemas and users. In Oracle a schema and a user is a one to one relationship and there is no real distinction between a user and a schema. In PostgreSQL the situation is different: All the objects a user is… 

Persistent Memory and first usage on Oracle Exadata platform

Todays fastest possible interface for flash storage in terms of bandwidth and latency are DRAM sockets. Exadata X8M is the first Oracle engineered system using this technology that, according to first measurements taken by Oracle corporation, result in 200% read IO increase compared to Exadata X8. Summary from a presentation by Gavin Parish held at DOAG 2019 conference with a… 

Deploying a MariaDB 10.4 Galera cluster with Clustercontrol

What is ClusterControl ? Since years, I’m using and installing by customers a management and automation software called “ClusterControl” from Severalnines (www.severalnines.com). With it, you can easily deploy, manage, monitor and scale your open source database servers or clusters (MariaDB, Percona, Postgres, Galera) from one GUI (Clustercontrol User Interface) on premise or even in the cloud. Some weeks ago, Severalnines… 

Fun with arrays in PostgreSQL

As you might already know, PostgreSQL comes with many, many data types. What you might not know is, that you can create arrays over all this data types quite easily. Is that important? Well, as always it depends on your requirements but there are use cases where arrays are great. As always, lets do some simple tests. The following will… 

A day of conferences with the Swiss Oracle User Group

Introduction I’m not that excited with all these events arround Oracle technologies (and beyond) but it’s always a good place to learn new things, and maybe the most important, discover new ways of thinking. And regarding this point, I was not disappointed. Franck Pachot: serverless and distributed database Franck talked about scaling out, it means avoid monoliths. Most of the… 

PostgreSQL 12 : Setting Up Streaming Replication

By Mouhamadou Diaw PostgreSQL 12 was released a few month ago. When actually setting up a replication, there is no longer recovery.conf file in the PGDATA. Indeed all parameters of the recovery.conf should be now in the postgresql.conf file. And in the cluster data directory of the standby server, therre should be a file named standby.signal to trigger the standby… 

Elapsed time of Oracle Parallel Executions are not shown correctly in AWR

As the elapsed time (time it takes for a task from start to end, often called wall-clock time) per execution of parallel queries are not shown correctly in AWR-reports, I thought I setup a testcase to find a way to get an elapsed time closer to reality. REMARK: To use AWR (Automatic Workload Repository) and ASH (Active Session History) as… 

Dealing with corrupted system indexes in PostgreSQL

This is something you do not want to see on an important PostgreSQL system: postgres@centos8pg:/home/postgres/ [pgdev] psql psql: error: could not connect to server: FATAL: index “pg_class_oid_index” contains unexpected zero page at block 0 HINT: Please REINDEX it. The hint is pretty clear on how you should fix this, but anyway, lets do a short demo on how to do… 

Some words about SOUG Day in Lausanne

Today I participate to SOUG Day which takes place in Lausanne at the “Centre Pluriculturel et social d’Ouchy”. After a coffee and a welcome speech by Yann Neushaus, Ludovico Caldara and Flora Barriele, the event starts with 2 global sessions: A l’heure du serverless, le futur va-t-il aller aux bases de données distribuées? Franck Pachot makes a comparison between Oracle… 

Can there be orphaned data files in PostgreSQL?

PostgreSQL, as all other relational database systems, needs to persist data on disk, either by writing the writing the write ahead log or by synchronization the data files on disk whenever there is a checkpoint. When it comes to the data files PostgreSQL creates a new one once a relation reaches segment_size, which is 1GB by default. Because of this… 

PostgreSQL 13 will allow to drop databases even when there are connections

One of the most popular blogs I’ve written about PostgreSQL was about the three databases that PostgreSQL creates by default (well, actually it is initdb that creates the databases). One of the points mentioned in that post was, that you can not drop a database as long as there are sessions against the database you want to drop. This will…