Postgresql 的表空间的创建命令比较简单。
Command: CREATE tableSPACEDescription: define a new tablespaceSyntax:CREATE tableSPACE tablespace_name [ OWNER user_name ] LOCATION 'directory'
Command: CREATE DATABASEDescription: create a new databaseSyntax:CREATE DATABASE name [ [ WITH ] [ OWNER [=] user_name ] [ TEMPLATE [=] template ] [ ENCoding [=] enCoding ] [ LC_ColLATE [=] lc_collate ] [ LC_CTYPE [=] lc_ctype ] [ tableSPACE [=] tablespace_name ] [ CONNECTION liMIT [=] connlimit ] ]
可能的错误
create tablespace testspaceeee location '/mnt/data1222';ERROR: directory "/mnt/data1222" does not exist
表空间目录必须提前创建好。
postgresql 的归档模式设置
wal_level = archive checkpoint_segments = 3 # in logfile segments,min 1,16MB eachcheckpoint_timeout = 10min # 强制生成 checkpoint 的周期 checkpoint_completion_target = 0.5 # checkpoint target duration,0.0 - 1.0checkpoint_warning = 30s # 0 disablesarchive_mode = on # 启动归档模式 # archive_command ='cp %p /home/postgres/data1/%f' # # # 归档路径archive_timeout = 120 # #总结
以上是内存溢出为你收集整理的PostgreSQL 创建表空间测试全部内容,希望文章能够帮你解决PostgreSQL 创建表空间测试所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)