Tag Archives: oracle dba

Types of Shutdown in PostgreSQL

Types of Shutdown in PostgreSQL

PostgreSQL Shutdown TypeOracleBehavior
Smart (SIGTERM)SHUTDOWN NORMALThe server stops accepting new connections but allows existing sessions to continue running normally. PostgreSQL shuts down only after all active sessions disconnect and their transactions complete successfully.
Fast (SIGINT – Default)SHUTDOWN IMMEDIATEThe server stops accepting new connections and immediately terminates all active sessions. Any uncommitted transactions are rolled back, and PostgreSQL performs a clean shutdown gracefully.
Immediate (SIGQUIT)SHUTDOWN ABORTThe server terminates all processes instantly without performing a proper shutdown. No cleanup or checkpoint occurs, so PostgreSQL performs crash recovery by replaying WAL files during the next startup.
Shutdown TypeSignalCommand ExampleBehavior
SmartSIGTERMpg_ctl stop -D /pgData -m smartStops new connections, waits for existing sessions to finish normally, then shuts down.
Fast (Default)SIGINTpg_ctl stop -D /pgdata -m fastStops new connections, terminates active sessions, rolls back uncommitted transactions, and shuts down cleanly.
ImmediateSIGQUITpg_ctl stop -D /pgdata -m immediateStops immediately without proper shutdown. Recovery from WAL files happens during next startup.

Difference Between Reload and Restart

  • When we change server configuration parameters, PostgreSQL needs to read those changes before they become active.
  • Reload applies the new configuration without stopping or restarting the database service. Existing connections and database activity continue normally.
  • Some configuration parameter changes cannot be applied through reload and will only take effect after a restart.
  • Restart stops the PostgreSQL server gracefully, ends all running activities, releases resources, closes open files, and then starts the server again with the new configuration.

 

Smart Shutdown (SIGTERM):

[postgres@pgdb02 ~]$ pg_ctl stop -D /pgData/pgsql17/data -m smart
waiting for server to shut down.... done
server stopped
[postgres@pgdb02 ~]$

2026-07-03 14:26:59.741 +08 [3476] LOG:  received smart shutdown request
2026-07-03 14:26:59.752 +08 [3476] LOG:  background worker "logical replication launcher" (PID 3483) exited with exit code 1
2026-07-03 14:26:59.753 +08 [3478] LOG:  shutting down
2026-07-03 14:26:59.755 +08 [3478] LOG:  checkpoint starting: shutdown immediate
2026-07-03 14:26:59.765 +08 [3478] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.003 s, total=0.012 s; sync files=2, longest=0.003 s, average=0.002 s; distance=0 kB, estimate=0 kB; lsn=1/105465F0, redo lsn=1/105465F0
2026-07-03 14:26:59.771 +08 [3476] LOG:  database system is shut down


[postgres@pgdb02 ~]$ pg_ctl start -D /pgData/pgsql17/data
waiting for server to start....2026-07-03 14:27:18.394 +08 [3487] LOG:  redirecting log output to logging collector process
2026-07-03 14:27:18.394 +08 [3487] HINT:  Future log output will appear in directory "log".
 done
server started
[postgres@pgdb02 ~]$

2026-07-03 14:27:18.394 +08 [3487] LOG:  starting PostgreSQL 17.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-14), 64-bit
2026-07-03 14:27:18.396 +08 [3487] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2026-07-03 14:27:18.396 +08 [3487] LOG:  listening on IPv6 address "::", port 5432
2026-07-03 14:27:18.399 +08 [3487] LOG:  listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2026-07-03 14:27:18.404 +08 [3487] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2026-07-03 14:27:18.413 +08 [3491] LOG:  database system was shut down at 2026-07-03 14:26:59 +08
2026-07-03 14:27:18.425 +08 [3487] LOG:  database system is ready to accept connections

Fast Shutdown (SIGINT – Default):

[postgres@pgdb02 ~]$ pg_ctl stop -D /pgData/pgsql17/data -m fast
waiting for server to shut down.... done
server stopped
[postgres@pgdb02 ~]$

