01
目 標(biāo)
02
創(chuàng)建流程
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
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://systransis.cn/yun/129656.html
摘要:前面我們簡單闡述了分布式數(shù)據(jù)庫的架構(gòu),并通過一條簡單的查詢語句解釋了分布式的執(zhí)行計劃。 引言 第八屆中國架構(gòu)師大會(SACC2016)10月27號到29號在北京萬達(dá)索菲特大飯店成功舉辦。大會以架構(gòu)創(chuàng)新之路為主題,云集了國內(nèi)外頂尖專家,共同探討云計算和大數(shù)據(jù)等技術(shù)背景下,如何通過架構(gòu)創(chuàng)新及各種IT新技術(shù)來帶動企業(yè)轉(zhuǎn)型增效。作為一家專注于云端數(shù)據(jù)倉庫的初創(chuàng)公司,酷克數(shù)據(jù)受邀在SACC201...
摘要:這可以通過負(fù)載平衡來實(shí)現(xiàn)數(shù)據(jù)分片當(dāng)問題不是并發(fā)查詢的數(shù)量,而是數(shù)據(jù)庫的大小和單個查詢的速度時,可以實(shí)現(xiàn)不同的方法。 showImg(https://segmentfault.com/img/remote/1460000018875091); 來源 | 愿碼(ChainDesk.CN)內(nèi)容編輯 愿碼Slogan | 連接每個程序員的故事 網(wǎng)站 | http://chaindesk.cn...
摘要:這可以通過負(fù)載平衡來實(shí)現(xiàn)數(shù)據(jù)分片當(dāng)問題不是并發(fā)查詢的數(shù)量,而是數(shù)據(jù)庫的大小和單個查詢的速度時,可以實(shí)現(xiàn)不同的方法。 showImg(https://segmentfault.com/img/remote/1460000018875091); 來源 | 愿碼(ChainDesk.CN)內(nèi)容編輯 愿碼Slogan | 連接每個程序員的故事 網(wǎng)站 | http://chaindesk.cn...
閱讀 1357·2023-01-11 13:20
閱讀 1707·2023-01-11 13:20
閱讀 1215·2023-01-11 13:20
閱讀 1906·2023-01-11 13:20
閱讀 4165·2023-01-11 13:20
閱讀 2757·2023-01-11 13:20
閱讀 1402·2023-01-11 13:20
閱讀 3672·2023-01-11 13:20