Create postgres-update.md

This commit is contained in:
Руслан 2023-10-09 00:26:16 +06:00 committed by GitHub
parent d1e1fdfdbf
commit 67ec3b6947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,31 @@
---
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>
```