Consult the package-level documentation for details. In that case you should use that script in preference to running initdb directly. If you are using a pre-packaged version of PostgreSQL, it may well have a specific convention for where to place the data directory, and it may also provide a script for creating the data directory. The data directory must be initialized before being used, using the program initdb which is installed with PostgreSQL. There is no default, although locations such as /usr/local/pgsql/data or /var/lib/pgsql/data are popular. It is completely up to you where you choose to store your data. We call this the data directory or data area. In file system terms, a database cluster is a single directory under which all data will be stored. (See Chapter 23 for information about creating new databases within a cluster.) As the names suggest, these will be used as templates for subsequently-created databases they should not be used for actual work. There are two more databases created within each cluster during initialization, named template1 and template0. The database server itself does not require the postgres database to exist, but many external utility programs assume it exists. After initialization, a database cluster will contain a database named postgres, which is meant as a default database for use by utilities, users and third party applications. (The SQL standard uses the term catalog cluster.) A database cluster is a collection of databases that is managed by a single instance of a running database server. File Systemsīefore you can do anything, you must initialize a database storage area on disk.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |