diff --git a/server/databases/postgresql.xml b/server/databases/postgresql.xml index 60028323e6..b0f308f773 100644 --- a/server/databases/postgresql.xml +++ b/server/databases/postgresql.xml @@ -13,130 +13,136 @@ ]> - -$LastChangedBy$ -$Date$ - - -Postgre<acronym>SQL</acronym>-&postgresql-version; - -PostgreSQL + - -Introduction to -<application>Postgre<acronym>SQL</acronym></application> + + $LastChangedBy$ + $Date$ + -PostgreSQL is an advanced -object-relational database management system (ORDBMS), -derived from the Berkeley Postgres database management system. + PostgreSQL-&postgresql-version; -Package information - -Download (HTTP): - -Download (FTP): - -Download MD5 sum: &postgresql-md5sum; -Download size: &postgresql-size; -Estimated disk space required: -&postgresql-buildsize; -Estimated build time: -&postgresql-time; - + + PostgreSQL + - -<application>Postgre<acronym>SQL</acronym></application> -dependencies -Optional -, -, -, -, -, -, -, -: SGMLSpm-&SGMLSpm-version;, -krb4, - or , and -Rendezvous - - + PostgreSQL Dependencies - + Optional + , + , + , + , + , + , + , + : SGMLSpm-&SGMLSpm-version;, + krb4, + or , and + Rendezvous - -Installation of -<application>Postgre<acronym>SQL</acronym></application> + -In order for configure to properly discover -Docbook SGML -DTD, you may need to remove -OpenSP catalog definitions from the system -SGML catalogs. Use the following command before building -the package to accomplish this: + + Installation of PostgreSQL -sed -i.orig \ + In order for configure to properly discover + Docbook SGML DTD, you may need to remove + OpenSP catalog definitions from the system + SGML catalogs. Use the following command before building the package + to accomplish this: + +sed -i.orig \ -e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \ /etc/sgml/catalog \ - /etc/sgml/sgml-docbook.cat + /etc/sgml/sgml-docbook.cat -Install PostgreSQL with the -following commands: + Install PostgreSQL with the + following commands: -sed -i \ +sed -i \ -e "s|dsssl-stylesheets|& \\\\\n sgml/docbook/&-&docbook-dsssl-version;|" \ configure && ./configure --prefix=/usr --enable-thread-safety && -make +make -Now, as the root user: + Now, as the root user: -make install && -chown -R root:root /usr/share/doc/postgresql/html +make install - -If you are upgrading an existing system and are going to -install the new files over the old ones, then you should -back up your data, shut down the old server and follow the -instructions in the -official PostgreSQL -documentation. + + If you are upgrading an existing system and are going to install + the new files over the old ones, then you should back up your data, shut + down the old server and follow the instructions in the + official PostgreSQL documentation. + -Initialize a database cluster with the following commands issued by the -root user: + Initialize a database cluster with the following commands issued by the + root user: -install -v -m755 -d /srv/pgsql/data && +install -v -m755 -d /srv/pgsql/data && useradd -c "PostgreSQL Server" -g users -d /srv/pgsql/data postgres && chown -v postgres /srv/pgsql/data && -su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data' +su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data' -As the root user, start the database server with the following -command: + As the root user, start the + database server with the following command: -su - postgres -c '/usr/bin/postmaster -D /srv/pgsql/data > \ - /srv/pgsql/data/logfile 2>&1 &' +su - postgres -c '/usr/bin/postmaster -D /srv/pgsql/data > \ + /srv/pgsql/data/logfile 2>&1 &' -Still as user root, create a database and verify the -installation: + Still as user root, create + a database and verify the installation: -su - postgres -c '/usr/bin/createdb test' && +su - postgres -c '/usr/bin/createdb test' && echo "create table t1 ( name varchar(20), state_province varchar(20) );" \ | (su - postgres -c '/usr/bin/psql test ') && echo "insert into t1 values ('Billy', 'NewYork');" \ @@ -145,324 +151,383 @@ echo "insert into t1 values ('Evanidus', 'Quebec');" \ | (su - postgres -c '/usr/bin/psql test ') && echo "insert into t1 values ('Jesse', 'Ontario');" \ | (su - postgres -c '/usr/bin/psql test ') && -echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test') +echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test') - + - -Command explanations + + Command Explanations -sed -i -e "s|dsssl-stylesheets|...": This command -puts an extra line in the configure script so that the -BLFS installed version of the DSSSL -stylesheets can be discovered. + sed -i -e "s|dsssl-stylesheets|...": This command + puts an extra line in the configure script so that the + BLFS installed version of the DSSSL stylesheets can be discovered. ---enable-thread-safety: This switch makes the -client libraries thread-safe by allowing concurrent threads in -libpq and ECPG -programs to safely control their private connection handles. + --enable-thread-safety: This switch makes the + client libraries thread-safe by allowing concurrent threads in + libpq and ECPG programs to safely + control their private connection handles. -chown -R root:root /usr/share/doc/postgresql/html: -This command corrects the improper ownership of some documentation -files. + chown -R root:root /usr/share/doc/postgresql/html: + This command corrects the improper ownership of some documentation + files. -useradd ...: Add an unprivileged user to run the -database server. + useradd ...: Add an unprivileged user to run the + database server. -createdb test; create table t1; insert into t1 values...; -select * from t1: Create a database, add a table to it, insert some -rows into the table and select them to verify that the installation is working -properly. + createdb test; create table t1; insert into t1 values...; + select * from t1: Create a database, add a table to it, insert + some rows into the table and select them to verify that the installation + is working properly. - + - -Configuring -<application>Postgre<acronym>SQL</acronym></application> + + Configuring PostgreSQL -Config files + + Config Files -$PGDATA/pg_ident.con, -$PGDATA/pg_hba.conf and -$PGDATA/postgresql.conf - -$PGDATA/pg_indent.con - - -$PGDATA/pg_hba_conf - - -$PGDATA/postgresql.conf - + $PGDATA/pg_ident.con, + $PGDATA/pg_hba.conf and + $PGDATA/postgresql.conf -The PGDATA environment variable is used to distinguish -database clusters from one another by setting it to the value of the directory -which contains the cluster desired. The three configuration files -exist in every PGDATA/ directory. -Details on the format of the files and the options that can be set in -each can be found in . + + $PGDATA/pg_indent.con + -Install the -/etc/rc.d/init.d/postgresql init script included in the - package. - -postgresql + + $PGDATA/pg_hba_conf + -make install-postgresql - + + $PGDATA/postgresql.conf + - + The PGDATA environment variable is used to + distinguish database clusters from one another by setting it to + the value of the directory which contains the cluster desired. + The three configuration files exist in every PGDATA/ directory. Details on the + format of the files and the options that can be set in each can + be found in . - -Contents + - -Installed Programs -Installed Libraries -Installed Directories + + Boot Script - -clusterdb, createdb, createlang, createuser, dropdb, droplang, dropuser, -ecpg, initdb, ipcclean, pg_config, pg_controldata, pg_ctl, pg_dump, -pg_dumpall, pg_resetxlog, pg_restore, pltcl_delmod, pltcl_listmod, -pltcl_loadmod, postgres, postmaster, psql, vacuumdb -libecpg.[so,a], libecpg_compat.[so,a], libpgport.a, libpgtypes.[so,a], -libpq.[so,a] and various charset modules. -/srv/pgsql, /usr/include/libpq, /usr/include/postgresql, -/usr/lib/postgresql, /usr/share/doc/postgresql and /usr/share/postgresql - - + Install the /etc/rc.d/init.d/postgresql + init script included in the + package. - -Short Descriptions - + + postgresql + - -clusterdb -is a utility for reclustering tables in a -PostgreSQL database. - -clusterdb - - +make install-postgresql - -createdb - creates a new -PostgreSQL database. - -createdb - - + - -createlang -defines a new -PostgreSQL procedural -language. - -createlang - - + - -createuser -defines a new -PostgreSQL user account. - -createuser - - + + Contents - -dropdb -removes a -PostgreSQL database. - -dropdb - - + + Installed Programs + Installed Libraries + Installed Directories - -droplang -removes a -PostgreSQL procedural -language. - -droplang - - + + clusterdb, createdb, createlang, createuser, dropdb, droplang, + dropuser, ecpg, initdb, ipcclean, pg_config, pg_controldata, pg_ctl, + pg_dump, pg_dumpall, pg_resetxlog, pg_restore, pltcl_delmod, + pltcl_listmod, pltcl_loadmod, postgres, postmaster, psql, and + vacuumdb + libecpg.[so,a], libecpg_compat.[so,a], libpgport.a, libpgtypes.[so,a], + libpq.[so,a], and various charset modules. + /srv/pgsql, /usr/include/libpq, /usr/include/postgresql, + /usr/lib/postgresql, /usr/share/doc/postgresql, and + /usr/share/postgresql + + - -dropuser -removes a -PostgreSQL user account. - -dropuser - - + + Short Descriptions + + - -ecpg -is the embedded SQL preprocessor. - -ecpg - - + + clusterdb + + is a utility for reclustering tables in a + PostgreSQL database. + + clusterdb + + + - -initdb -creates a new database cluster. - -initdb - - + + createdb + + creates a new PostgreSQL + database. + + createdb + + + - -ipcclean -removes shared memory and semaphores left over by an aborted -database server. - -ipcclean - - + + createlang + + defines a new PostgreSQL procedural + language. + + createlang + + + - -pg_config -retrieves -PostgreSQL version -information. - -pg_config - - + + createuser + + defines a new PostgreSQL + user account. + + createuser + + + - -pg_controldata -returns information initialized during -initdb, such as the catalog version and server -locale. - -pg_controldata - - + + dropdb + + removes a PostgreSQL database. + + dropdb + + + - -pg_ctl -controls stopping and starting the database server. - -pg_ctl - - + + droplang + + removes a PostgreSQL procedural + language. + + droplang + + + - -pg_dump -dumps database data and metadata into scripts which are used -to recreate the database. - -pg_dump - - + + dropuser + + removes a PostgreSQL + user account. + + dropuser + + + - -pg_dumpall -recursively calls pg_dump for each -database in a cluster. - -pg_dumpall - - + + ecpg + + is the embedded SQL preprocessor. + + ecpg + + + - -pg_resetxlog -clears the write-ahead log and optionally resets some -fields in the pg_control file. - -pg_resetxlog - - + + initdb + + creates a new database cluster. + + initdb + + + - -pg_restore -creates databases from dump files created by -pg_dump. - -pg_restore - - + + ipcclean + + removes shared memory and semaphores left over by an aborted + database server. + + ipcclean + + + - -pltcl_delmod -is a support script used to delete a module from a -PL/Tcl table. The command -requires the Pgtcl -package to be installed also. - -pltcl_delmod - - + + pg_config + + retrieves PostgreSQL version + information. + + pg_config + + + - -pltcl_listmod -is a support script used to list the modules in a -PL/Tcl table. The command -requires the Pgtcl -package to be installed also. - -pltcl_listmod - - + + pg_controldata + + returns information initialized during + initdb, such as the catalog version and server + locale. + + pg_controldata + + + - -pltcl_loadmod -is a support script used to load a module into a -PL/Tcl table. The command -requires the Pgtcl -package to be installed also. - -pltcl_loadmod - - + + pg_ctl + + controls stopping and starting the database server. + + pg_ctl + + + - -postgres -is a single user database server, generally used for -debugging. - -postgres - - + + pg_dump + + dumps database data and metadata into scripts which are used + to recreate the database. + + pg_dump + + + - -postmaster -is a multi-user database daemon. - -postmaster - - + + pg_dumpall + + recursively calls pg_dump for each + database in a cluster. + + pg_dumpall + + + - -psql -is a console based database shell. - -psql - - + + pg_resetxlog + + clears the write-ahead log and optionally resets some + fields in the pg_control file. + + pg_resetxlog + + + - -vacuumdb -compacts databases and generates statistics for the query -analyzer. - -vacuumdb - - - + + pg_restore + + creates databases from dump files created by + pg_dump. + + pg_restore + + + - + + pltcl_delmod + + is a support script used to delete a module from a + PL/Tcl table. The command + requires the Pgtcl + package to be installed also. + + pltcl_delmod + + + + + + pltcl_listmod + + is a support script used to list the modules in a + PL/Tcl table. The command + requires the Pgtcl + package to be installed also. + + pltcl_listmod + + + + + + pltcl_loadmod + + is a support script used to load a module into a + PL/Tcl table. The command + requires the Pgtcl + package to be installed also. + + pltcl_loadmod + + + + + + postgres + + is a single user database server, generally used for + debugging. + + postgres + + + + + + postmaster + + is a multi-user database daemon. + + postmaster + + + + + + psql + + is a console based database shell. + + psql + + + + + + vacuumdb + + compacts databases and generates statistics for the query + analyzer. + + vacuumdb + + + + + + +