Sat 30 Jan 2021

Configuring PostgreSQL for Observability

PostgreSQL comes with a plethora of configuration options, but changing the default settings of some of these options drastically improves the observability of your PostgreSQL server. You’ll want to set and configure these options before issues crop up in production, as they can provide information essential to understanding and resolving those issues.

Read on to learn more about the settings and extensions that expose metrics and information about the inner workings of your PostgreSQL server.

Source: Configuring PostgreSQL for Observability.

Demo on creating worker pool in GoLang

A worker pool is a pool where a specified number of workers(usually goroutine) created and run to pick up tasks. This can allow multiple tasks to be ran at the same time while keeping the number of workers a fixed number to avoid overuse of resource in the program.

There are usually two approaches of creating worker pool.

  • One is with fixed number of workers pre-created
  • One is creating worker when needed until the max number of workers created

In this post, we will cover the demonstration of creating fixed number of workers pre-ahead. This approach is usually used when one knows there are lots of tasks to be ran at the same time and the chance of reaching to max allowed worker would be high.

Source: Demo on creating worker pool in GoLang