]> begriffs open source - ai-pg/blob - full-docs/txt/runtime-config-error-handling.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / runtime-config-error-handling.txt
1
2 19.14. Error Handling #
3
4    exit_on_error (boolean) #
5           If on, any error will terminate the current session. By default,
6           this is set to off, so that only FATAL errors will terminate the
7           session.
8
9    restart_after_crash (boolean) #
10           When set to on, which is the default, PostgreSQL will
11           automatically reinitialize after a backend crash. Leaving this
12           value set to on is normally the best way to maximize the
13           availability of the database. However, in some circumstances,
14           such as when PostgreSQL is being invoked by clusterware, it may
15           be useful to disable the restart so that the clusterware can
16           gain control and take any actions it deems appropriate.
17
18           This parameter can only be set in the postgresql.conf file or on
19           the server command line.
20
21    data_sync_retry (boolean) #
22           When set to off, which is the default, PostgreSQL will raise a
23           PANIC-level error on failure to flush modified data files to the
24           file system. This causes the database server to crash. This
25           parameter can only be set at server start.
26
27           On some operating systems, the status of data in the kernel's
28           page cache is unknown after a write-back failure. In some cases
29           it might have been entirely forgotten, making it unsafe to
30           retry; the second attempt may be reported as successful, when in
31           fact the data has been lost. In these circumstances, the only
32           way to avoid data loss is to recover from the WAL after any
33           failure is reported, preferably after investigating the root
34           cause of the failure and replacing any faulty hardware.
35
36           If set to on, PostgreSQL will instead report an error but
37           continue to run so that the data flushing operation can be
38           retried in a later checkpoint. Only set it to on after
39           investigating the operating system's treatment of buffered data
40           in case of write-back failure.
41
42    recovery_init_sync_method (enum) #
43           When set to fsync, which is the default, PostgreSQL will
44           recursively open and synchronize all files in the data directory
45           before crash recovery begins. The search for files will follow
46           symbolic links for the WAL directory and each configured
47           tablespace (but not any other symbolic links). This is intended
48           to make sure that all WAL and data files are durably stored on
49           disk before replaying changes. This applies whenever starting a
50           database cluster that did not shut down cleanly, including
51           copies created with pg_basebackup.
52
53           On Linux, syncfs may be used instead, to ask the operating
54           system to synchronize the file systems that contain the data
55           directory, the WAL files and each tablespace (but not any other
56           file systems that may be reachable through symbolic links). This
57           may be a lot faster than the fsync setting, because it doesn't
58           need to open each file one by one. On the other hand, it may be
59           slower if a file system is shared by other applications that
60           modify a lot of files, since those files will also be written to
61           disk. Furthermore, on versions of Linux before 5.8, I/O errors
62           encountered while writing data to disk may not be reported to
63           PostgreSQL, and relevant error messages may appear only in
64           kernel logs.
65
66           This parameter can only be set in the postgresql.conf file or on
67           the server command line.