01
目 標
02
創建流程
create database bass_ly;
gp1=# c bass_ly
You are now connected to database "bass_ly" as user "gpadmin".
bass_ly=#
bass_ly=# create schema dwd;
CREATE SCHEMA
bass_ly=#
ll -rt
mkdir /data1/master/fastdisk
mkdir /data1/primary/fastdisk
mkdir /data1/mirror/fastdisk
=> ll -rt /data1/master
[master] total 8
[master] drwx------ 17 gpadmin gpadmin 4096 Nov 25 07:48 gpseg-1
[master] drwxrwxr-x 2 gpadmin gpadmin 4096 Nov 27 02:58 fastdisk
[ gp2] ls: cannot access /data1/master: No such file or directory
[ gp1] ls: cannot access /data1/master: No such file or directory
=> ll -rt /data1/primary
[master] ls: cannot access /data1/primary: No such file or directory
[ gp2] total 12
[ gp2] -rw-rw-r--. 1 gpadmin gpadmin 0 Jul 5 2018 1
[ gp2] drwx------ 18 gpadmin gpadmin 4096 Nov 30 04:17 gpseg3
[ gp2] drwx------ 17 gpadmin gpadmin 4096 Nov 30 04:17 gpseg2
[ gp2] drwxrwxr-x 2 gpadmin gpadmin 4096 Dec 1 23:29 fastdisk
[ gp1] total 12
[ gp1] drwx------ 18 gpadmin gpadmin 4096 Nov 25 15:13 gpseg1
[ gp1] drwx------ 17 gpadmin gpadmin 4096 Nov 25 15:13 gpseg0
[ gp1] drwxrwxr-x 2 gpadmin gpadmin 4096 Nov 27 10:25 fastdisk
=> ll -rt /data1/mirror
[master] ls: cannot access /data1/mirror: No such file or directory
[ gp2] total 12
[ gp2] drwx------ 17 gpadmin gpadmin 4096 Nov 30 04:17 gpseg0
[ gp2] drwx------ 16 gpadmin gpadmin 4096 Nov 30 04:17 gpseg1
[ gp2] drwxrwxr-x 2 gpadmin gpadmin 4096 Dec 1 23:30 fastdisk
[ gp1] total 12
[ gp1] drwx------ 17 gpadmin gpadmin 4096 Nov 25 15:13 gpseg3
[ gp1] drwx------ 17 gpadmin gpadmin 4096 Nov 25 15:13 gpseg2
[ gp1] drwxrwxr-x 2 gpadmin gpadmin 4096 Nov 27 10:25 fastdisk
=>
primary位置> /data1/primary/fastdisk
mirror位置> /data1/mirror/fastdisk
master位置> /data1/master/fastdisk
select * from pg_filespace;
create tablespace tb_ceshi owner gpadmin filespace fastdisk;
select * from pg_tablespace;
CREATE RESOURCE QUEUE pg_dev WITH (ACTIVE_STATEMENTS=15,MAX_COST=-1.0,PRIORITY=MEDIUM,MEMORY_LIMIT=-1);
CREATE RESOURCE QUEUE pg_dw WITH (ACTIVE_STATEMENTS=20,MAX_COST=-1.0,PRIORITY=HIGH,MEMORY_LIMIT=-1);
CREATE RESOURCE QUEUE aaaa WITH (ACTIVE_STATEMENTS=1,MAX_COST=-1.0,PRIORITY=LOW,MEMORY_LIMIT=-1);
create role toptea;
alter role toptea with NOSUPERUSER NOCREATEDB NOCREATEROLENOCREATEEXTTABLE NOINHERIT LOGIN RESOURCE QUEUE pg_dev NOCREATEEXTTABLE;
host all all 0/0 md5
local all toptea trust
host all toptea 1**.***.*.96/32 trust
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/129656.html
摘要:這可以通過負載平衡來實現數據分片當問題不是并發查詢的數量,而是數據庫的大小和單個查詢的速度時,可以實現不同的方法。 showImg(https://segmentfault.com/img/remote/1460000018875091); 來源 | 愿碼(ChainDesk.CN)內容編輯 愿碼Slogan | 連接每個程序員的故事 網站 | http://chaindesk.cn...
摘要:這可以通過負載平衡來實現數據分片當問題不是并發查詢的數量,而是數據庫的大小和單個查詢的速度時,可以實現不同的方法。 showImg(https://segmentfault.com/img/remote/1460000018875091); 來源 | 愿碼(ChainDesk.CN)內容編輯 愿碼Slogan | 連接每個程序員的故事 網站 | http://chaindesk.cn...
閱讀 1347·2023-01-11 13:20
閱讀 1685·2023-01-11 13:20
閱讀 1133·2023-01-11 13:20
閱讀 1860·2023-01-11 13:20
閱讀 4101·2023-01-11 13:20
閱讀 2705·2023-01-11 13:20
閱讀 1386·2023-01-11 13:20
閱讀 3598·2023-01-11 13:20