Skip to content

2021

Containerized Postgres version upgrade

Postgres upgrade in container

How to upgrade postgres version which runs in docker container

Introduction

Main idea of this post is to demonstrate postgres major version upgrade process for the case when postgres runs within docker container.

Demonstrated approach uses pg_dumpall utility. In any case it does not pretend to be the "best" approach. There are other options availabe such as pg_upgrade or setting up a replication server. Moreover, for big databases pg_dumpall might be non optimal or even not feasible solution.

But as said at the beginning, idea is to demonstrate possible upgrade process for containerized postgres installation.

Postgres GRANT operation cost

GRANT operation cost

GRANT operation mechanics

Introduction

As many other databases Postgres supports access management framework via privileges which are provided to the users. In terms of SQL it means a pair of commands GRANT and REVOKE. To simplify things to the users postgres also supports mass ALL option for these commands. Specifying either GRANT ALL or REVOKE ALL allows to apply command against multiple objects or against multiple privileges or for a mix of both.