No Image

How to Check Postgres Replication

June 11, 2018 0

Run the following command in Master Node: select application_name, state, sync_priority, sync_state from pg_stat_replication; You should see the below: application_name | state | sync_priority | […]

No Image

Postgres SQL, Conditions using CASE

April 9, 2018 0

The SQL CASE expression is a generic conditional expression, similar to if/else statements in other programming languages: CASE WHEN condition THEN result [WHEN …] [ELSE […]

No Image

Tuning Semaphore for Postgres

March 28, 2018 0

Edit the file sysctl.conf: vi /etc/sysctl.conf Add: kernel.sem = 250 512000 100 2048 For the settings to take effect, run: sysctl -p Tuning Semaphore will […]

No Image

Change Postgres Default Data Directory

March 15, 2018 0

Quick Guide: service postgresql stop or systemctl stop postgresql mkdir /home/data cp -rf /var/lib/pgsql/#version#/data /home/. chmod -R 700 /home/data chown -R postgres:postgres /home/data Edit: /home/data/postgresql.conf […]