2026-07-03 14:28:26.839 +08 [3487] LOG:  received fast shutdown request
2026-07-03 14:28:26.844 +08 [3487] LOG:  aborting any active transactions
2026-07-03 14:28:26.854 +08 [3487] LOG:  background worker "logical replication launcher" (PID 3494) exited with exit code 1
2026-07-03 14:28:26.860 +08 [3489] LOG:  shutting down
2026-07-03 14:28:26.862 +08 [3489] LOG:  checkpoint starting: shutdown immediate
2026-07-03 14:28:26.874 +08 [3489] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.005 s, total=0.015 s; sync files=2, longest=0.004 s, average=0.003 s; distance=0 kB, estimate=0 kB; lsn=1/105466A0, redo lsn=1/105466A0
2026-07-03 14:28:26.882 +08 [3487] LOG:  database system is shut down

[postgres@pgdb02 ~]$ pg_ctl start -D /pgData/pgsql17/data
waiting for server to start....2026-07-03 14:29:00.574 +08 [3505] LOG:  redirecting log output to logging collector process
2026-07-03 14:29:00.574 +08 [3505] HINT:  Future log output will appear in directory "log".
 done
server started
[postgres@pgdb02 ~]$

2026-07-03 14:29:00.575 +08 [3505] LOG:  starting PostgreSQL 17.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-14), 64-bit
2026-07-03 14:29:00.579 +08 [3505] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2026-07-03 14:29:00.580 +08 [3505] LOG:  listening on IPv6 address "::", port 5432
2026-07-03 14:29:00.582 +08 [3505] LOG:  listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2026-07-03 14:29:00.587 +08 [3505] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2026-07-03 14:29:00.595 +08 [3509] LOG:  database system was shut down at 2026-07-03 14:28:26 +08
2026-07-03 14:29:00.607 +08 [3505] LOG:  database system is ready to accept connections

Immediate Shutdown (SIGQUIT):

[postgres@pgdb02 ~]$ pg_ctl stop -D /pgData/pgsql17/data -m immediate
waiting for server to shut down.... done
server stopped
[postgres@pgdb02 ~]$

2026-07-03 14:29:47.471 +08 [3505] LOG:  received immediate shutdown request
2026-07-03 14:29:47.485 +08 [3505] LOG:  database system is shut down


[postgres@pgdb02 ~]$ pg_ctl start -D /pgData/pgsql17/data
waiting for server to start....2026-07-03 14:30:17.965 +08 [3520] LOG:  redirecting log output to logging collector process
2026-07-03 14:30:17.965 +08 [3520] HINT:  Future log output will appear in directory "log".
. done
server started
[postgres@pgdb02 ~]$

2026-07-03 14:30:17.966 +08 [3520] LOG:  starting PostgreSQL 17.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-14), 64-bit
2026-07-03 14:30:17.966 +08 [3520] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2026-07-03 14:30:17.966 +08 [3520] LOG:  listening on IPv6 address "::", port 5432
2026-07-03 14:30:17.970 +08 [3520] LOG:  listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2026-07-03 14:30:17.974 +08 [3520] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2026-07-03 14:30:17.983 +08 [3524] LOG:  database system was interrupted; last known up at 2026-07-03 14:29:00 +08
2026-07-03 14:30:19.211 +08 [3524] LOG:  database system was not properly shut down; automatic recovery in progress
2026-07-03 14:30:19.216 +08 [3524] LOG:  redo starts at 1/10546718
2026-07-03 14:30:19.216 +08 [3524] LOG:  invalid record length at 1/10546750: expected at least 24, got 0
2026-07-03 14:30:19.217 +08 [3524] LOG:  redo done at 1/10546718 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2026-07-03 14:30:19.221 +08 [3522] LOG:  checkpoint starting: end-of-recovery immediate wait
2026-07-03 14:30:19.231 +08 [3522] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.003 s, total=0.012 s; sync files=2, longest=0.002 s, average=0.002 s; distance=0 kB, estimate=0 kB; lsn=1/10546750, redo lsn=1/10546750
2026-07-03 14:30:19.239 +08 [3520] LOG:  database system is ready to accept connections

Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

Thank you,
Rajasekhar Amudala
Email: br8dba@gmail.com
Linkedin: https://www.linkedin.com/in/rajasekhar-amudala/

Install Oracle AI Database 26ai

Install Oracle AI Database 26ai (23.26.1) for Linux x86-64

Pre-requisites already been taken care like memory, swap, kernel parameters, add groups, profile and users…etc

Table of Contents

___________________________________________________________________________________________________

1. Hardware Requirements
2. Verify OS version
3. Download 19c db software
4. Oracle Installation Prerequisites
5. Unzip
6. Invoke ./runInstaller
7. Verify
___________________________________________________________________________________________________


