No Picture
PostgreSQL Troubleshooting

PostgreSQL Maintenance Activities: How to Control Automatic Maintenance

In PostgreSQL, there are several automatic maintenance activities that occur to keep the database healthy and optimized. These activities include: auto vacuuming, auto analyzing, and auto checkpointing.  PostgreSQL Maintenance Activities While these automated processes are crucial for maintaining […]
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 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 […]
No Picture
PostgreSQL Internals

PostgreSQL Query Optimizer: Troubleshooting Unconsidered Hints

PostgreSQL’s query optimizer (or planner) creates optimal execution plans for SQL queries by evaluating multiple possible plans and selecting the fastest one. [^1] Understanding PostgreSQL’s Approach to Optimizer Hints PostgreSQL takes a deliberately cautious approach […]
No Picture
PostgreSQL Internals

How to have PostgreSQL execution plan with run-time?

PostgreSQL execution plan with run-time In PostgreSQL, you can obtain the execution plan with runtime information using the EXPLAIN (ANALYZE, VERBOSE) command. This command in particular, provides a detailed execution plan along with actual runtime […]