艾瑞克的 Hexo 空間

筆記-enable query_stat in pg_hero

Login to DB Server

[email protected]```
1
2
3
4
5
#### chang to postgres ####
``` sudo su - postgres

create extension in DB , must run after pg_restore

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
postgres=# \c neo
You are now connected to database "neo" as user "postgres".
neo=# CREATE extension pg_stat_statements;
CREATE EXTENSION
neo=# SELECT pg_stat_statements_reset();
pg_stat_statements_reset
--------------------------
(1 row)
avatar
筆記-psql create role and assign user to the role with read only permission

  1. 1. Login to DB Server
  2. 2. create extension in DB , must run after pg_restore