Showing posts with label PostgreSQL. Show all posts
Showing posts with label PostgreSQL. Show all posts

Wednesday, July 20, 2016

View all tables row count in PostgreSQL

This script will make your life easier to view the total row on all your tables, you need to create a function for it, but its quite easy to maintain

Sunday, June 12, 2016

Find Active Session and Kill it on PostgreSQL

I happen to encounter a case when I want to drop a database and not allowed by system since there are an active session. I ended up having to restart database and the perform the drop. this is not ideal if there are more than 2 database or its already run on production, but here's how to do it

Restore PostgreSQL Database

Without having to use tools like pgAdmin, you can backup and restore database using console command