Category: Hans-Juergen Schoenig
Hans-Jürgen Schönig has worked with PostgreSQL since the 90’s. He is the CEO and technical lead of CYBERTEC PostgreSQL International, a market leader in the field. He’s served countless customers around the globe since the year 2000. He is also the author of the well-received “Mastering PostgreSQL” book series, as well as several other books about PostgreSQL replication and administration.
Improving GROUP BY with CREATE STATISTICS
Analyzing time series often comes with challenges. This is especially true if you want to do a bit more than just run simple counts on values in a column. More often than not you’ll want to create a month’s report, a weekly overview and so on. This requires you to group on expressions rather than […]
JSON logs in PostgreSQL 15
As of version 15, PostgreSQL offers you the ability to write the server log in JSON format. This feature has been desired for a long time and has finally made it to PostgreSQL core. In this post we will discuss how JSON logs can be configured and what this brand new feature does for users. […]
Oracle to PostgreSQL migration cost assessment made easy
The CYBERTEC Migrator is a free tool that allows you to easily and quickly migrate from Oracle to PostgreSQL. The CYBERTEC Migrator container can be downloaded at no cost to you. It is a good way for people to move from Oracle to PostgreSQL as speedily as possible. And now, the latest release has a […]
Partition PostgreSQL: which partition did I INSERT my data into?
Partitioning is one of the most desired features of PostgreSQL, widely adopted by developers. This is not only true for in PostgreSQL 15, but also for older versions which did not provide as many features as the latest version of the database. That’s why you should know not only how to properly partition tables, but […]
PostgreSQL ERROR: permission denied for schema public
In PostgreSQL 15, a fundamental change took place which is relevant to every user who happens to work with permissions: The default permissions of the public schema have been modified. This is relevant because it might hurt you during application deployment. You need to be aware of how it may affect you. Creating users Many […]
btree vs. BRIN: 2 options for indexing in PostgreSQL data warehouses
Indexing is the key to good performance. However, people often ask: Is there an alternative to btree indexing? Can we make indexes in PostgreSQL smaller? Can we create indexes in PostgreSQL faster? And how can we index in a data warehouse? This blog will answer all those questions and show which options you have to […]
pgbouncer: Types of PostgreSQL connection pooling
pgbouncer is one of the most widely used tool for connection pooling. At CYBERTEC, we’ve successfully deployed it in many different situations. It has proven to be reliable as well as useful. Before we dive into different pooling modes and their implications, why do we need a connection pooler in the first place? The reason […]
VACUUM does not shrink my PostgreSQL table
Did you ever wonder why VACUUM does not make your PostgreSQL tables smaller? Did you ever wonder why VACUUM does not shrink data files? Well, maybe this is the article you have been looking for. The point is: usually, space is not returned to the operating system after a cleanup and it is important to […]
LISTEN / NOTIFY: Automatic client notification in PostgreSQL
What is LISTEN and NOTIFY? LISTEN / NOTIFY is a feature that enables users to listen to what goes on in the database. It is one of the oldest functionalities in PostgreSQL and is still widely used. The main question is: What is the purpose of the asynchronous query interface (LISTEN / NOTIFY), and what […]
PostgreSQL: Sequences vs. Invoice numbers
Sequences are a core feature of SQL. However, some users are tempted to implement sequences to generate invoices. That’s dangerous and should be avoided. The core question is: Why? What’s the problem with using database-side sequences to put unique invoice numbers to send to clients? Let’s dive in and find out. Getting started with CREATE […]
What is an inner join in SQL? And what is an outer join?
A join is a concept in IT which is widely used and often referred to but rarely really understood. What are the differences between inner joins, outer joins, semi joins and so on? Let’s shed some light on them and see how inner and outer joins really work. Producing sample data Before we can get […]
ERROR: nextval: reached maximum value of sequence
serial is a popular pseudo data type in PostgreSQL which is often used to generate auto-increment columns. However, this can lead to issues which are often underestimated. So what is the problem? Some of you might have already seen the following error message in real life: What happened here is that the underlying integer column […]