Before discussing on deadlocks, lets see type of locks and their acquiring methodolgy in PostgreSQL.Types of Locks: Table-Level Locks and Row-Level Locks Table-Level Locks: AcessShareLock : It acquired automatically by a SELECT statement on the table or tables it retrieves from. This mode blocks ALTER TABLE, DROP TABLE, and VACUUM (AccessExclusiveLock) on the same table RowShareLock…
Author: Raghav
~/.psqlrc file for DBA’s
In our regular DBA monitoring, we will be using so many combination of pg_catalog queries to reteive information like <IDLE> in transaction , waiting queries, No. of connections, etc. Most of the DBA’s, create views to cut short big combination queries and keep handy for later use per requirement. PostgreSQL, provides a startup file(.psqlrc) which…
High Availability Clustering with PostgreSQL
Firstly, I should thank my company for giving me an opportunity to work mostly with PostgreSQL HA stuff. I have worked with very good clients who has implemented Clustering with PostgreSQL. So, my article here is to give little idea on how HA clustering will work with PostgreSQL. PostgreSQL has built-in functionality for High Availability…
Replication in PostgreSQL 9.0
Word “Replication” means a process of sharing information so as to ensure consistency between redundant resources, such as software or hardware components, to improve reliability, fault-tolerance, or accessibility. Replication is very interesting subject in any databases. In database competition world, PostgreSQL has its own uniqueness in RDBMS Open source for High availability. Latest PostgreSQL 9.1…
How to get Database Creation Time in PostgreSQL 9.0 ?
In PostgreSQL, database creation time is not stored in any of the pg_catalogs. So question arises, how do we know when was database created. For every database, a directory is created with database-oid number under $PGDATA/base along with a set of OID’s,OID_fsm,OID_vm, PG_VERSION files for each Object(Tables/Indexes/View/ etc.,). Every OID,OID_fsm,OID_vm, files will be get updated…