No Picture
PostgreSQL Performance

PostgreSQL Index Bloat: Analysis and Detection

Introduction: Index bloat can significantly impact the performance and storage efficiency of a PostgreSQL database. Therefore, to identify and understand the extent of index bloat, we can use the SQL query provided below. In this […]
No Picture
PostgreSQL Internals

How does PostgreSQL I/O Work?

In PostgreSQL, I/O (Input/Output) refers to the process of reading and writing data to and from storage devices, such as hard disks or SSDs. PostgreSQL manages I/O operations to efficiently store and retrieve data. Here’s […]
No Picture
PostgreSQL DBA

PostgreSQL Encryption-at-Rest: How to Implement It in Kubernetes

Implementing encryption-at-Rest for PostgreSQL in Kubernetes involves configuring encryption for the persistent storage where PostgreSQL data resides. Below is a step-by-step explanation of how to achieve this, along with a real-world example: apiVersion: apps/v1kind: Deploymentmetadata:name: […]
No Picture
PostgreSQL Performance

PostgreSQL Statistics: How to Gather Them Only When Stale

In PostgreSQL, you can gather statistics only when they become stale by using the pg_stat_statements extension along with the track_activity_query_size configuration parameter. Follow these steps to achieve this: CREATE EXTENSION pg_stat_statements; 3. Query the pg_stat_statements […]
No Picture
PostgreSQL Internals

PostgreSQL SQL Plans: Why They Change for the Worse

In PostgreSQL, several reasons can cause SQL statement plans to worsen over time. These changes may lead to decreased query performance and unexpected behavior. Below are some common factors that contribute to deteriorating SQL statement […]