Tag: postgresql

Get current timestamp with PostgreSQL

I’m pretty sure that almost everyone that have used PostgreSQL knows the now() function. Its purpose is mostly obvious: return the current timestamp or at least its name indicates that….

Best practices storing time data on the database

There is my personal list of best practices handling with time related data and its persistence. I assume they are for PostgreSQL in first time but that recommendations…

Implementing OCC (optimistic concurrency control) on the database

This is a simple tip for implement OCC directly on the database and so avoiding additional overhead that this can imply doing that at the application level. The OCC mechanism mainly consists…

Show database, table and indexes size on PostgreSQL

Many times I have needed show how spaces is used on my databases, tables or indexes. Here I will try to explain in a concise and simple way…

Replication status in PostgreSQL

This is a small tip to view the replication status of slave postgresql servers. The simplest way to see the replication state on a master server is executing…