remove shell

This commit is contained in:
root
2023-09-24 18:46:20 +03:00
parent 78f49dc907
commit 65914f8895
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);
```