Скачать в pdf «PostgreSQL»

There are several tuning options. You can disable fsync() by starting the postmaster with a -o -F option. This will preventfsync()’s from flushing to disk after every transaction.

You can also use the postmaster -B option to increase the number of shared memory buffers used by the backend processes. If you make this parameter too high, the postmaster may not start because you’ve exceeded your kernel’s limit on shared memory space. Each buffer is 8K and the default is 64 buffers.

You can also use the backend -S option to increase the maximum amount of memory used by the backend process for temporary sorts. The -S value is measured in kilobytes, and the default is 512 (ie, 512K).

You can also use the cluster command to group data in tables to match an index. See the cluster manual page for more details.

3.11)    What debugging features are available?

PostgreSQL has several features that report status information that can be valuable for debugging purposes.

First, by running configure with the -enable-cassert option, many assertQ’s monitor the progress of the backend and halt the program when something unexpected occurs.

Both postmaster and postgres have several debug options available. First, whenever you start the postmaster, make sure you send the standard output and error to a log file, like:

cd /usr/loeal/pgsql ./bin/postmaster > server.log 2>&1 &

This will put a server.log file in the top-level PostgreSQL directory. This file contains useful information about problems or errors encountered by the server. Postmaster has a -d option that allows even more detailed information to be reported. The -d option takes a number that specifies the debug level. Be warned that high debug level values generate large log files.

Скачать в pdf «PostgreSQL»