1.Script for vacuum, analyze and Reindexing the database cat /home/script/vaccum_analyze_reindex.sh #!/bin/bash PGHOME=/opt/PostgreSQL/9.3/bin LOG=/backups/logs/igr-vac-logs LOGFILE=vacuum_analyze_`date +”%Y-%m-%d-%T”`.log REINDEXLOG=reindex_`date +”%Y-%m-%d-%T”`.log export PGOPTIONS=’-c vacuum_cost_delay=10 -c maintenance_work_mem=5GB’ export PGPASSWORD=postgres $PGHOME/vacuumdb -d db_name -j 5 -p 5432 -z >> $LOG/$LOGFILE 2>> $LOG/$LOGFILE $PGHOME/reindexdb -d db_name -p …
Definition: VACUUM reclaims storage occupied by dead tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done. Therefore it’s necessary to …
This script is mostly used for will display what are the postgresql query is running more than one minutes and it will display query with PID using this PID you can kill what query is taken more CPU utilization and …
Active: query is running and session is hitting every threshold time, Idle in transaction: query is completed, and waiting for commit, session is hitting every threshold period. Idle in transaction (aborted): last or some statement was aborted due to network or …
A common issue with databases: The guy at floor 2 did some work on the database and then rashly left for lunch because the lady on floor 1 is already waiting for him. Unfortunately he did not close his transaction …
1.MORE I/O POSTGRESQL KILLING ALL IDLE CONNECTION FOR MONITORING PURPOSES: This following script is used for killing all idle connection and you can use it as a monitoring puposes like how many idle query is running for a hour and …
How to Clear Cache in Linux? Every Linux System has three options to clear cache without interrupting any processes or services. 1. Clear PageCache only. # sync; echo 1 > /proc/sys/vm/drop_caches 2. Clear dentries and inodes. # sync; echo 2 > /proc/sys/vm/drop_caches …
I am facing one issue. I have 3 IP. 1,2 are master and slave and 3 for pgpool. My application direct hit to 3 ,and 3 distribute the connection between master and slave. But in my web application have one …
The server is ec2 with c5.xlarge The data in the row is exceeding 1 gb size So is the reason for this error ‘Invalid size memory allocation ‘ How to fix ? Is any configuration required to change ? Solution …
Oracle migration: For migration first we need to install oracle database and ora2pg software and DBD oracle packages. =>first install oracle database in server and note down the paths,username,password needed For installing the oracle database follow the below steps: …
RayaFeeL offers a clear, comprehensive and scalable support package. This helpdesk is specifically designed to protect and secure your PostgreSQL data and databases. RayaFeeL guarantees fast query support by a confirmed PostgreSQL expert. Our support formulas Basic formula Unlimited calls …
PostgreSQL is a feature-rich, object-relational database. rayafeel.com’s migration specialists are able to convert data from Oracle, SQL Server, MySQL and DB2 databases to the PostgreSQL platform. After migration, our team provides you with the experience, skill-sets and best practices required …
Prerequisites: 1. Same version of the PostgreSQL Database must be installed on both servers. 2. Configure the Password-less ssh authentication to use the “postgres” user. 3. Production server must operate in WAL archiving enabled mode by setting archive_mode and archive_command …
If slave Connection is Broken form master due to network issue or some some data mismatch so we have to rebuild the slave server by following below six steps . TO REBUILD THE STANDBY SERVER BY FOLLOWING THE SIMPLE 6 …
1. Avoid join if possible use subquery instead of join Note : subqueries can be slower than LEFT [OUTER] JOINS, but in my opinion their strength is slightly higher readability. select GPA from Student where sID in (select sID from Apply …