Autonomous Transaction in PostgreSQL 9.1

Currently am working on Migrations from Oracle to PostgreSQL. Though am DBA, these days am learning a bit on Developer track too … 🙂Let’s see a small feature of Oracle and a similar way in PostgreSQL. Autonomous Transaction,what is it ? An autonomous transaction is an independent transaction that is initiated by another transaction, and…

Caching in PostgreSQL

Caching…!!, its little bit hard to go in brief with single article. But will try to share my knowledge learnt from Heikki / Robert Haas / Bruce Momjian in short.  In PostgreSQL, there are two layers, PG shared buffers and OS Page cache, any read/write should pass through OS cache(No bypassing till now). Postgres writes…

Duplicate Rows in a primary key Table.

Back again, getting very less time for blogging 🙂 “ERROR: could not create unique indexDETAIL: Table contains duplicated values.” This error is thrown out by Postgres when it encounters duplicate rows in a primary key table by failing any of these command REINDEX or CREATE UNIQUE INDEX. Why duplicate rows exists in a table ?…

Londiste Replication with PostgreSQL 9.0

Londiste, Asynchronous Master/Slave replication tool developed by Skytools. Its very simple and user-friendly created like Slony. Core logic behind Londiste or Slony is Remote Triggering. Whereas londiste follows events queuing model which is not their in Slony – I. Overview on Skytools:Skytools is a Python-based application, it comes with a bundle of three things PgQ,Londiste…

Resize VARCHAR column of a Large Tables

Note: Recommended not to tamper pg_catalogs. On forum, I saw an interesting posting and also the solution, however few things of that solution made me to test it. Scenario is, “How to resize the VARCHAR column on a large table with less time and what are best  approach’s”. As known standard way is to, Create…