Posts

Showing posts from April, 2024

Secure PostgreSQL : Patroni, Etcd, Pgbackrest Included

Image
Step by step guide for securing your Postgresql Database Environment In today's world, keeping data secure is absolutely crucial. As companies depend more and more on databases to handle all sorts of sensitive information, making sure those databases are locked down tight is a top priority. Ensuring the overall security of PostgreSQL is a multifaceted task that involves implementing various measures to protect the database from potential threats. Many measures may be taken in every layer of the database environment. I will explain some in detail and summarize others in one sentence. Lets start with the database itself. Secure PostgreSQL Database: 1. Authentication and Authorization : Use RBAC (role based access control), different schemas for apps,  use advanced authentication methods like LDAP, Kerberos, and client certificate authentication. 2. Encryption :   Utilize encryption for both data in transit and data at rest. There are some encryption options in PostgreSQL but not at f

Speed up All Spatial Operations with SPATIAL_VECTOR_ACCELERATION parameter

Image
100's of times faster Spatial operators and functions Last week, I tried to diagnose an application problem which mostly consisted of queries related to spatial operators. When I delved into the issue, I discovered that the SPATIAL_VECTOR_ACCELERATION parameter was set to false on my mission-critical databases, despite the spatial component being used effectively. Although many bloggers had written about it, i was not aware of this parameter. So I wanted to draw everyone's attention to this parameter.   According to the Vector Performance Acceleration in Oracle Spatial and Graph (Doc ID 1506885.1) , In Oracle Database versions 12c and above, significant enhancements have been made to improve vector operations through the utilization of new vector performance acceleration capabilities. These enhancements lead to better index performance, increased efficiency of the geometry engine, optimized secondary filter optimizations for spatial operators, and enhanced CPU and memory util

How to Upgrade PostgreSQL, PostGIS and Patroni in Air-Gapped Environments

Image
Upgrade Your PostgreSQL Database: Major Steps and Minor Touches In this blog post, I will show how a complete PostgreSQL environment major update can be done. Minor upgrades are not a tough task; they are no different from a standard Linux package upgrade. As my production environment serves in an airgapped-environment, I will complete all the major upgrade with no internet connection. I've downloaded all the required whl and .rpm packages before upgrade. Before starting, A short description of major and minor Postgresql upgrades are provided below: Major Upgrade: Upgrading PostgreSQL to a new major version, such as moving from 10 to 11 or 12 to 13. Major upgrades bring significant changes, introduce new features, and may require thorough testing and planning due to potential incompatibilities. Minor Upgrade: Updating PostgreSQL to a newer minor version within the same major release, like going from 13.1 to 13.2 or 12.5 to 12.6. Minor upgrades focus on bug fixes, security patches,