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 ?…