⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 start-ag.sgml

📁 关系型数据库 Postgresql 6.5.2
💻 SGML
字号:
<!---	This file currently contains several small chapters.-	Each chapter should be split off into a separate source file...-	- thomas 1998-02-24--> <chapter id="newuser">  <title>Adding and Deleting Users</title>  <para>   <application>createuser</application> enables specific users to access   <productname>Postgres</productname>.     <application>destroyuser</application> removes  users  and   prevents them from accessing <productname>Postgres</productname>.  </para>  <para>   These commands only affect users with  respect  to     <productname>Postgres</productname>;   they  have  no effect on a user's other privileges or status with regards   to the underlying  operating system.  </para> </chapter> <chapter id="disk">  <title>Disk Management</title>  <sect1>   <title>Alternate Locations</title>   <para>    It is possible to create a database in a location other than the default    location for the installation. Remember that all database access actually    occurs through the database backend, so that any location specified must    be accessible by the backend.   </para>   <para>    Alternate database locations are created and referenced by an environment variable    which gives the absolute path to the intended storage location.    This environment variable must have been defined before the backend was started    and must be writable by the postgres administrator account.    Any valid environment variable name may be used to reference an alternate     location, although using variable name with a prefix of PGDATA is recommended    to avoid confusion and conflict with other variables.   </para>   <note>    <para>     In previous versions of <productname>Postgres</productname>,      it was also permissable to use an absolute path name     to specify an alternate storage location.     The environment variable style of specification     is to be preferred since it allows the site administrator more flexibility in     managing disk storage.     If you prefer using absolute paths, you may do so by defining      "ALLOW_ABSOLUTE_DBPATHS" and recompiling <productname>Postgres</productname>     To do this, either add this line     <programlisting>#define ALLOW_ABSOLUTE_DBPATHS 1     </programlisting>     to the file <filename>src/include/config.h</filename>, or by specifying     <programlisting> CFLAGS+= -DALLOW_ABSOLUTE_DBPATHS     </programlisting>     in your <filename>Makefile.custom</filename>.    </para>   </note>   <para>    Remember that database creation is actually performed by the database backend.    Therefore, any environment variable specifying an alternate location must have    been defined before the backend was started. To define an alternate location    PGDATA2 pointing to <filename>/home/postgres/data</filename>, first type    <programlisting>% setenv PGDATA2 /home/postgres/data    </programlisting>    to define the environment variable to be used with subsequent commands.    Usually, you will want to define this variable in the     <productname>Postgres</productname> superuser's    <filename>.profile</filename>    or    <filename>.cshrc</filename>    initialization file to ensure that it is defined upon system startup.     Any environment variable can be used to reference alternate location,     although it is preferred that the variables be prefixed with "PGDATA"     to eliminate confusion and the possibility of conflicting with or     overwriting other variables.   </para>   <para>    To create a data storage area in PGDATA2, ensure    that <filename>/home/postgres</filename> already exists and is writable     by the postgres administrator.    Then from the command line, type    <programlisting>% setenv PGDATA2 /home/postgres/data% initlocation $PGDATA2Creating Postgres database system directory /home/postgres/dataCreating Postgres database system directory /home/postgres/data/base    </programlisting>   </para>   <para>    To test the new location, create a database <database>test</database> by typing    <programlisting>% createdb -D PGDATA2 test% destroydb test    </programlisting>   </para>  </sect1> </chapter><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:nilsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tsgml-parent-document:nilsgml-default-dtd-file:"./reference.ced"sgml-exposed-tags:nilsgml-local-catalogs:"/usr/lib/sgml/CATALOG"sgml-local-ecat-files:nilEnd:-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -