Categories
Uncategorized

How to configure unixODBC

You can connect custom-built shell script with any database using unixODBC an implementation of the Open Database Connectivity standard and I will show you how to do this for SQLite and PostgreSQL databases.

Categories
SysOps

How to reload PostgreSQL configuration

Today, I will describe how to cause PostgreSQL clusters to reload their configuration files using four simple methods.

Categories
SysOps

How to perform PostgreSQL point-in-time recovery

This blog post is an update to the earlier PostgreSQL entries in which I will show you how to use continuous Write Ahead Log archiving to take advantage of the point-in-time recovery.

Categories
Uncategorized

How to perform base PostgreSQL backup using pg_basebackup utility

I have already described a simple way to perform base PostgreSQL backup using file system utilities. Now I want to show you a different approach using pg_basebackup utility.

Categories
Uncategorized

How to perform base PostgreSQL backup using standard file system utilities

Today I want to show you how to perform base PostgreSQL backup using standard file system utilities. It is great example as it briefly describes basics required before moving to more advanced topics.

Categories
SysOps

How to perform action after SQL statement

Sometimes I want to monitor and log particular PostgreSQL statements or execute other kinds of external action.
I am using the notify mechanism and slightly modified sample application found in the database documentation to achieve this.

Categories
SysOps

How to pretty-print disk space used by PostgreSQL databases

I wrote a simple shell script to pretty-print disk space used by PostgreSQL databases while examining database object size functions. You can benefit from this too by inspecting used SQL statements.

Categories
Uncategorized

How to exclude data from certain tables during PostgreSQL backup

I often want to omit data from certain tables during PostgreSQL database backup. Today I will look into this and post my findings for further reference.

Categories
SysOps

How to inspect PostgreSQL queries

Sometimes I want to inspect and verify queries made by an application or hunt a bug that involves more complex queries. The essential part of this process requires altering PostgreSQL server configuration to log SQL statements.

Categories
SysOps

How to terminate PostgreSQL sessions

Recently, I have encountered an interesting issue, as I could not perform specific database operations due to unwanted and active sessions using the database. Thus, I will briefly note the solution for further reference.