Posts

Migrating PostgreSQL 14 to 18 Using pg_dumpall

  A major PostgreSQL version upgrade is not only a matter of installing the new server. The migration also requires a clear understanding of the existing environment, a verified backup, careful restoration, and post-upgrade validation. In this article, I walk through a PostgreSQL 14 to PostgreSQL 18 migration using pg_dumpall, based on a real environment. 1. Review the Current PostgreSQL 14 Environment Before starting the upgrade, I record the current PostgreSQL version, data directory, databases, database sizes, tables, indexes, and installed extensions. These checks give me a reference point for validating the PostgreSQL 18 environment later. --Current version: postgres = # select version(); version ----------------------------------------------------------------------------------------------------------- PostgreSQL 14.19 on x86_64 - pc - linux - gnu, compiled by gcc (GCC) 11.5 .0 20240719 (Red Hat 11.5 .0 -5 ), 64 - bit ( ...