1. Hardware Requirements

The first thing we need to verify the hardware requirements

β€” Check Physical RAM.

[root@lxicborasgv01 ~]# grep MemTotal /proc/meminfo
MemTotal:       17516840 kB
[root@lxicborasgv01 ~]#


β€” Check Swap Space.

[root@lxicborasgv01 ~]# grep SwapTotal /proc/meminfo
SwapTotal:       8253436 kB
[root@lxicborasgv01 ~]#

-– Check space available in /tmp

[root@lxicborasgv01 ~]# df -h /tmp
Filesystem              Size  Used Avail Use% Mounted on
/dev/mapper/ol_10-root   62G  7.2G   54G  12% /
[root@lxicborasgv01 ~]#


-– Check space for Oracle Software and pre-configured database.

[root@lxicborasgv01 ~]# df -h /u01
Filesystem              Size  Used Avail Use% Mounted on
/dev/mapper/ol_10-home   30G  246M   30G   1% /u01
[root@lxicborasgv01 ~]#


β€”- Check CPU 

[root@lxicborasgv01 ~]# lscpu | grep -i "CPU(s):" | head -n 1
CPU(s):                                  4
[root@lxicborasgv01 ~]#


2. Verify OS version

[root@lxicborasgv01 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 9.6 (Plow)
[root@lxicborasgv01 ~]#

[root@lxicborasgv01 ~]# cat /etc/hosts | grep -i lxicborasgv01
192.168.2.52 lxicborasgv01
[root@lxicborasgv01 ~]#


3. Download Software

Download the Oracle software from OTN or MY ORACLE SUPPORT (MOS).

https://www.oracle.com/database/technologies/oracle26ai-linux-downloads.html


4. Oracle Installation Prerequisites

[root@lxicborasgv01 ~]# dnf install -y oracle-ai-database-preinstall-26ai
Last metadata expiration check: 0:44:40 ago on Wed 28 Jan 2026 06:14:51 PM.
Dependencies resolved.
==============================================================================================================================================================================================================
 Package                                                           Architecture                          Version                                           Repository                                    Size
==============================================================================================================================================================================================================
Installing:
 oracle-ai-database-preinstall-26ai                                x86_64                                1.0-1.el9                                         ol9_appstream                                 34 k
Installing dependencies:
 compat-openssl11                                                  x86_64                                1:1.1.1k-5.el9_6.1                                ol9_appstream                                1.5 M

Transaction Summary
==============================================================================================================================================================================================================
Install  2 Packages

Total download size: 1.5 M
Installed size: 3.8 M
Downloading Packages:
(1/2): oracle-ai-database-preinstall-26ai-1.0-1.el9.x86_64.rpm                                                                                                                295 kB/s |  34 kB     00:00
(2/2): compat-openssl11-1.1.1k-5.el9_6.1.x86_64.rpm                                                                                                                           3.4 MB/s | 1.5 MB     00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                         3.4 MB/s | 1.5 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                      1/1
  Installing       : compat-openssl11-1:1.1.1k-5.el9_6.1.x86_64                                                                                                                                           1/2
  Installing       : oracle-ai-database-preinstall-26ai-1.0-1.el9.x86_64                                                                                                                                  2/2
  Running scriptlet: oracle-ai-database-preinstall-26ai-1.0-1.el9.x86_64                                                                                                                                  2/2
  Verifying        : compat-openssl11-1:1.1.1k-5.el9_6.1.x86_64                                                                                                                                           1/2
  Verifying        : oracle-ai-database-preinstall-26ai-1.0-1.el9.x86_64                                                                                                                                  2/2

Installed:
  compat-openssl11-1:1.1.1k-5.el9_6.1.x86_64                                                        oracle-ai-database-preinstall-26ai-1.0-1.el9.x86_64

Complete!
[root@lxicborasgv01 ~]#

[root@lxicborasgv01 ~]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
[root@lxicborasgv01 ~]#


5. Unzip Software


NOTE: During installation using OUI, you cannot manually edit the Oracle Home location. The installer automatically detects the ORACLE_HOME from the directory where the database binaries are unzipped. Therefore, make sure to unzip the binaries directly inside the intended ORACLE_HOME directory before running ./runInstaller.

Also note that after unzipping, the files will not be placed under a single directory as in Oracle 10g, 11g, and 12c.

[root@lxicborasgv01 ~]# mkdir -p /u01/app/oracle/product/23.26.1/dbhome_1
[root@lxicborasgv01 ~]# chown -R oracle:oinstall /u01
[root@lxicborasgv01 ~]# chmod -R 775 /u01
[root@lxicborasgv01 ~]#

[root@lxicborasgv01 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@lxicborasgv01 ~]#

[oracle@lxicborasgv01 ~]$ cd /u01/app/oracle/product/23.26.1/dbhome_1/
[oracle@lxicborasgv01 dbhome_1]$ ls -ltr
total 2349668
-rw-r--r--. 1 oracle oinstall 2406058543 Jan 28 12:25 LINUX.X64_2326100_db_home.zip
[oracle@lxicborasgv01 dbhome_1]$

[oracle@lxicborasgv01 dbhome_1]$ unzip LINUX.X64_2326100_db_home.zip
Archive:  LINUX.X64_2326100_db_home.zip
  inflating: META-INF/MANIFEST.MF
  inflating: META-INF/ORACLE_C.SF
  inflating: META-INF/ORACLE_C.RSA
   creating: OPatch/
  inflating: OPatch/README.txt
   creating: OPatch/auto/
..
..
  rdbms/mesg/ocius.msg   -> ./oraus.msg
  rdbms/mesg/ocizhs.msb  -> orazhs.msb
  rdbms/mesg/ocizht.msb  -> orazht.msb
[oracle@lxicborasgv01 dbhome_1]$


6. Invoke ./runInstaller

Start the Oracle Universal Installer (OUI) by issuing the following command.

[oracle@lxicborasgv01 ~]$ cd /u01/app/oracle/product/23.26.1/dbhome_1/

[oracle@lxicborasgv01 dbhome_1]$ ./runInstaller 

Launching Oracle AI Database Setup Wizard...
          

[root@lxicborasgv01 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@lxicborasgv01 ~]#
[root@lxicborasgv01 ~]# /u01/app/oracle/product/23.26.1/dbhome_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/23.26.1/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[root@lxicborasgv01 ~]#
 


7. Verify

[oracle@lxicborasgv01 ~]$ export ORACLE_HOME=/u01/app/oracle/product/23.26.1/dbhome_1
[oracle@lxicborasgv01 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@lxicborasgv01 ~]$ which sqlplus
/u01/app/oracle/product/23.26.1/dbhome_1/bin/sqlplus
[oracle@lxicborasgv01 ~]$
[oracle@lxicborasgv01 ~]$ sqlplus /nolog

SQL*Plus: Release 23.26.1.0.0 - Production on Wed Jan 28 21:15:21 2026
Version 23.26.1.0.0

Copyright (c) 1982, 2025, Oracle.  All rights reserved.

SQL>

Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

Thank you,
Rajasekhar Amudala
Email: br8dba@gmail.com
WhatsApp : +
Linkedin: https://www.linkedin.com/in/rajasekhar-amudala/

Training

br8dba.com β€” Senior Database Professional

DBA Training & Mentoring Oracle Β· PostgreSQL Β· SQL Server

Practical, hands-on training designed for real-world production environments. Learn from a Senior DBA with years of industry experience.

πŸŽ“ Technical Trainer 🌐 Founder of BrightDBA ⚑ Real-World DBA Skills πŸ†“ Free PostgreSQL Training in Telugu

I am a Senior Database Professional, Trainer, and Consultant with extensive hands-on experience in Oracle, SQL Server, and PostgreSQL. I strongly believe that real-world DBA skills come from practical exposure β€” not just theory. My goal: to make complex database concepts easy, practical, and directly usable in real jobs.

Free PostgreSQL DBA Training in English for Beginners, 100% free of cost! | Stay tuned for updates.

πŸ”₯ Registration got closed for Telugu batch

Free PostgreSQL DBA Training in Telugu for Beginners | Live Ongoing Batch |Β  June 15 - July 31, 2026.

ఀెలుగులో ΰ°¨ΰ±‡ΰ°°ΰ±ΰ°šΰ±ΰ°•ΰ±‹ΰ°‚ΰ°‘ΰ°Ώ Β· 5 Weeks Β· Online Β· Beginner Friendly Β· 100% Free

✏️ Registration got Closed β†’
πŸ“š

What I Teach

β–Έ Oracle DBA β€” Single Instance, RAC, Exadata & Performance Tuning
β–Έ PostgreSQL Administration β€” Installation to Advanced Tuning
β–Έ SQL Server Administration & Always On Availability Groups
β–Έ High Availability & Disaster Recovery (HA/DR) Design
β–Έ DBA Mentoring, Documentation & Hands-on Labs
β–Έ Linux, Storage & Networking fundamentals for DBAs
🌐

BrightDBA β€” Practical Learning for Real DBAs

A learning platform created to help DBAs and IT professionals gain practical, step-by-step, industry-ready skills through clear documentation and real-world scenarios.

πŸ“ Detailed Articles

DBA articles & technical guides

🎯 Step-by-Step Training

Hands-on production-ready content

🀝 Community Support

WhatsApp group & peer learning

πŸš€ Real Challenges

Prepare for production problems

🧠

My Training Approach

πŸ’‘ Hands-on first, theory next
πŸ”§ Real problems with practical solutions
πŸ“„ Clean documentation with repeatable steps
⚑ Focus on performance, stability & reliability
πŸ—„οΈ

Technologies I Work With

πŸ”΄ Oracle

11g, 12c, 19c, RAC, Exadata

🐘 PostgreSQL

Installation, Configuration, WAL, Replication, Performance Tuning

πŸͺŸ SQL Server

Always On AG, HA/DR, Performance Tuning

βš™οΈ Infrastructure

Linux, Storage, Networking, Cloud & Hybrid DBA

🀝 Let's Connect

You're in the right place if you are:

πŸ“š Looking to learn DBA skills practically 🎯 Beginner wanting to start from zero πŸ“– Searching for clear DBA documentation πŸš€ Aiming to grow as a database professional
πŸŽ–οΈ

Oracle Certifications

Oracle 10g OCA
Oracle 10g OCP
Oracle 11g OCP
Oracle 12c
RAC 10g
RAC 11g
12c RAC
GoldenGate 10g
GoldenGate 12c
Exadata 11g

Post #7

Rajasekhar Amudala | Senior Oracle DBA

RAJASEKHAR AMUDALA

SENIOR DBA | 17+ YEARS EXPERIENCE

Oracle | SQL Server | PostgreSQL | Exadata | GoldenGate

πŸ‘€
Professional Summary

Senior DBA with 17+ years of expertise in Oracle, GoldenGate, SQL Server and PostgreSQL, specializing in L3 production support and performance tuning for critical banking and financial database systems.

⚑
Core Technical Skills
ORACLE
11g, 12c, 19c, 21c | RAC | Data Guard | Exadata | GoldenGate | ASM | RMAN | Multitenant | Upgrade & Migration
GOLDENGATE
Install | Configure | Extract | Datapump | Replicat | Unidirectional | Bidirectional | DDL Replication
POSTGRESQL
Installation | Configuration | Backup & Recovery | Streaming Replication | Replication Manager | Patroni HA | Upgrade & Migrations | EDB Failover Manager | Migrate Oracle to PostgreSQL
SQL SERVER
Installation | Configuration | Patching | Log Shipping | Backup & Recovery | AlwaysOn Availability Groups | Upgrade & Migration
MYSQL / MARIADB
Installation | Configuration | Patching | Replication | MaxScale with Delayed Replica | Upgrade & Migration
IBM DB2
Installation | Configuration | Patching | HADR Setup | Upgrade
CLOUD
Oracle Cloud Infrastructure (OCI) | AWS RDS | DB Migration OnPrem to EC2 | DB Migration OnPrem to RDS
πŸ†
Key Achievements
Successfully migrated multiple 12c databases to 19c RAC with near-zero downtime across data centers.
Reduced query response time by up to 85% through advanced performance tuning for critical production systems.
Recovered a corrupted 20TB Oracle database using RMAN Point-in-Time Recovery.
Implemented Oracle RAC and Data Guard for high availability, achieving 99.99% uptime SLA.
Performed seamless Grid Infrastructure patching and upgrades using zero-downtime techniques.
Designed and executed large-scale database refresh and migration strategies from production to non-production environments.
πŸ†
Certifications
  • β€’ Oracle 11g & 10g OCP
  • β€’ Oracle RAC Certified Expert (OCE)
  • β€’ Oracle GoldenGate Certified
  • β€’ Oracle Exadata Certified
  • β€’ OCI Architect Professional
πŸŽ“
Education

Master of Business Administration (MBA)