Roadmap (Where's All My Stuff?)

I find it much easier to administer a product if I know where every component is located. With that in mind, let's explore the directory structure for a “standard” PostgreSQL installation.

When you install PostgreSQL, whether from an RPM (Red Hat Package Manager) or from source, it will be configured to install into a particular set of directories. The exact location for any given set of PostgreSQL files is determined when the package is built from source code.

When you build a copy of PostgreSQL from source code (more on that a little later), the —prefix= directory-name flag determines the installation directory. The default value for —prefix is /usr/local/pgsql. You can change this by supplying a different prefix directory when you run the configure program:

$ ./configure —prefix=/home/bruce/pg801

If you want more control over the location of each component, you can add some more options to the configure command line. Table 21.1 shows the location of each component. The leftmost column shows the name of a configure option, the second column lists PostgreSQL components, and the last column shows the component type.

Table 21.1. PostgreSQL Executable, Library, and Header Locations
Directory NameFilenameFile Type
bindirclusterdbshell script
 createdbshell script
 createlangshell script
 createusershell script
 dropdbshell script
 droplangshell script
 dropusershell script
 ecpgexecutable
 initdbshell script
 initlocationshell script
 ipccleanshell script
 pg_configshell script
 pg_controldataexecutable
 pg_ctlshell script
 pg_dumpexecutable
 pg_dumpallexecutable
 pg_encodingexecutable
 pg_idexecutable
 pg_resetxlogexecutable
 pg_restoreexecutable
 postgresexecutable
 postmastersymbolic link
 psqlexecutable
 vacuumdbshell script
 sbindirNot used
 libexecdirNot used
datadirconversion_create.sqlSQL script
/postgresqlpg_hba.conf.sampleexample
 pg_ident.conf.sampleexample
 postgres.bkiserver bootstrap
 postgres.descriptionserver bootstrap
 postgresql.conf.sampleexample
docdirpostgresql/html/*Documentation in HTML form
sysconfdirNot used 
sharedstatedirNot used 
localstatedirNot used 
libdirlibecpg.aECPG - library
 libecpg.soECPG - shared
 libpq.alibpq - library
 libpq.solibpq - shared
 postgresql/plpgsql.soPL/PGSQL - shared
 postgresql/*Character mappings
includedirecpgerrno.hCPP include file
 ecpglib.hCPP include file
 ecpgtype.hCPP include file
 libpq-fe.hCPP include file
 pg_config.hCPP include file
 pg_config_os.hCPP include file
 postgres_ext.hCPP include file
 sql3types.hCPP include file
 sqlca.hCPP include file
 libpq/libpq-fs.hCPP include file
 postgresql/*CPP include file
oldincludedirNot used 
infodirNot used 
mandirman1/*Manual pages
 man7/*Manual pages

If you want, for example, to place the PostgreSQL shared libraries in a particular directory, you would add —libdir= location to the configure command line.

The directories marked as not used are described when you run configure —help (configure is a commonly used generic configuration program), but are not used by PostgreSQL.

Table 21.1 shows where PostgreSQL will install the content of a basic configuration. You also can configure PostgreSQL to install optional packages (such as PL/Perl). Tables 21.2 and 21.3, later in the chapter, show where PostgreSQL will install each of the optional packages.

Table 21.2. Source Package Contents
Package NamePackage Contents
baseserver (postgres, postmaster)
 contributed software (contrib)
 include files
 initdb
 ipcclean
 pg_config
 pg_controldata
 pg_ctl
 pg_dump
 pg_resetxlog
 psql
 clusterdb
 createdb
 createlang
 createuser
 dropdb
 droplang
 dropuser
 vacuumdb
 cli client interface
 ecpg client interface
 libpq client interface
 PL/pgSQL server-side language
docsDocumentation in SGML form (converted to HTML and man page format during build process)
optsrc/tools (misc. tools for use by PostgreSQL authors)
 CORBA interface
 Tutorial
 PL/Perl server-side language
 PL/Tcl server-side language
 PL/Python server-side language
testRegression tests

Table 21.3. RPM Package Contents
RPM Package NamePackage Contents
postgresqlclusterdb
 createdb
 createlang
 createuser
 dropdb
 droplang
 dropuser
 pg_dump
 pg_dumpall
 pg_restore
 psql
 vacuumdb
 documentation
postgresql-serverinitdb
 ipcclean
 pg_controldata
 pg_ctl
 pg_resetxlog
  server (postgres, postmaster)
 PL/pgSQL
 server locale files
 timezone information
postgresql-libsecpg library
 libpq library
 client locale files
postgresql-contribcontributed software
postgresql-docsdocumentation
postgresql-jdbcJDBC (Java) interface
postgresql-plPL/Perl
 PL/Python
postgresql-pythonPython client interface
postgresql-develecpg (embedded SQL C preprocessor)
 pg_config
 header files (for C development)
 ecpg library
 libpq library
 ecpg and pg_config documentation
postgresql-testregression test suite

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset