edb-postgresNameEDB-POSTGRES -- run an EnterpriseDB server in single-user mode SynopsisEDB-POSTGRES [-A 0 | 1 ] [-B nbuffers] [-c name=value] [-d debug-level] [--describe-config] [-D datadir] [-e] [-E] [-f s | i | t | n | m | h ] [-F] [-N] [-o filename] [-O] [-P] [-s | -t pa | pl | ex ] [-S work-mem] [-W seconds] [--name=value] database EDB-POSTGRES [-A 0 | 1 ] [-B nbuffers] [-c name=value] [-d debug-level] [-D datadir] [-e] [-f s | i | t | n | m | h ] [-F] [-o filename] [-O] [-p database] [-P] [-s | -t pa | pl | ex ] [-S work-mem] [-v protocol] [-W seconds] [--name=value] Description The EDB-POSTGRES executable is the actual
EnterpriseDB server process that processes
queries. It is normally not called directly; instead an edb-postmaster multiuser server is started.
The second form above is how
EDB-POSTGRES is invoked by the edb-postmaster (only
conceptually, since both postmaster and
EDB-POSTGRES are in fact the same program); it
should not be invoked directly this way. The first form invokes
the server directly in interactive single-user mode. The primary use
for this mode is during bootstrapping by initdb.
Sometimes it is used for debugging or disaster recovery.
When invoked in interactive mode from the shell, the user can enter
queries and the results will be printed to the screen, but in a
form that is more useful for developers than end users. But note
that running a single-user server is not truly suitable for
debugging the server since no realistic interprocess communication
and locking will happen.
When running a stand-alone server, the session user will be set to
the user with ID 1. This user does not actually have to exist, so
a stand-alone server can be used to manually recover from certain
kinds of accidental damage to the system catalogs. Implicit
superuser powers are granted to the user with ID 1 in stand-alone
mode.
Options When EDB-POSTGRES is started by an edb-postmaster then it
inherits all options set by the latter. Additionally,
EDB-POSTGRES-specific options can be passed
from the postmaster with the
-o switch.
You can avoid having to type these options by setting up a
configuration file. See Section 30.4 for details. Some
(safe) options can also be set from the connecting client in an
application-dependent way. For example, if the environment
variable PGOPTIONS is set, then
libpq-based clients will pass that string to the
server, which will interpret it as
EDB-POSTGRES command-line options.
General Purpose The options -A, -B,
-c, -d, -D,
-F, and --name have the same meanings
as the edb-postmaster except that
-d 0 prevents the server log level of
the postmaster from being propagated to EDB-POSTGRES.
- -e
Sets the default date style to "European", that is
DMY ordering of input date fields. This also causes
the day to be printed before the month in certain date output formats.
See Section 7.4 for more information.
- -o filename
Send all server log output to
filename.
If EDB-POSTGRES is running under the
postmaster, this option is ignored,
and the stderr inherited from the
postmaster is used.
- -P
Ignore system indexes when reading system tables (but still update
the indexes when modifying the tables). This is useful when
recovering from damaged system indexes.
- -s
Print time information and other statistics at the end of each command.
This is useful for benchmarking or for use in tuning the number of
buffers.
- -S work-mem
Specifies the amount of memory to be used by internal sorts and hashes
before resorting to temporary disk files. See the description of the
work_mem configuration parameter in Section 30.4.4.1.
Options for stand-alone mode- database
Specifies the name of the database to be accessed. If it is
omitted it defaults to the user name.
- -E
Echo all commands.
- -N
Disables use of newline as a statement delimiter.
Semi-internal Options There are several other options that may be specified, used
mainly for debugging purposes. These are listed here only for
the use by EnterpriseDB system
developers. Use of any of these options is highly
discouraged. Furthermore, any of these options may
change in a subsequent releases.
- -f { s | i | m | n | h }
Forbids the use of particular scan and join methods:
s and i
disable sequential and index scans respectively, while
n, m, and h
disable nested-loop, merge and hash joins respectively.
Note: Neither sequential scans nor nested-loop joins can be disabled completely;
the -fs and -fn
options simply discourage the optimizer from using those
plan types if it has any other alternative.
- -O
Allows the structure of system tables to be modified. This is
used by initdb.
- -p database
Indicates that this process has been started by a
postmaster and specifies the database to use
etc.
- -t pa[rser] | pl[anner] | e[xecutor]
Print timing statistics for each query relating to each of the
major system modules. This option cannot be used together
with the -s option.
- -v protocol
Specifies the version number of the frontend/backend protocol
to be used for this particular session.
- -W seconds
As soon as this option is encountered, the process sleeps for
the specified amount of seconds. This gives developers time
to attach a debugger to the server process.
- --describe-config
This option dumps out the server's internal configuration variables,
descriptions, and defaults in tab-delimited COPY format.
It is designed primarily for use by administration tools.
Environment- PGDATA
Default data directory location
For others, which have little influence during single-user mode,
see edb-postmaster.
Notes To cancel a running query, send the SIGINT signal
to the EDB-POSTGRES process running that command.
To tell EDB-POSTGRES to reload the configuration files,
send a SIGHUP signal. Normally it's best to
SIGHUP the postmaster instead;
the postmaster will in turn SIGHUP
each of its children. But in some cases it might be desirable to have only
one EDB-POSTGRES process reload the configuration files.
The postmaster uses SIGTERM
to tell an EDB-POSTGRES process to quit normally and
SIGQUIT to terminate without the normal cleanup.
These signals should not be used by users. It is also
unwise to send SIGKILL to an EDB-POSTGRES
process — the postmaster will interpret this as
a crash in EDB-POSTGRES, and will force all the sibling
EDB-POSTGRES processes to quit as part of its standard
crash-recovery procedure.
Usage Start a stand-alone server with a command like
edb-postgres -D /usr/local/pgsql/data other-options my_database
Provide the correct path to the database directory with -D, or
make sure that the environment variable PGDATA is set.
Also specify the name of the particular database you want to work in.
Normally, the stand-alone server treats newline as the command
entry terminator; there is no intelligence about semicolons,
as there is in psql. To continue a command
across multiple lines, you must type backslash just before each
newline except the last one.
But if you use the -N command line switch, then newline does
not terminate command entry. In this case, the server will read the standard input
until the end-of-file (EOF) marker, then
process the input as a single command string. Backslash-newline is not
treated specially in this case.
To quit the session, type EOF
(Control+D, usually).
If you've
used -N, two consecutive EOFs are needed to exit.
Note that the stand-alone server does not provide sophisticated
line-editing features (no command history, for example).
|