Revert "remove shell"

This reverts commit 65914f8895.
This commit is contained in:
root
2023-09-24 18:58:33 +03:00
parent 65914f8895
commit c793b55750
26 changed files with 132 additions and 132 deletions

View File

@ -6,29 +6,29 @@ tags: [linux, postgres]
---
## На старой версии (<=12)
Заходим в консоль Postgres:
```
```shell
psql
```
Убиваем соединения с БД:
```
```shell
SELECT pg_terminate_backend (pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = '<database_name>';
```
Дропаем БД:
```
```shell
DROP DATABASE <database_name>;
```
## На новой версии (>=13)
Заходим в консоль Postgres:
```
```shell
psql
```
Дропаем БД:
```
``` shell
DROP DATABASE <database_name> WITH (FORCE);
```