Postgresql System files and their uses
The postmaster.opts File
This postmaster.opts file sets the default invocation options for the postmaster program, which
is the main PostgreSQL program. Typically, it will contain the full path to the postmaster program,
a -D option to set the full path to the principal data directory, and optionally, a -i flag to enable
network connections. The postmaster.opts options are listed in Table 11-5.
Table 11-5. postmaster Options
Option Description
-B nbufs Sets the number of shared memory buffers to nbufs.
-d level Sets the level of debug information (level should be a number 1 through 5) written to the server log.
-D dir Sets the database directory (/data) to dir. There is no default value. If no -D option is set, the value of the environment variable PGDATA is used.
-i Allows remote TCP/IP connections to the database.
-l Allows secure database connections using the Secure Sockets Layer (SSL) protocol. This requires the -i option (network access) and support for SSL to have been compiled in to the server.
-N cons Sets the maximum number of simultaneous connections the server will accept.
-p port Sets the TCP port number that the server should use to listen on.
--help Gets a helpful list of options
Here is an example of a postmaster.opts file from Linux, allowing network connections:
/usr/local/pgsql/bin/postmaster '-i' '-D' '/usr/local/pgsql/data'
And here is a typical Windows file (which would all be on a single line), disallowing remote connections:
C:/Program Files/PostgreSQL/8.0.0/bin/postmaster.exe "-D" "C:/Program Files/PostgreSQL/8.0.0/data"
Notice the different quoting required on Windows systems.
Other PostgreSQL Subdirectories
The following are the other subdirectories normally found under the PostgreSQL base installation
directory:
The doc directory: This contains the online documentation, and may contain additional
documentation for user-contributed additions, depending on your installation choices.
The include and lib directories: These contain the header and library files needed to
create and run client applications for PostgreSQL. See Chapters 13 and 14 for details of
libpq and ecpg, which use these directories.
The man directory: On Linux (and UNIX) only, these contain the manual pages. Adding
this to your MANPATH, (for example, $ export MANPATH=$MANPATH:/usr/local/pgsql/man)
will allow you to view the PostgreSQL manual pages using the man command.
The share directory: This contains a mix of configuration sample files, user-contributed
material, and time zone files. There is also a list of standard SQL features supported by
the current version of PostgreSQL.
Comments
Post a Comment