Postgres

Autovacuum tip

I show a tip of autovacuum management.

As frequently mentioned, the table bloat problem is one of the most annoying things in managing PostgreSQL. Several things can cause that problem, and Autovacuum is one of them.


pg_plan_inspector

I’ve just released pg_plan_inspector that is a framework to monitor and improve the performance of PostgreSQL using Machine Learning methods.

One movie is worth a thousand words. Watch this movie.


Poll: Product Name

I’m developing a new private product, but I’ve not decided the name of it yet. So, I’d like to do a poll about what name is good.

Tweet


SHUTDOWN DATABASE in PostgreSQL

I made a PostgreSQL’s module called shutdown_db using weekend time.

This module emulates the Oracle’s shutdown commands by controlling access for each DB.


How to install and use pgindent

pgindent maintains the uniform layout style of postgresql related source code.


My first Chinese book

My first Chinese book has been published on 1st June.


How to calculate A * B mod N, where numbers are 64 bit integers

I made a program to calculate ‘A * B mod N’, where A, B and N are 64 bit integers.

Main problem is to avoid overflow when calculate ‘A * B’.

I searched a while and finally decided to use the interleaved modular multiplication method, which is used in the feild of electric circuit design.

I found some bugs when I tested corner cases, so I have to fix them [2018.9.2]. I think I’ve fixed them [2018.9.3]. I’ve just improved it! [2018.9.5]

The program is shown below:


Citus with multi-coordinator using Streaming Replication

In the standard setup of Citus, it has one coordinator, so it is the single point of failure and the bottle neck of the system.

To solve these disadvantages, I built a multi-coordinator using Streaming Replication, which is the built-in replication feature of PostgreSQL.


postgres cluster management system in GoCardless

I found an interesting postgres cluster management system using Pacemaker. It is created by GoCardless. They provide a vagrant box, so we can play and learn it easily.


When should I do VACUUM FULL?

There is unfortunately no best practice when you should execute “VACUUM FULL”. The extension pg_freespacemap however gives you suggestion.