本文为第二届openGauss每日一练,21天打卡计划第 9 天的作业部分,课程内容总结如下openGauss每日一练第 9 天-表空间与数据库
作业1
创建表空间newtbs1
CREATE TABLESPACE newtbs1 RELATIVE LOCATION 'tablespace/tablespace_1';

作业2
创建3个数据库newdb1、newdb2、newdb3,默认表空间为newtbs1
create database newdb1 with tablespace = newtbs1;
create database newdb2 with tablespace = newtbs1;
create database newdb3 with tablespace = newtbs1;

作业3
使用sql查看表空间newtbs1上有几个数据库
select datname, spcname from pg_database d, pg_tablespace t where d.dattablespace = t.oid and t.spcname = 'newtbs';

作业4
在文件系统中查看表空间newtbs1中的多个数据库
cd /var/lib/opengauss/data/pg_tblspc/xxxxx/
cd PG_9.2*
ls

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




