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
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/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...
阅读 1358·2023-01-11 13:20
阅读 1707·2023-01-11 13:20
阅读 1215·2023-01-11 13:20
阅读 1907·2023-01-11 13:20
阅读 4165·2023-01-11 13:20
阅读 2759·2023-01-11 13:20
阅读 1402·2023-01-11 13:20
阅读 3673·2023-01-11 13:20