fruworg.github.io/content/posts/postgres-update.md

32 lines
756 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Обновление PostgreSQL
description: pg_upgradecluster
date: 2023-10-09T00:20:00+06:00
tags: [linux, postgres]
---
## Листинг запущенных экземпляров PostgreSQL
```shell
pg_lsclusters
```
## Остановка экземпляра PostgreSQL новой версии
```shell
pg_dropcluster <new-version> main --stop
```
## Миграция со старой версии на новую
```shell
pg_upgradecluster <old-version> main
```
## Дроп экземпляра PostgreSQL старой версии
```shell
pg_dropcluster <old-version> main
```
## Удаление пакетов старой версии PostgreSQL
```
apt purge -y postgresql-<old-version> postgresql-client-<old-version>
```