SET SESSION AUTHORIZATION

NameSET SESSION AUTHORIZATION -- set the session user identifier and the current user identifier of the current session Synopsis SET [ SESSION | LOCAL ] SESSION AUTHORIZATION user_name SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT RESET SESSION AUTHORIZATION Description This command sets the session user identifier and the current user identifier of the current SQL session to be user_name. The user name can be written as either an identifier or a string literal. Using this com

SET

NameSET -- change a run-time parameter Synopsis SET [ SESSION | LOCAL ] configuration_parameter { TO | = } { value | 'value' | DEFAULT } SET [ SESSION | LOCAL ] TIME ZONE { timezone | LOCAL | DEFAULT } Description The SET command changes run-time configuration parameters. Many of the run-time parameters listed in Chapter 19 can be changed on-the-fly with SET. (But some require superuser privileges to change, and others cannot be changed after server or session start.) SET only affects

Server Configuration: Version and Platform Compatibility

19.13.1. Previous PostgreSQL Versions array_nulls (boolean) This controls whether the array input parser recognizes unquoted NULL as specifying a null array element. By default, this is on, allowing array values containing null values to be entered. However, PostgreSQL versions before 8.2 did not support null values in arrays, and therefore would treat NULL as specifying a normal array element with the string value "NULL". For backward compatibility with applications that require the old be

Server Configuration: Short Options

For convenience there are also single letter command-line option switches available for some parameters. They are described in Table 19-2. Some of these options exist for historical reasons, and their presence as a single-letter option does not necessarily indicate an endorsement to use the option heavily. Table 19-2. Short Option Key Short Option Equivalent -B x shared_buffers = x -d x log_min_messages = DEBUGx -e datestyle = euro -fb, -fh, -fi, -fm, -fn, -fo, -fs, -ft enable_bitmapscan =

Server Configuration: Write Ahead Log

For additional information on tuning these settings, see Section 30.4. 19.5.1. Settings wal_level (enum) wal_level determines how much information is written to the WAL. The default value is minimal, which writes only the information needed to recover from a crash or immediate shutdown. replica adds logging required for WAL archiving as well as information required to run read-only queries on a standby server. Finally, logical adds information necessary to support logical decoding. Each lev

Server Configuration: Run-time Statistics

19.9.1. Query and Index Statistics Collector These parameters control server-wide statistics collection features. When statistics collection is enabled, the data that is produced can be accessed via the pg_stat and pg_statio family of system views. Refer to Chapter 28 for more information. track_activities (boolean) Enables the collection of information on the currently executing command of each session, along with the time when that command began execution. This parameter is on by default.

Server Configuration: Resource Consumption

19.4.1. Memory shared_buffers (integer) Sets the amount of memory the database server uses for shared memory buffers. The default is typically 128 megabytes (128MB), but might be less if your kernel settings will not support it (as determined during initdb). This setting must be at least 128 kilobytes. (Non-default values of BLCKSZ change the minimum.) However, settings significantly higher than the minimum are usually needed for good performance. This parameter can only be set at server st

Server Configuration: Setting Parameters

19.1.1. Parameter Names and Values All parameter names are case-insensitive. Every parameter takes a value of one of five types: boolean, string, integer, floating point, or enumerated (enum). The type determines the syntax for setting the parameter: Boolean: Values can be written as on, off, true, false, yes, no, 1, 0 (all case-insensitive) or any unambiguous prefix of one of these. String: In general, enclose the value in single quotes, doubling any single quotes within the value. Quotes

Server Configuration: Preset Options

The following "parameters" are read-only, and are determined when PostgreSQL is compiled or when it is installed. As such, they have been excluded from the sample postgresql.conf file. These options report various aspects of PostgreSQL behavior that might be of interest to certain applications, particularly administrative front-ends. block_size (integer) Reports the size of a disk block. It is determined by the value of BLCKSZ when building the server. The default value is 8192 bytes. The me

Server Configuration: Lock Management

deadlock_timeout (integer) This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The check for deadlock is relatively expensive, so the server doesn't run it every time it waits for a lock. We optimistically assume that deadlocks are not common in production applications and just wait on the lock for a while before checking for a deadlock. Increasing this value reduces the amount of time wasted in needless deadlock checks, but