Skip to content

Commit bfbe17d

Browse files
author
Onur Özgür ÖZKAN
committed
Update postgresql.md
1 parent e72131e commit bfbe17d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

development/server/postgresql.md

+20
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,26 @@ sudo apt-get upgrade
8989
9090
## Ayarları
9191
92+
## DB İşlemleri
93+
94+
**Create DB**
95+
96+
* Serverin locale si ayarlanması
97+
* ENCODING'ı unutmayın!
98+
99+
`CREATE DATABASE xxxx_production OWNER xxxx ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' TEMPLATE template0;`
100+
101+
**DROP DB**
102+
103+
`DROP DATABASE xxxx_production;`
104+
105+
**Can't Drop Db Sorunsali**
106+
107+
DB yi kullanan sessionlarin olmasi durumu.
108+
109+
`SELECT pid FROM pg_stat_activity where pid <> pg_backend_pid();`
110+
`SELECT pg_terminate_backend(pid);`
111+
92112
### Bağlantı ve Yetkilendirme
93113
94114
* http://www.postgresql.org/docs/9.2/interactive/runtime-config-connection.html

0 commit comments

Comments
 (0)