单独的驱动器/文件系统上有多个数据库? [英] Multiple databases on seperate drives/file systems?

查看:31
本文介绍了单独的驱动器/文件系统上有多个数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Redhat 8.0系统上运行postgresql 7.2.4。


我一直在寻找一种方法来设置另一个数据库,除了

初始值在/ var / lib / pgsql / data下的一个设置在不同的文件系统上。


我找到了一些参考来配置一个单独的PGDATA2

环境变量并运行initlocation PGDATA2后跟

createdb -D PGDATA2 testdb。


目录已创建。


但是,当执行这些步骤时,我收到以下错误:


-bash-2.05b $ createdb testdb2 -D''PGDATA2''

错误:Postmaster环境变量''PGDATA2''未设置

createdb:数据库创建失败

我已经验证PGDATA2环境变量已设置。

-bash- 2.05b $ echo $ PGDATA2

/ vhost /数据库/数据


我已经重新启动postmaster,假设它需要

环境va在postgres用户shell中设置的riables。


我的猜测是PGDATA2由于某种原因没有为postmaster

服务设置。我查看了init.d / postgresql启动脚本,可以看到

,其中检查并设置了PGDATA。我认为来自postgres用户的环境

变量没有被使用?


有没有办法使用单个
postmaster服务?


-

Scot L. Harris
我们*** @ cfl.rr.com


....心灵设备目前属于中情局财产

best(hello echelon!)


- 关于Linux内核的Alan Cox

------------- --------------(广播结束)---------------------------

提示9:如果您的

加入列的数据类型不匹配,计划员将忽略您选择索引扫描的愿望


解决方案

createdb testdb2 -D''PGDATA2''

错误:Postmaster环境变量''PGDATA2'未设置

createdb :数据库创建失败

我已经验证PGDATA2环境变量已设置。

-bash-2.05b


echo


PGDATA2

/ vhost / database / data


我重新启动了postmaster,假设它需要在postgres用户shell中设置

环境变量。


我的猜测是PGDATA2由于某种原因没有设置为postmaster

服务。我查看了init.d / postgresql启动脚本,可以看到

,其中检查并设置了PGDATA。我认为来自postgres用户的环境

变量没有被使用?


有没有办法使用单个
postmaster服务?


-

Scot L. Harris
我们*** @ cfl.rr.com


....心灵设备目前属于中情局财产

best(hello echelon!)


- 关于Linux内核的Alan Cox

------------- --------------(广播结束)---------------------------

提示9:如果您的

加入列的数据类型不匹配,计划员将忽略您选择索引扫描的愿望


I am running postgresql 7.2.4 on a Redhat 8.0 system.

I have been looking for a way to setup another database besides the
initial one setup under /var/lib/pgsql/data on a different file system.

I have found a few references to configuring a separate PGDATA2
environment variable and running the initlocation PGDATA2 followed by
createdb -D PGDATA2 testdb.

The directories are created.

However when executing those steps I get the following error:

-bash-2.05b$ createdb testdb2 -D ''PGDATA2''
ERROR: Postmaster environment variable ''PGDATA2'' not set
createdb: database creation failed
I have verified that PGDATA2 environment variable is set.
-bash-2.05b$ echo $PGDATA2
/vhost/database/data

I have restarted postmaster with the assumption that it needed the
environment variables setup in the postgres users shell.

My guess is that PGDATA2 is not set for some reason for the postmaster
service. I looked in the init.d/postgresql startup script and can see
where PGDATA is checked for and setup. I take it that the environment
variables from postgres user are not used?

Is there a way to set databases in different file systems using a single
postmaster service?

--
Scot L. Harris
we***@cfl.rr.com

.... mindreading equipment is currently classified CIA property at
best (hello echelon!)

- Alan Cox on linux-kernel
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column''s datatypes do not match

解决方案

createdb testdb2 -D ''PGDATA2''
ERROR: Postmaster environment variable ''PGDATA2'' not set
createdb: database creation failed
I have verified that PGDATA2 environment variable is set.
-bash-2.05b


echo


PGDATA2
/vhost/database/data

I have restarted postmaster with the assumption that it needed the
environment variables setup in the postgres users shell.

My guess is that PGDATA2 is not set for some reason for the postmaster
service. I looked in the init.d/postgresql startup script and can see
where PGDATA is checked for and setup. I take it that the environment
variables from postgres user are not used?

Is there a way to set databases in different file systems using a single
postmaster service?

--
Scot L. Harris
we***@cfl.rr.com

.... mindreading equipment is currently classified CIA property at
best (hello echelon!)

- Alan Cox on linux-kernel
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column''s datatypes do not match


这篇关于单独的驱动器/文件系统上有多个数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