Hello, I’m DocuDroid!
Submitting feedback
Thank you for rating our AI Search!
We would be grateful if you could share your thoughts so we can improve our AI Search for you and other readers.
GitHub

Server configuration parameters (GUCs)

Contents

This page lists server configuration parameters supported in Greengage DB, sorted alphabetically. To learn more about the server configuration mechanism, see Configure DBMS via GUCs.

A separate subsection Developer parameters lists parameters intended only for development and testing. Do not change them in production.

Some Greengage DB configuration parameters are intentionally skipped in this section. Typically, such parameters are not meant for user modification in real-world scenarios.

NOTE
  • A parameter’s context determines the ways to change its value. See Context for descriptions of possible context values.

  • Definition scope determines where the parameter can be set: master or local (independent values for master and segments). See master and local for details. For parameters that cannot be set by users, the definition scope is read only.

application_name

Sets the application name for a client session. For example, if connecting via psql, this will be set to psql. Setting an application name allows it to be reported in log messages and statistics views.

Value range Default value Definition scope Context

string

 — 

master

user

archive_command

A shell command used to archive write-ahead log (WAL) files if archive_mode is on or always. The command must return zero exit status if and only if it succeeds.

The command can include placeholders:

  • %p — path to the WAL file to archive, relative to the data directory.

  • %f — name of the WAL file to archive.

NOTE

To include the actual % character in the command, use %%.

Value range Default value Definition scope Context

string

 — 

master

sighup

archive_mode

Defines whether to send completed WAL file segments to an archive storage by executing archive_command.

Possible values:

  • off (default) — do not archive WAL files.

  • on — archive WAL files during normal operation.

  • always — always archive WAL files, even during recovery.

Value range Default value Definition scope Context

on
off
always

off

master

postmaster

array_nulls

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. When off, treats NULL as specifying a normal array element with the string value 'NULL'.

Value range Default value Definition scope Context

boolean

on

master

user

authentication_timeout

Maximum time to complete client authentication. This prevents hung clients from occupying a connection indefinitely.

Value range Default value Definition scope Context

Time expression (number and unit)

1min

local

sighup

backslash_quote

Controls whether a quote mark can be represented by \' in a string literal. The preferred SQL-standard way to represent a quote mark is doubling it (''), but PostgreSQL has historically also accepted \'. However, use of \' creates security risks because in some client character set encodings, there are multibyte characters in which the last byte is numerically equivalent to ASCII \.

Possible values:

  • on — always allow \';

  • off — always reject;

  • safe_encoding — allow only if client encoding does not allow ASCII \ within a multibyte character.

Value range Default value Definition scope Context

on
off
safe_encoding

safe_encoding

master

user

block_size

Reports the size of a disk block in bytes.

Value range Default value Definition scope Context

integer > 0

32768

read only

internal

bonjour_name

Specifies the Bonjour broadcast name. By default, the host name is used, specified as an empty string. This option is ignored if the server was not compiled with Bonjour support.

Value range Default value Definition scope Context

string

 — 

master

postmaster

check_function_bodies

When set to off, deactivates validation of the function body string during CREATE FUNCTION. Deactivating validation is occasionally useful to avoid problems such as forward references when restoring function definitions from a dump.

Value range Default value Definition scope Context

boolean

on

master

user

client_connection_check_interval

Sets the time interval between optional checks that the client is still connected while running queries, in milliseconds. 0 deactivates connection checks.

Value range Default value Definition scope Context

integer >= 0

0

master

user

client_encoding

Sets the client-side encoding (character set). The default is to use the same encoding as the database. See Supported Character Sets in the PostgreSQL documentation.

Value range Default value Definition scope Context

character set

UTF8

master

user

client_min_messages

Controls which message levels are sent to the client. Each level includes all the levels that follow it. The later the level, the fewer messages are sent. INFO level messages are always sent to the client.

Value range Default value Definition scope Context

DEBUG5
DEBUG4
DEBUG3
DEBUG2
DEBUG1
LOG
NOTICE
WARNING
ERROR
FATAL
PANIC

NOTICE

master

user

cpu_index_tuple_cost

For the Postgres planner, sets the estimate of the cost of processing each index row during an index scan. This is measured as a fraction of the cost of a sequential page fetch.

Value range Default value Definition scope Context

floating point

0.005

master

user

cpu_operator_cost

For the Postgres planner, sets the estimate of the cost of processing each operator in a WHERE clause. This is measured as a fraction of the cost of a sequential page fetch.

Value range Default value Definition scope Context

floating point

0.0025

master

user

cpu_tuple_cost

For the Postgres planner, sets the estimate of the cost of processing each row during a query. This is measured as a fraction of the cost of a sequential page fetch.

Value range Default value Definition scope Context

floating point

0.01

master

user

cursor_tuple_fraction

Tells the Postgres planner how many rows are expected to be fetched in a cursor query. This allows the Postgres planner to use this information to optimize the query plan. The default of 1 means all rows will be fetched.

Value range Default value Definition scope Context

floating point 0.0 — 1.0

1.0

master

user

data_checksums

Reports whether checksums are enabled for heap data storage in the database system. Checksums for heap data are enabled or deactivated when the database system is initialized and cannot be changed.

Heap data pages store heap tables, catalog tables, indexes, and database metadata. Append-optimized storage has built-in checksum support that is unrelated to this parameter.

Greengage DB uses checksums to prevent loading data corrupted in the file system into memory managed by database processes. When heap data checksums are enabled, Greengage DB computes and stores checksums on heap data pages when they are written to disk. When a page is retrieved from disk, the checksum is verified. If the verification fails, an error is generated, and the page is not permitted to load into managed memory.

If the ignore_checksum_failure configuration parameter has been set to on, a failed checksum verification generates a warning, but the page is allowed to be loaded into managed memory. If the page is then updated, it is flushed to disk and replicated to the mirror. This can cause data corruption to propagate to the mirror and prevent a complete recovery. Because of the potential for data loss, the ignore_checksum_failure parameter should only be enabled when needed to recover data.

Value range Default value Definition scope Context

boolean

on

read only

internal

data_directory

Sets the Greengage DB’s data directories for master and each segment on their respective hosts. Initial values are read from the database configuration file during the cluster initialization. Learn more in Create the database configuration file.

Value range Default value Definition scope Context

string

User-defined at initialization

local

postmaster

DateStyle

Sets the display format for date and time values, as well as the rules for interpreting ambiguous date input values. This variable contains two independent components: the output format specification and the input/output specification for year/month/day ordering.

Value range Default value Definition scope Context

<format>, <date style>

where:

  • <format> is ISO, Postgres, SQL, or German.

  • <date style> is DMY, MDY, or YMD.

ISO, MDY

master

user

db_user_namespace

Enables per-database user names. If on, you should create users as username@dbname. To create ordinary global users, simply append @ when specifying the user name in the client.

Value range Default value Definition scope Context

boolean

off

local

sighup

deadlock_timeout

The time to wait on a lock before checking to see if there is a deadlock condition. On a heavily loaded server, you might want to increase this value. Ideally, the setting should exceed your typical transaction time to improve the odds that a lock will be released before the waiter decides to check for deadlock.

Value range Default value Definition scope Context

Time expression (number and unit)

1s

master

superuser

debug_assertions

Turns on various assertion checks. The default value is off. You can change the default value to on when building Greengage DB from sources by adding the --enable-cassert option.

Value range Default value Definition scope Context

boolean

off

local

user

debug_pretty_print

Indents debug output to produce a more readable but much longer output format. client_min_messages or log_min_messages must be DEBUG1 or lower.

Value range Default value Definition scope Context

boolean

on

master

user

debug_print_parse

For each query run, prints the resulting parse tree. client_min_messages or log_min_messages must be DEBUG1 or lower.

Value range Default value Definition scope Context

boolean

off

master

user

debug_print_plan

For each query run, prints the parallel query execution plan. client_min_messages or log_min_messages must be DEBUG1 or lower.

Value range Default value Definition scope Context

boolean

off

master

user

debug_print_prelim_plan

For each query run, prints the preliminary query plan. client_min_messages or log_min_messages must be DEBUG1 or lower.

Value range Default value Definition scope Context

boolean

off

master

user

debug_print_rewritten

For each query run, prints the query rewriter output. client_min_messages or log_min_messages must be DEBUG1 or lower.

Value range Default value Definition scope Context

boolean

off

master

user

debug_print_slice_table

For each query run, prints the query slice plan. client_min_messages or log_min_messages must be DEBUG1 or lower.

Value range Default value Definition scope Context

boolean

off

master

user

default_statistics_target

Sets the default statistics sampling target (the number of values that are stored in the list of common values) for table columns that have not had a column-specific target set via ALTER TABLE SET STATISTICS. Larger values may improve the quality of the Postgres planner estimates.

Value range Default value Definition scope Context

integer 1 — 10000

100

master

user

default_tablespace

The default tablespace in which to create objects (tables and indexes) when a CREATE command does not explicitly specify a tablespace.

Value range Default value Definition scope Context

tablespace name

 — 

master

user

default_text_search_config

Selects the text search configuration that is used by those variants of the text search functions that do not have an explicit argument specifying the configuration. The built-in default is pg_catalog.simple, but initdb will initialize the configuration file with a setting that corresponds to the chosen lc_ctype locale, if a configuration matching that locale can be identified.

Value range Default value Definition scope Context

A text search configuration name

pg_catalog.simple

master

user

default_transaction_deferrable

When running at the SERIALIZABLE isolation level, a deferrable read-only SQL transaction may be delayed before it is allowed to proceed. However, once it begins running, it does not incur any of the overhead required to ensure serializability; so serialization code will have no reason to force it to abort because of concurrent updates, making this option suitable for long-running read-only transactions.

This parameter controls the default deferrable status of each new transaction. It currently has no effect on read-write transactions or those operating at isolation levels lower than SERIALIZABLE. The default is off.

NOTE

Setting default_transaction_deferrable to on has no effect in Greengage DB. Only read-only, SERIALIZABLE transactions can be deferred. However, Greengage DB does not support the SERIALIZABLE transaction isolation level.

Value range Default value Definition scope Context

boolean

off

master

user

default_transaction_isolation

Controls the default isolation level of each new transaction. Greengage DB treats read uncommitted the same way as read committed, and treats serializable the same way as repeatable read.

Value range Default value Definition scope Context

read committed
read uncommitted
repeatable read
serializable

read committed

master

user

default_transaction_read_only

Controls the default read-only status of each new transaction. A read-only SQL transaction cannot alter non-temporary tables.

Value range Default value Definition scope Context

boolean

off

master

user

dynamic_library_path

If a dynamically loadable module needs to be opened and the file name specified in the CREATE FUNCTION or LOAD command does not have a directory component (the name does not contain a slash), the system will search this path for the required file. The compiled-in PostgreSQL package library directory is substituted for $libdir. This is where the modules provided by the standard PostgreSQL distribution are installed.

Value range Default value Definition scope Context

Colon-separated list of absolute paths

$libdir

local

superuser

effective_cache_size

Sets the assumption about the effective size of the disk cache that is available to a single query for the Postgres planner. This is factored into estimates of the cost of using an index; a higher value makes it more likely index scans will be used, a lower value makes it more likely sequential scans will be used. When setting this parameter, you should consider both Greengage DB’s shared buffers and the portion of the kernel’s disk cache that will be used for data files (though some data might exist in both places). Take also into account the expected number of concurrent queries on different tables, since they will have to share the available space. This parameter has no effect on the size of shared memory allocated by a Greengage DB server instance, nor does it reserve kernel disk cache; it is used only for estimation purposes.

Set this parameter to a number of block_size blocks (default 32K) with no units; for example, 262144 for 8 GB. You can also directly specify the size of the effective cache; for example, 1GB specifies a size of 32768 blocks. The gpconfig utility and SHOW command display the effective cache size value in units such as GB, MB, or kB.

Value range Default value Definition scope Context

integer (in blocks)
or
number and unit

524288 (16 GB)

master

user

enable_bitmapscan

Activates or deactivates the use of bitmap-scan plan types by the Postgres planner. Note that this is different from a Bitmap Index Scan. A Bitmap Scan means that indexes will be dynamically converted to bitmaps in memory when appropriate, giving faster index performance on complex queries against very large tables. It is used when there are multiple predicates on different indexed columns. Each bitmap per column can be compared to create a final list of selected tuples.

Value range Default value Definition scope Context

boolean

on

master

user

enable_groupagg

Activates or deactivates the use of group aggregation plan types by the Postgres planner.

Value range Default value Definition scope Context

boolean

on

master

user

enable_hashagg

Activates or deactivates the use of hash aggregation plan types by the Postgres planner.

Value range Default value Definition scope Context

boolean

on

master

user

enable_hashjoin

Activates or deactivates the use of hash-join plan types by the Postgres planner.

Value range Default value Definition scope Context

boolean

on

master

user

enable_indexonlyscan

Activates or deactivates the use of index-only scan plans by the Postgres planner.

Value range Default value Definition scope Context

boolean

on

master

user

enable_indexscan

Activates or deactivates the use of index-scan plan types by the Postgres planner.

Value range Default value Definition scope Context

boolean

on

master

user

enable_mergejoin

Activates or deactivates the use of merge-join plan types by the Postgres planner. Merge join is based on the idea of sorting the left- and right-hand tables into order and then scanning them in parallel. Both data types must be capable of being fully ordered, and the join operator must be one that can only succeed for pairs of values that fall at the "same place" in the sort order. In practice, this means that the join operator must behave like equality.

Value range Default value Definition scope Context

boolean

off

master

user

enable_nestloop

Activates or deactivates the use of nested-loop join plans by the Postgres planner. Turning this parameter off discourages the Postgres planner from using nested-loop joins by adding 10000000000 (1.0e10) to each Nested Loop node’s cost. Note that this does not suppress nested-loop joins entirely but reduces their use to the minimum if there are other methods available.

Value range Default value Definition scope Context

boolean

off

master

user

enable_seqscan

Activates or deactivates the use of sequential scan plan types by the Postgres planner. Turning this parameter off discourages the Postgres planner from using sequential scans by adding 10000000000 (1.0e10) to each Seq Scan node’s cost. Note that this does not suppress sequential scans entirely but reduces their use to the minimum if there are other methods available.

Value range Default value Definition scope Context

boolean

on

master

user

enable_sort

Activates or deactivates the use of explicit sort steps by the Postgres planner. Turning this parameter off discourages the Postgres planner from using explicit sorts by adding 10000000000 (1.0e10) to each Sort node’s cost. Note that this does not suppress explicit sorts entirely but reduces their use to the minimum if there are other methods available.

Value range Default value Definition scope Context

boolean

on

master

user

enable_tidscan

Activates or deactivates the use of tuple identifier (TID) scan plan types by the Postgres planner.

Value range Default value Definition scope Context

boolean

on

master

user

escape_string_warning

When on, a warning is issued if a backslash (\) appears in an ordinary string literal ('…​' syntax). Escape string syntax (E'…​') should be used for escapes.

Value range Default value Definition scope Context

boolean

on

master

user

explain_memory_verbosity

Sets the level of memory usage details in EXPLAIN ANALYZE. Possible values (from the lowest to the highest level):

  • suppress (default) — only general memory usage information for the whole query.

  • summary — basic memory usage information for each executor node.

  • detail — detailed memory usage information for each executor node.

  • debug — debug-level information about memory usage by the query.

Value range Default value Definition scope Context

suppress
summary
detail
debug

suppress

master

user

extra_float_digits

Adjusts the number of digits displayed for floating-point values, including float4, float8, and geometric data types. The parameter value is added to the standard number of digits. The value can be set as high as 3, to include partially-significant digits; this is especially useful for dumping float data that needs to be restored exactly. Can be set to a negative value to suppress unwanted digits.

Value range Default value Definition scope Context

integer -15 — 3

0

master

user

from_collapse_limit

The Postgres planner will merge subqueries into upper queries if the resulting FROM list would have no more than this many items. Smaller values reduce planning time but may yield inferior query plans.

Value range Default value Definition scope Context

integer > 0

20

master

user

gp_adjust_selectivity_for_outerjoins

Enables the selectivity of NULL tests over outer joins.

Value range Default value Definition scope Context

boolean

on

master

user

gp_appendonly_compaction_threshold

Specifies the threshold ratio (as a percentage) of hidden rows to total rows that triggers compaction of the segment file when VACUUM is run without the FULL option (a lazy vacuum). If the ratio of hidden rows in a segment file on a segment is less than this threshold, the segment file is not compacted, and a log message is issued.

Value range Default value Definition scope Context

integer (%)

10

master

user

gp_autostats_allow_nonowner

Determines whether to allow Greengage DB to trigger automatic statistics collection when a table is modified by a non-owner.

The default value is false: Greengage DB does not trigger automatic statistics collection on a table that is updated by a non-owner.

When set to true, Greengage DB will also trigger automatic statistics collection on a table when:

  • gp_autostats_mode=on_change and table modified by a non-owner.

  • gp_autostats_mode=on_no_stats and the first user to INSERT or COPY into the table is a non-owner.

Can only be changed by a superuser.

Value range Default value Definition scope Context

boolean

false

master

superuser

gp_autostats_mode

Specifies the mode for triggering automatic statistics collection with ANALYZE. The on_no_stats value triggers statistics collection for CREATE TABLE AS SELECT, INSERT, or COPY operations on any table that has no existing statistics.

The on_change value triggers statistics collection only when the number of rows affected exceeds the threshold defined by gp_autostats_on_change_threshold. Operations that can trigger automatic statistics collection with on_change are CREATE TABLE AS SELECT, UPDATE, DELETE, INSERT, and COPY.

Default is on_no_stats.

NOTE

For partitioned tables, automatic statistics collection is not triggered if data is inserted from the top-level parent table of a partitioned table. Automatic statistics collection is triggered if data is inserted directly in a leaf table (where the data is stored) of the partitioned table. Statistics are collected only on the leaf table.

Value range Default value Definition scope Context

none
on_change
on_no_stats

on_no_stats

master

user

gp_autostats_mode_in_functions

Specifies the mode for triggering automatic statistics collection with ANALYZE for statements in procedural language functions. The none value deactivates statistics collection. The on_no_stats value triggers statistics collection for CREATE TABLE AS SELECT, INSERT, or COPY operations that are run in functions on any table that has no existing statistics.

The on_change value triggers statistics collection only when the number of rows affected exceeds the threshold defined by gp_autostats_on_change_threshold. Operations that can trigger automatic statistics collection with on_change are CREATE TABLE AS SELECT, UPDATE, DELETE, INSERT, and COPY.

Value range Default value Definition scope Context

none
on_change
on_no_stats

none

master

user

gp_autostats_on_change_threshold

Specifies the threshold for automatic statistics collection when gp_autostats_mode is set to on_change. When a triggering table operation affects a number of rows exceeding this threshold, ANALYZE is added and statistics are collected for the table.

Value range Default value Definition scope Context

integer

2147483647

master

user

gp_cached_segworkers_threshold

When a user starts a session with Greengage DB and issues a query, the system creates groups (or gangs) of worker processes on each segment to do the work. After the work is done, the segment worker processes are destroyed except for a cached number, which is set by this parameter. A lower setting conserves system resources on the segment hosts, but a higher setting may improve performance for users who run intensive queries.

Value range Default value Definition scope Context

integer > 0

5

master

user

gp_command_count

Shows how many commands the master has received from the client. Note that a single SQL command might actually involve more than one command internally, so the counter may increment by more than one for a single query. This counter is shared by all the segment processes working on the command.

Value range Default value Definition scope Context

integer > 0

 — 

read only

internal

gp_connection_send_timeout

Timeout for sending data to unresponsive Greengage DB user clients during query processing. A value of 0 deactivates the timeout, Greengage DB waits indefinitely for a client. When the timeout is reached, the query is canceled with this message:

Could not send data to client: Connection timed out.
Value range Default value Definition scope Context

number of seconds

3600 (1 hour)

master

sighup

gp_contentid

Local content ID of a segment:

  • -1 for master;

  • 0..N-1 for segments.

Value range Default value Definition scope Context

integer

 — 

read only

postmaster

gp_count_host_segments_using_address

By default (off), Greengage DB calculates segment memory allocation for resource groups using gp_segment_configuration.hostname. When set to on, segment memory is calculated using gp_segment_configuration.address.

Value range Default value Definition scope Context

boolean

off

master

postmaster

gp_create_table_random_default_distribution

Controls table creation when a Greengage DB table is created with a CREATE TABLE or CREATE TABLE AS command that does not contain a DISTRIBUTED BY clause.

For CREATE TABLE, if the value of the parameter is off (the default), and the table creation command does not contain a DISTRIBUTED BY clause, Greengage DB chooses the table distribution key based on the command:

  • If a LIKE or INHERITS clause is specified, then Greengage DB copies the distribution key from the source or parent table.

  • If a PRIMARY KEY or UNIQUE constraint is specified, then Greengage DB chooses the largest subset of all the key columns as the distribution key.

  • If neither constraints nor a LIKE or INHERITS clause is specified, then Greengage DB chooses the first suitable column as the distribution key. Columns with geometric or user-defined data types are not eligible as Greengage DB distribution key columns.

If the value of the parameter is set to on, Greengage DB follows these rules to create a table when the DISTRIBUTED BY clause is not specified:

  • If PRIMARY KEY or UNIQUE columns are not specified, the distribution of the table is random (DISTRIBUTED RANDOMLY). Table distribution is random even if the table creation command contains the LIKE or INHERITS clause.

  • If PRIMARY KEY or UNIQUE columns are specified, a DISTRIBUTED BY clause must also be specified. If a DISTRIBUTED BY clause is not specified as part of the table creation command, the command fails.

For a CREATE TABLE AS command that does not contain a distribution clause:

  • If the Postgres planner creates the table, and the value of the parameter is off, the table distribution policy is determined based on the command.

  • If the Postgres planner creates the table, and the value of the parameter is on, the table distribution policy is random.

  • If GPORCA creates the table, the table distribution policy is random. The parameter value has no effect.

Value range Default value Definition scope Context

boolean

off

master

user

gp_dbid

Local content DBID of a segment.

Value range Default value Definition scope Context

integer

 — 

read only

postmaster

gp_debug_linger

Number of seconds for a Greengage DB process to linger after a fatal internal error.

Value range Default value Definition scope Context

Time expression (value and unit)

0

master

user

gp_default_storage_options

Sets the default values for table storage options when a table is created with the CREATE TABLE command:

  • appendoptimized

    NOTE

    You use the appendoptimized=value syntax to specify the append-optimized table storage type. appendoptimized is a thin alias for the appendonly legacy storage option. Greengage DB stores appendonly in the catalog, and displays the same when listing the storage options for append-optimized tables.

  • blocksize

  • checksum

  • compresstype

  • compresslevel

  • orientation

Specify multiple storage option values as a comma-separated list.

You can set the storage options with this parameter instead of specifying the table storage options in the WITH of the CREATE TABLE command. The table storage options that are specified with the CREATE TABLE command override the values specified by this parameter.

Not all combinations of storage option values are valid. If the specified storage options are not valid, an error is returned. See the CREATE TABLE command reference for information about table storage options.

The defaults can be set for a database and a user. If the server configuration parameter is set at different levels, this is the order of precedence, from highest to lowest, of the table storage values when a user logs into a database and creates a table:

  1. The values specified in a CREATE TABLE command with the WITH clause or ENCODING clause.

  2. The value of gp_default_storage_options that is set for the user with the ALTER ROLE …​ SET command.

  3. The value of gp_default_storage_options that is set for the database with the ALTER DATABASE …​ SET command.

  4. The value of gp_default_storage_options that is set for the Greengage DB system with the gpconfig utility.

The parameter value is not cumulative. For example, if the parameter specifies the appendoptimized and compresstype options for a database, and a user logs in and sets the parameter to specify the value for the orientation option, the appendoptimized and compresstype values set at the database level are ignored.

This example ALTER DATABASE command sets the default orientation and compresstype table storage options for the database mytest:

ALTER DATABASE mytest SET gp_default_storage_options = 'orientation=column, compresstype=rle_type';

To create an append-optimized table in the mytest database with column-oriented table and RLE compression, the user needs to specify only appendoptimized=TRUE in the WITH clause.

This example of the gpconfig utility command sets the default storage options for a Greengage DB system. If you set the defaults for multiple table storage options, the value must be enclosed in single quotes.

$ gpconfig -c 'gp_default_storage_options' -v 'appendoptimized=true, orientation=column'

This example of the gpconfig utility command shows the value of the parameter. The parameter value must be consistent across the Greengage DB master and all segments.

$ gpconfig -s 'gp_default_storage_options'
Value range Default value Definition scope Context

appendoptimized=TRUE | FALSE

blocksize=8192..2097152

checksum=TRUE | FALSE

compresstype=ZLIB | ZSTD | RLE_TYPE | NONE

compresslevel=0..19

orientation=ROW | COLUMN

appendoptimized=FALSE

blocksize=32768

checksum=TRUE

compresstype=none

compresslevel=0

orientation=ROW

master

user

gp_dispatch_keepalives_count

Maximum number of TCP keepalive retransmits from a Query Dispatcher to its Query Executors. It controls the number of consecutive keepalive retransmits that can be lost before a connection between a Query Dispatcher and a Query Executor is considered dead.

Value range Default value Definition scope Context

0 — 127

0 (system default)

master

postmaster

gp_dispatch_keepalives_idle

Time in seconds between issuing TCP keepalives from a Query Dispatcher to its Query Executors.

Value range Default value Definition scope Context

0 — 32767

0 (system default)

master

postmaster

gp_dispatch_keepalives_interval

Time in seconds between TCP keepalive retransmits from a Query Dispatcher to its Query Executors.

Value range Default value Definition scope Context

0 — 32767

0 (system default)

master

postmaster

gp_dtx_recovery_interval

Interval in seconds at which the Distributed Transaction (DTX) recovery process checks for prepared transactions that are not committed or aborted yet. Used to clean up orphaned transactions.

Value range Default value Definition scope Context

5 — 3600

60

master

sighup

gp_dtx_recovery_prepared_period

Time threshold (in seconds) for detecting potentially orphaned transactions for the Distributed Transaction (DTX) recovery process. If a prepared transaction is not committed or aborted within this number of seconds, it is subject to recovery actions.

Value range Default value Definition scope Context

5 — 3600

120

master

sighup

gp_dynamic_partition_pruning

Enables plans that can dynamically eliminate the scanning of partitions.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_agg_distinct

Activates or deactivates two-phase aggregation to compute a single distinct-qualified aggregate. This applies only to subqueries that include a single distinct-qualified aggregate function.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_agg_distinct_pruning

Activates or deactivates three-phase aggregation and joins to compute distinct-qualified aggregates. This applies only to subqueries that include one or more distinct-qualified aggregate functions.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_direct_dispatch

Activates or deactivates the dispatching of targeted query plans for queries that access data on a single segment. When on, queries that target rows on a single segment will only have their query plan dispatched to that segment (rather than to all segments). This significantly reduces the response time of qualifying queries as there is no interconnect setup involved. Direct dispatch does require more CPU utilization on the master.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_exchange_default_partition

Controls the availability of the EXCHANGE DEFAULT PARTITION clause for ALTER TABLE. The default value for the parameter is off. The clause is not available, and Greengage DB returns an error if the clause is specified in an ALTER TABLE command.

If the value is on, Greengage DB returns a warning stating that exchanging the default partition might result in incorrect results due to invalid data in the default partition.

CAUTION

Before you exchange the default partition, you must ensure the data in the table to be exchanged, the new default partition, is valid for the default partition. For example, the data in the new default partition must not contain data that would be valid in other leaf child partitions of the partitioned table. Otherwise, queries against the partitioned table with the exchanged default partition that are run by GPORCA might return incorrect results.

Value range Default value Definition scope Context

boolean

off

master

user

gp_enable_fast_sri

When set to on, the Postgres planner plans single-row inserts so that they are sent directly to the correct segment instance (no motion operation required). This significantly improves the performance of single-row-insert statements.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_global_deadlock_detector

Controls whether the Greengage DB Global Deadlock Detector is enabled to manage concurrent UPDATE and DELETE operations on heap tables to improve performance. The default is off, the Global Deadlock Detector is deactivated. In this case, Greengage DB runs concurrent update and delete operations on a heap table serially.

If the Global Deadlock Detector is enabled, concurrent updates are permitted, and the Global Deadlock Detector determines when a deadlock exists, and breaks the deadlock by cancelling one or more backend processes associated with the youngest transaction(s) involved.

Value range Default value Definition scope Context

boolean

off

master

postmaster

gp_enable_gpperfmon

Activates or deactivates the data collection agents that populate the gpperfmon database.

Value range Default value Definition scope Context

boolean

off

local

postmaster

gp_enable_groupext_distinct_gather

Activates or deactivates gathering data to a single node to compute distinct-qualified aggregates on grouping extension queries. When this parameter and gp_enable_groupext_distinct_pruning are both enabled, the Postgres planner uses the cheaper plan.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_groupext_distinct_pruning

Activates or deactivates three-phase aggregation and join to compute distinct-qualified aggregates on grouping extension queries. Usually, enabling this parameter generates a cheaper query plan that the Postgres planner will use in preference to the existing plan.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_minmax_optimization

Enables the planner’s use of index scans with a limit to optimize the execution of MIN() and MAX() functions on indexed columns.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_multiphase_agg

Activates or deactivates the use of two- or three-stage parallel aggregation plans Postgres planner. This approach applies to any subquery with aggregation. If gp_enable_multiphase_agg is off, then gp_enable_agg_distinct and gp_enable_agg_distinct_pruning are deactivated.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_predicate_propagation

When enabled, the Postgres planner applies query predicates to both table expressions in cases where the tables are joined on their distribution key column(s). Filtering both tables prior to doing the join (when possible) is more efficient.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_preunique

Enables two-phase duplicate removal for SELECT DISTINCT queries (not SELECT COUNT(DISTINCT)). When enabled, it adds an extra SORT DISTINCT set of plan nodes before motioning. In cases where the distinct operation greatly reduces the number of rows, this extra SORT DISTINCT is much cheaper than the cost of sending the rows across the interconnect.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_query_metrics

Enables collection of query metrics. When query metrics collection is enabled, Greengage DB collects metrics during query execution. The default is off.

Value range Default value Definition scope Context

boolean

off

master

postmaster

gp_enable_relsize_collection

Enables GPORCA and the Postgres planner to use the estimated size of a table (pg_relation_size() function) if there are no statistics for the table. By default, GPORCA and the planner use a default value to estimate the number of rows if statistics are not available. The default behavior improves query optimization time and reduces resource queue usage in heavy workloads, but can lead to suboptimal plans.

This parameter is ignored for a root partition of a partitioned table. When GPORCA is enabled and the root partition does not have statistics, GPORCA always uses the default value. You can use ANALYZE ROOTPARTITION to collect statistics on the root partition. See Collect statistics via ANALYZE for details.

Value range Default value Definition scope Context

boolean

off

master

user

gp_enable_sort_distinct

Enables duplicates removal during sorting.

Value range Default value Definition scope Context

boolean

on

master

user

gp_enable_sort_limit

Enables the LIMIT operation to be performed while sorting. Sorts more efficiently when the plan requires the first limit_number of rows at most.

Value range Default value Definition scope Context

boolean

on

master

user

gp_external_enable_exec

Activates or deactivates the use of external tables that run OS commands or scripts on the segment hosts (CREATE EXTERNAL TABLE EXECUTE syntax). Must be enabled if using gpperfmon or MapReduce.

Value range Default value Definition scope Context

boolean

on

master

postmaster

gp_external_enable_filter_pushdown

Enables filter pushdown when reading data from external tables. If pushdown fails, a query is run without pushing filters to the external data source. Instead, Greengage DB applies the same constraints to the result. See External tables overview for more information about external tables.

Value range Default value Definition scope Context

boolean

on

master

user

gp_external_max_segs

Sets the number of segments that will scan external table data during an external table operation. The purpose is to avoid overloading the system with scanning data and taking away resources from other concurrent operations. This only applies to external tables that use the gpfdist:// protocol to access external table data.

Value range Default value Definition scope Context

integer

64

master

user

gp_fts_mark_mirror_down_grace_period

Time interval (in seconds) allowed for a disconnected mirror to reconnect before being marked as down in configuration by the fault detection process (ftsprobe).

Value range Default value Definition scope Context

0 — 3600

30

master

sighup

gp_fts_probe_interval

Specifies the polling interval for the fault detection process (ftsprobe). The ftsprobe process will take approximately this amount of time to detect a segment failure.

Value range Default value Definition scope Context

10 — 3600s

1min

master

sighup

gp_fts_probe_retries

Specifies the number of times the fault detection process (ftsprobe) attempts to connect to a segment before reporting segment failure.

Value range Default value Definition scope Context

integer

5

master

sighup

gp_fts_probe_timeout

Specifies the allowed timeout for the fault detection process (ftsprobe) to establish a connection to a segment before declaring it down.

Value range Default value Definition scope Context

10 — 3600s

20s

master

sighup

gp_fts_replication_attempt_count

Specifies the maximum number of times that Greengage DB attempts to establish a primary-mirror replication connection. When this count is exceeded, the fault detection process (ftsprobe) stops retrying and marks the mirror down.

Value range Default value Definition scope Context

0 — 100

10

master

sighup

gp_global_deadlock_detector_period

Specifies the executing interval of the global deadlock detector background worker process.

Value range Default value Definition scope Context

5 — INT_MAX seconds

2min

master

sighup

gp_gpperfmon_send_interval

Sets the frequency that the Greengage DB server processes send query execution updates to the data collection agent processes used to populate the gpperfmon database. Query operations executed during this interval are sent through UDP to the segment monitor agents. If you find that an excessive number of UDP packets are dropped during long-running, complex queries, you may consider increasing this value.

Value range Default value Definition scope Context

1 — 3600

1

master

superuser

gp_hashjoin_tuples_per_bucket

Sets the target density of the hash table used by hash join operations. A smaller value will tend to produce larger hash tables, which can increase join performance.

Value range Default value Definition scope Context

integer

5

master

user

gp_initial_bad_row_limit

For the parameter value n, Greengage DB stops processing input rows when you import data with the COPY command or from an external table if the first n rows processed contain formatting errors. If a valid row is processed within the first n rows, Greengage DB continues processing input rows.

Setting the value to 0 deactivates this limit.

The SEGMENT REJECT LIMIT clause can also be specified for the COPY command or the external table definition to limit the number of rejected rows.

Value range Default value Definition scope Context

integer >=0

1000

master

user

gp_instrument_shmem_size

The amount of shared memory allocated for query metrics, in kilobytes. The default is 5120 and the maximum is 131072. At startup, if gp_enable_query_metrics is set to on, Greengage DB allocates space in shared memory to save query metrics. This memory is organized as a header and a list of slots. The number of slots needed depends on the number of concurrent queries and the number of execution plan nodes per query. The default value, 5120, is based on a Greengage DB system that runs a maximum of about 250 concurrent queries with 120 nodes per query. If the gp_enable_query_metrics configuration parameter is off, or if the slots are exhausted, the metrics are maintained in local memory instead of in shared memory.

Value range Default value Definition scope Context

0 — 131072

5120

master

postmaster

gp_interconnect_address_type

Specifies the type of address binding strategy Greengage DB uses for communication between segment host sockets. There are two types: unicast and wildcard (default).

  • When this parameter is set to unicast, Greengage DB uses the gp_segment_configuration.address field to perform address binding. This reduces port usage on segment hosts and prevents interconnect traffic from being routed through unintended (and possibly slower) network interfaces.

  • When this parameter is set to wildcard, Greengage DB uses a wildcard address for binding, enabling the use of any network interface compliant with routing rules.

NOTE

In some cases, inter-segment communication using the unicast strategy may not be possible. One example is if the source segment’s address field and the destination segment’s address field are on different subnets and/or existing routing rules do not allow for such communication. In these cases, you must configure gp_interconnect_address_type to use a wildcard address for address binding.

Value range Default value Definition scope Context

wildcard

unicast

wildcard

local

backend

gp_interconnect_cursor_ic_table_size

Specifies the size of the Cursor History Table for UDP interconnect. Although it is not usually necessary, you may increase it if running a user-defined function that contains many concurrent cursor queries hangs. The default value is 128.

Value range Default value Definition scope Context

128 — 102400

128

master

user

gp_interconnect_debug_retry_interval

Specifies the interval, in seconds, to log Greengage DB interconnect debugging messages when the server configuration parameter gp_log_interconnect is set to DEBUG. The default is 10 seconds.

The log messages contain information about the interconnect communication between Greengage DB segment instance worker processes. The information can be helpful when debugging network issues between segment instances.

Value range Default value Definition scope Context

1 — 4096

10

master

user

gp_interconnect_fc_method

Specifies the flow control method used for the default Greengage DB UDPIFC interconnect:

  • For capacity-based flow control, senders do not send packets when receivers do not have the capacity.

  • Loss-based flow control is based on capacity-based flow control, and also tunes the sending speed according to packet losses.

Value range Default value Definition scope Context

CAPACITY
LOSS

LOSS

master

user

gp_interconnect_min_retries_before_timeout

Sets the minimum number of retries before reporting a transmit timeout in the interconnect.

Value range Default value Definition scope Context

1 — 4096

100

master

user

gp_interconnect_min_rto

Sets the minimum retransmission timeout (RTO) for UDP-based interconnect, in milliseconds.

Value range Default value Definition scope Context

1 — 1000

20

master

user

gp_interconnect_proxy_addresses

Sets the proxy ports that Greengage DB uses when the server configuration parameter gp_interconnect_type is set to proxy. Otherwise, this parameter is ignored. The default value is an empty string ("").

When the gp_interconnect_type parameter is set to proxy, you must specify a proxy port for the master, standby master, and all primary and mirror segment instances in this format:

<db_id>:<cont_id>:<seg_address>:<port>[, ... ]

For the master, standby master, and segment instance, the first three fields, db_id, cont_id, and seg_address can be found in the gp_segment_configuration catalog table. The fourth field, port, is the proxy port for the Greengage DB master or a segment instance.

  • <db_id> is the dbid column in the catalog table.

  • <cont_id> is the content column in the catalog table.

  • <seg_address> is the IP address or hostname corresponding to the address column in the catalog table.

  • <port> is the TCP/IP port for the segment instance proxy that you specify.

IMPORTANT

If a segment instance hostname is bound to a different IP address at runtime, you must run gpstop -U to reload the gp_interconnect_proxy_addresses value.

You must specify the value as a single-quoted string. This gpconfig command sets the value for gp_interconnect_proxy_addresses for a cluster of a master and a single segment instance.

$ gpconfig --skipvalidation -c gp_interconnect_proxy_addresses -v "'1:-1:192.168.180.50:35432,2:0:192.168.180.54:35000'"

For an example of setting gp_interconnect_proxy_addresses, see Configure proxies for interconnect.

Value range Default value Definition scope Context

string (maximum length — 16384 bytes)

 — 

local

sighup

gp_interconnect_queue_depth

Sets the amount of data per-peer to be queued by the Greengage DB interconnect on receivers (when data is received but no space is available to receive it, the data will be dropped, and the transmitter will need to resend it) for the default UDPIFC interconnect. Increasing the depth from its default value will cause the system to use more memory, but may increase performance. It is reasonable to set this value between 1 and 10. Queries with data skew potentially perform better with an increased queue depth. Increasing this may radically increase the amount of memory used by the system.

Value range Default value Definition scope Context

1 — 2048

4

master

user

gp_interconnect_setup_timeout

Specifies the amount of time, in seconds, that Greengage DB waits for the interconnect to complete setup before it times out.

Value range Default value Definition scope Context

0 — 7200

7200 (2 hours)

master

user

gp_interconnect_snd_queue_depth

Sets the amount of data per-peer to be queued by the default UDPIFC interconnect on senders. Increasing the depth from its default value will cause the system to use more memory, but may increase performance. Reasonable values for this parameter are between 1 and 4. Increasing the value might radically increase the amount of memory used by the system.

Value range Default value Definition scope Context

1 — 4096

2

master

user

gp_interconnect_tcp_listener_backlog

Size of the listening queue for each TCP interconnect socket. Use this value together with the net.core.somaxconn and net.ipv4.tcp_max_syn_backlog kernel parameters to tune network performance.

Value range Default value Definition scope Context

0 — 65535

128

master

user

gp_interconnect_timer_checking_period

Sets the timer checking period for UDP interconnect, in milliseconds.

Value range Default value Definition scope Context

1 — 100

20

master

user

gp_interconnect_timer_period

Sets the timer period for UDP interconnect, in milliseconds.

Value range Default value Definition scope Context

1 — 100

5

master

user

gp_interconnect_transmit_timeout

Specifies the amount of time, in seconds, that Greengage DB waits for network transmission of interconnect traffic to complete before it times out.

Value range Default value Definition scope Context

1 — 7200

3600 (1 hour)

master

user

gp_interconnect_type

Sets the networking protocol used for Greengage DB interconnect traffic.

UDPIFC (the default) specifies using UDP with flow control for interconnect traffic. Specify the interconnect flow control method with gp_interconnect_fc_method.

With TCP as the interconnect protocol, Greengage DB has an upper limit of 1000 segment instances — less than that if the query workload involves complex, multi-slice queries.

The PROXY value specifies using the TCP protocol, and when running queries, using a proxy for Greengage DB interconnect communication between the master instance and segment instances and between two segment instances. When this parameter is set to PROXY, you must specify the proxy ports for the master and segment instances with the server configuration parameter gp_interconnect_proxy_addresses. For information about configuring and using proxies with the Greengage DB interconnect, see Configure proxies for interconnect.

Value range Default value Definition scope Context

UDPIFC
TCP
PROXY

UDPIFC

local

backend

gp_keep_partition_children_locks

When on, maintains the relation locks on all append-optimized leaf partitions involved in a query until the end of a transaction. Turning this parameter on can help avoid relatively rare visibility issues in queries, such as read beyond eof when running concurrently with lazy VACUUM(s) directly on the leaves.

NOTE

Turning gp_keep_partition_children_locks on implies that an additional lock will be held for each append-optimized child in each partition hierarchy involved in a query, until the end of the transaction. You may need to increase the value of max_locks_per_transaction.

Value range Default value Definition scope Context

boolean

true

master

user

gp_log_format

Specifies the format of the server log files. If using the gp_toolkit administrative schema, the log files must be in CSV format.

Value range Default value Definition scope Context

csv
text

csv

local

postmaster

gp_log_suboverflow_statements

Controls whether Greengage DB logs statements that cause subtransaction overflow.

Value range Default value Definition scope Context

boolean

off

master

superuser

gp_max_local_distributed_cache

Sets the maximum number of distributed transaction log entries to cache in the backend process memory of a segment instance.

The log entries contain information about the state of rows that are being accessed by an SQL statement. The information is used to determine which rows are visible to an SQL transaction when running multiple simultaneous SQL statements in an MVCC environment. Caching distributed transaction log entries locally improves transaction processing speed by improving the performance of the row visibility determination process.

The default value is optimal for a wide variety of SQL processing environments.

Value range Default value Definition scope Context

integer

1024

local

postmaster

gp_max_packet_size

Sets the tuple-serialization chunk size for the Greengage DB interconnect in bytes.

NOTE

The default gp_max_packet_size (8192 bytes) is optimized for environments supporting jumbo frame MTU. For public cloud deployments, MTU capabilities vary by cloud provider and instance type.

Value range Default value Definition scope Context

512 — 65536

8192

master

backend

gp_max_partition_level

Limits the maximum number of levels allowed in a partition hierarchy. By default, the value is 0, which indicates no limit.

Value range Default value Definition scope Context

integer >=0

0 (no limit)

master

superuser

gp_max_plan_size

Specifies the total maximum uncompressed size of a query execution plan multiplied by the number of Motion operators (slices) in the plan. If the size of the query plan exceeds the value, the query is canceled and an error is returned. A value of 0 means that the size of the plan is not monitored.

You can specify a value in kB (default), MB, or GB. For example, a value of 200 is 200kB. A value of 1GB is the same as 1024MB or 1048576kB.

Value range Default value Definition scope Context

integer

0

master

superuser

gp_max_scan_on_shmem

Sets the limit of shared memory slots used by scan nodes for each backend.

Value range Default value Definition scope Context

0 — 3072

300

master

postmaster

gp_max_slices

Specifies the maximum number of slices (portions of a query plan that are run on segment instances) that can be generated by a query. If the query generates more than the specified number of slices, Greengage DB returns an error and does not run the query. The default value is 0 — no maximum value.

Running a query that generates a large number of slices might affect Greengage DB performance. For example, a query that contains UNION or UNION ALL operators over several complex views can generate a large number of slices. You can run EXPLAIN ANALYZE` on the query to view slice statistics for the query.

Value range Default value Definition scope Context

integer >= 0

0

master

user

gp_max_system_slices

NOTE

The gp_max_system_slices parameter is identical in behavior to gp_max_slices, except that it requires superuser privileges. In addition, it takes precedence over gp_max_slices if gp_max_slices is greater than its value.

Specifies the maximum number of slices (portions of a query plan that are run on segment instances) that can be generated by a query. If the query generates more than the specified number of slices, Greengage DB returns an error and does not run the query. The default value is 0, no maximum value.

Running a query that generates a large number of slices might affect Greengage DB performance. For example, a query that contains UNION or UNION ALL operators over several complex views can generate a large number of slices. You can run EXPLAIN ANALYZE` on the query to view slice statistics for the query.

Value range Default value Definition scope Context

integer >= 0

0

master

superuser

gp_motion_cost_per_row

Sets the Postgres Planner cost estimate for a Motion operator to transfer a row from one segment to another, measured as a fraction of the cost of a sequential page fetch. If 0, then the value used is two times the value of cpu_tuple_cost.

Value range Default value Definition scope Context

floating point

0

master

user

gp_print_create_gang_time

When a user starts a session with Greengage DB and issues a query, the system creates groups or "gangs" of worker processes on each segment to do the work. gp_print_create_gang_time controls the display of additional information about gang creation, including gang reuse status and the shortest and longest connection establishment time to the segment.

The default value is false, Greengage DB does not display the additional gang creation information.

Value range Default value Definition scope Context

boolean

false

master

user

gp_reject_percent_threshold

For single row error handling on COPY and external table SELECT queries, sets the number of rows processed before SEGMENT REJECT LIMIT <n> PERCENT starts calculating.

Value range Default value Definition scope Context

1 — n

300

master

user

gp_reraise_signal

If enabled, will attempt to dump core if a fatal server error occurs.

Value range Default value Definition scope Context

boolean

on

master

superuser

gp_resgroup_memory_policy

NOTE

The gp_resgroup_memory_policy server configuration parameter is enforced only when resource group-based resource management is active.

Used by a resource group to manage memory allocation to query operators.

When set to auto, Greengage DB uses resource group memory limits to distribute memory across query operators, allocating a fixed size of memory to non-memory-intensive operators and the rest to memory-intensive operators.

When you specify eager_free, Greengage DB distributes memory among operators more optimally by re-allocating memory released by operators that have completed their processing to operators in a later query stage.

Value range Default value Definition scope Context

auto
eager_free

eager_free

local

superuser

gp_resource_group_bypass

NOTE

The gp_resource_group_bypass server configuration parameter is enforced only when resource group-based resource management is active.

Activates or deactivates the enforcement of resource group concurrent transaction limits on Greengage DB resources. The default value is false, which enforces resource group transaction limits.

You can set this parameter to true to bypass resource group concurrent transaction limitations so that a query can run immediately. For example, you can set the parameter to true for a session to run a system catalog query or a similar query that requires a minimal amount of resources.

When you set this parameter to true and run a query, the query runs in this environment:

  • The query runs inside a resource group. The resource group assignment for the query does not change.

  • The query memory quota is approximately 10 MB per query. The memory is allocated from the resource group’s shared memory or global shared memory. The query fails if there is not enough shared memory available to fulfill the memory allocation request.

This parameter can be set for a session. The parameter cannot be set within a transaction or a function.

Value range Default value Definition scope Context

boolean

false

local

user

gp_resource_group_bypass_catalog_query

NOTE

The gp_resource_group_bypass_catalog_query server configuration parameter is enforced only when resource group-based resource management is active.

The default value for this configuration parameter is false, Greengage DB’s resource group scheduler enforces resource group limits on catalog queries. Note that when false and the database has reached the maximum amount of concurrent transactions, the scheduler can block queries that exclusively read from system catalogs.

When set to true, Greengage DB’s resource group scheduler bypasses all queries that fulfill both of the following criteria:

  • They read exclusively from system catalogs.

  • They contain in their query text pg_catalog schema tables only.

NOTE

If a query contains a mix of pg_catalog and any other schema tables, the scheduler will not bypass the query.

Value range Default value Definition scope Context

boolean

false

local

user

gp_resource_group_cpu_ceiling_enforcement

Enables the ceiling enforcement mode when assigning CPU resources to resource groups by percentage. When deactivated, the elastic mode will be used. See CPU percentage: CPU_RATE_LIMIT for details.

Value range Default value Definition scope Context

boolean

false

local

postmaster

gp_resource_group_cpu_limit

NOTE

The gp_resource_group_cpu_limit server configuration parameter is enforced only when resource group-based resource management is active.

Identifies the maximum percentage of system CPU resources to allocate to resource groups on each Greengage DB segment node.

Value range Default value Definition scope Context

0.1 — 1.0

0.9

local

postmaster

gp_resource_group_cpu_priority

Sets the CPU priority for Greengage DB processes relative to non-Greengage processes when resource groups are enabled. For example, setting this parameter to 10 sets the ratio of allotted CPU resources for Greengage DB processes to non-Greengage processes to 10:1.

NOTE

This ratio calculation applies only when the machine’s CPU usage is at 100%.

Value range Default value Definition scope Context

1 — 50

10

local

postmaster

gp_resource_group_enable_recalculate_query_mem

NOTE

The gp_resource_group_enable_recalculate_query_mem server configuration parameter is enforced only when resource group-based resource management is active.

Specifies whether Greengage DB recalculates the maximum amount of memory to allocate on a segment host per query running in a resource group. The default value is false, Greengage DB calculates the maximum per-query memory on a segment host based on the memory configuration and the number of primary segments on the master host. When set to true, Greengage DB recalculates the maximum per-query memory on a segment host based on the memory and the number of primary segments configured for that segment host.

Value range Default value Definition scope Context

boolean

false

master

user

gp_resource_group_memory_limit

NOTE

The gp_resource_group_memory_limit server configuration parameter is enforced only when resource group-based resource management is active.

Identifies the maximum percentage of system memory resources to allocate to resource groups on each Greengage DB segment node.

NOTE

When resource group-based resource management is active, the memory allotted to a segment host is equally shared by active primary segments. Greengage DB assigns memory to primary segments when the segment takes the primary role. The initial memory allotment to a primary segment does not change, even in a failover situation. This may result in a segment host utilizing more memory than the gp_resource_group_memory_limit setting permits.

For example, suppose your Greengage DB cluster is utilizing the default gp_resource_group_memory_limit of 0.7 and a segment host named sdw1 has 4 primary segments and 4 mirror segments. Greengage DB assigns each primary segment on sdw1 (0.7 / 4 = 0.175) of overall system memory. If failover occurs, and two mirrors on sdw1 fail over to become primary segments, each of the original 4 primaries retains their memory allotment of 0.175, and the two new primary segments are each allotted (0.7 / 6 = 0.116) of system memory. Overall memory allocation on sdw1 in this scenario is 0.7 + (0.116 * 2) = 0.932, which is above the percentage configured in the gp_resource_group_memory_limit setting.

Value range Default value Definition scope Context

0.1 — 1.0

0.7

local

postmaster

gp_resource_group_move_timeout

NOTE

The gp_resource_group_move_timeout server configuration parameter is enforced only when resource group-based resource management is active.

Cancels the pg_resgroup_move_query() function, which moves a running query from one resource group to another, if it waits longer than the specified number of milliseconds.

Value range Default value Definition scope Context

integer >= 10

30000 (30 seconds)

master

user

gp_resource_group_queuing_timeout

NOTE

The gp_resource_group_queuing_timeout server configuration parameter is enforced only when resource group-based resource management is active.

Cancel a transaction queued in a resource group that waits longer than the specified number of milliseconds. The time limit applies separately to each transaction. The default value is zero; transactions are queued indefinitely and never time out.

Value range Default value Definition scope Context

integer >= 0

0

master

user

gp_resource_manager

Identifies the resource management scheme currently enabled in the Greengage DB cluster: resource groups or resource queues. The default scheme is to use resource queues.

Value range Default value Definition scope Context

group
queue

queue

local

postmaster

gp_resqueue_memory_policy

NOTE

The gp_resqueue_memory_policy server configuration parameter is enforced only when resource queue-based resource management is active.

Enables Greengage DB memory management features. The distribution algorithm eager_free takes advantage of the fact that not all operators run at the same time. The query plan is divided into stages and Greengage DB eagerly frees memory allocated to a previous stage at the end of that stage’s execution, then allocates the eagerly freed memory to the new stage.

When set to auto, query memory usage is controlled by statement_mem and resource queue memory limits. When set to none, none of these features are enabled.

Value range Default value Definition scope Context

none
auto
eager_free

eager_free

local

superuser

gp_resqueue_priority

NOTE

The gp_resqueue_priority server configuration parameter is enforced only when resource queue-based resource management is active.

Activates or deactivates query prioritization. When this parameter is deactivated, existing priority settings are not evaluated at query run time.

Value range Default value Definition scope Context

boolean

on

local

postmaster

gp_resqueue_priority_cpucores_per_segment

NOTE

The gp_resqueue_priority_cpucores_per_segment server configuration parameter is enforced only when resource queue-based resource management is active.

Specifies the number of CPU units allocated to each segment instance on a segment host. If the segment is configured with primary-mirror segment instance pairs, use the number of primary segment instances on the host in the calculation. Include any CPU core that is available to the operating system, including virtual CPU cores, in the total number of available cores.

For example, if a Greengage DB cluster has 10-core segment hosts that are configured with four primary segments, set the value to 2.5 on each segment host (10 divided by 4). A master host typically has only a single running master instance, so set the value on the master and standby master hosts to reflect the usage of all available CPU cores, in this case 10.

Incorrect settings can result in CPU under-utilization or query prioritization not working as designed.

Value range Default value Definition scope Context

0.1 — 512.0

4

local

postmaster

gp_resqueue_priority_sweeper_interval

NOTE

The gp_resqueue_priority_sweeper_interval server configuration parameter is enforced only when resource queue-based resource management is active.

Specifies the interval at which the sweeper process evaluates current CPU usage, in milliseconds. When a new statement becomes active, its priority is evaluated and its CPU share is determined when the next interval is reached.

Value range Default value Definition scope Context

500 — 15000

1000 (1 second)

local

postmaster

gp_role

The role of this server process is set to DISPATCH for master and EXECUTE for segments.

Value range Default value Definition scope Context

DISPATCH
EXECUTE
UTILITY

DISPATCH (master)
EXECUTE (segments)

read only

superuser

gp_safefswritesize

Specifies the minimum size for safe write operations to append-optimized tables in a non-mature file system. When a number of bytes greater than zero is specified, the append-optimized writer adds padding data up to that number in order to prevent data corruption due to file system errors. Each non-mature file system has a known safe write size that must be specified here when using Greengage DB with that type of file system. This is commonly set to a multiple of the extent size of the file system; for example, Linux ext3 is 4096 bytes, so a value of 32768 is commonly used.

Value range Default value Definition scope Context

integer

0

local

backend

gp_segment_connect_timeout

Time that the Greengage DB interconnect will try to connect to a segment instance over the network before timing out. Controls the network connection timeout between master and primary segments, and primary to mirror segment replication processes.

Value range Default value Definition scope Context

Time expression (number and unit)

3min

local

user

gp_segments_for_planner

Sets the number of primary segment instances for the Postgres Planner to assume in its cost and size estimates. If 0, then the value used is the actual number of primary segments. This variable affects the Postgres Planner’s estimates of the number of rows handled by each sending and receiving process in Motion operators.

Value range Default value Definition scope Context

0 — n

0

master

user

gp_server_version

Reports the version number of the server as a string. A version modifier argument, such as beta, might be appended to the numeric portion of the version string.

Value range Default value Definition scope Context

Version string. Example: 6.29.0

Actual version

read only

internal

gp_server_version_num

Reports the version number of the server as an integer. The number is guaranteed to always be increasing for each version and can be used for numeric comparisons. The major version is represented as is, the minor and patch versions are zero-padded to always be double-digit wide.

Value range Default value Definition scope Context

Mmmpp where M is the major version, mm is the minor version zero-padded, and pp is the patch version zero-padded. Example: 60000

Actual version representation

read only

internal

gp_session_id

A system assigned ID number for a client session. Starts counting from 1 when the master instance is first started.

Value range Default value Definition scope Context

integer

 — 

read only

backend

gp_set_proc_affinity

If enabled, when a Greengage DB server process (postmaster) is started, it will bind to a CPU.

Value range Default value Definition scope Context

boolean

off

master

postmaster

gp_statistics_pullup_from_child_partition

Enables the use of statistics from child tables when planning queries on the parent table by the Postgres Planner.

Value range Default value Definition scope Context

boolean

on

master

user

gp_statistics_use_fkeys

When enabled, the Postgres Planner will use the statistics of the referenced column in the parent table when a column is a foreign key reference to another table instead of the statistics of the column itself.

NOTE

The gp_statistics_use_fkeys parameter is deprecated and not recommended for usage.

Value range Default value Definition scope Context

boolean

on

master

user

gp_track_pending_delete

Enable extended pending deletion tracking to avoid accumulation of orphaned files. Disabling this turns off storing relation nodes in shared memory, dumping them to WAL, and removing of files during recovery.

Value range Default value Definition scope Context

boolean

on

master

postmaster

gp_vmem_idle_resource_timeout

If a database session is idle for longer than the time specified, the session will free system resources (such as shared memory), but remain connected to the database. This allows more concurrent connections to the database at one time.

Value range Default value Definition scope Context

Time expression (number and unit)

18s

master

user

gp_vmem_protect_limit

NOTE

The gp_vmem_protect_limit server configuration parameter is enforced only when resource queue-based resource management is active.

Sets the amount of memory (in megabytes) that all postgres processes of an active segment instance can consume. If a query causes this limit to be exceeded, memory will not be allocated and the query will fail. Note that this is a local parameter and must be set for every segment in the system (primary and mirrors). When setting the parameter value, specify only the numeric value, for example, 4096 for 4096 MB.

To prevent over-allocation of memory, these calculations can estimate a safe gp_vmem_protect_limit value.

First calculate the value of gp_vmem — the Greengage DB memory available on a host:

  • If the total system memory is less than 256 GB, use this formula:

    <gp_vmem> = ((SWAP + RAM) – (7.5GB + 0.05 * RAM)) / 1.7
  • If the total system memory is equal to or greater than 256 GB, use this formula:

    <gp_vmem> = ((SWAP + RAM) – (7.5GB + 0.05 * RAM)) / 1.17

where SWAP is the host swap space and RAM is the RAM on the host in GB.

Next, calculate the max_acting_primary_segments value. This is the maximum number of primary segments that can be running on a host when mirror segments are activated due to a failure. For example, with mirrors arranged in a 4-host block with 8 primary segments per host, a failure of a single segment host would activate two or three mirror segments on each remaining host in the failed host’s block. The max_acting_primary_segments value for this configuration is 11 (8 primary segments plus 3 mirrors activated on failure).

This is the calculation for gp_vmem_protect_limit. The value should be converted to MB.

gp_vmem_protect_limit = <gp_vmem> / <acting_primary_segments>

For scenarios where a large number of workfiles are generated, this is the calculation for gp_vmem that accounts for the workfiles.

  • If the total system memory is less than 256 GB:

    <gp_vmem> = ((<SWAP> + <RAM>) – (7.5GB + 0.05 * <RAM> - (300KB * <total_#_workfiles>))) / 1.7
  • If the total system memory is equal to or greater than 256 GB:

    <gp_vmem> = ((<SWAP> + <RAM>) – (7.5GB + 0.05 * <RAM> - (300KB * <total_#_workfiles>))) / 1.17

For information about monitoring and managing workfile usage, see Manage spill files.

Based on the gp_vmem value, you can calculate the value for the vm.overcommit_ratio operating system kernel parameter. This parameter is set when you configure each Greengage DB host.

vm.overcommit_ratio = (<RAM> - (0.026 * <gp_vmem>)) / <RAM>
NOTE

The default value for the kernel parameter vm.overcommit_ratio in Red Hat Enterprise Linux is 50. For recommendations on setting this kernel parameter, see Kernel parameters.

Value range Default value Definition scope Context

integer

8192

local

postmaster

gp_vmem_protect_segworker_cache_limit

If a query executor process consumes more than this configured amount (in megabytes), then the process will not be cached for use in subsequent queries after the process completes. Systems with lots of connections or idle processes may want to reduce this number to free more memory on the segments. Note that this is a local parameter and must be set for every segment.

Value range Default value Definition scope Context

integer

500

local

postmaster

gp_workfile_compression

Specifies whether spill files created by hash aggregation or hash join operations on disk are compressed.

If your Greengage DB installation uses Serial ATA (SATA) disk drives, enabling compression might help to avoid overloading the disk subsystem with IO operations.

Learn more about spill files compression in Compression.

Value range Default value Definition scope Context

boolean

off

master

user

gp_workfile_compression_overhead_limit

The overhead memory limit in kilobytes for all compressed spill files of a single workfile set. Once the limit is reached, the following files will not be compressed. 0 deactivates the limit.

See also Compression.

Value range Default value Definition scope Context

integer >=0

2097152 (2 GB)

master

user

gp_workfile_limit_files_per_query

Sets the maximum number of temporary spill files (also known as workfiles) allowed per query per segment. Spill files are created when running a query that requires more memory than it is allocated. The current query is terminated when the limit is exceeded.

Set the value to 0 to allow an unlimited number of spill files.

Value range Default value Definition scope Context

integer >= 0

100000

master

user

gp_workfile_limit_per_query

Sets the maximum disk size (in kilobytes) an individual query is allowed to use for creating temporary spill files at each segment. The default value is 0, which means a limit is not enforced.

Value range Default value Definition scope Context

integer

0

master

user

gp_workfile_limit_per_segment

Sets the maximum total disk size (in kilobytes) that all running queries are allowed to use for creating temporary spill files at each segment. The default value is 0, which means a limit is not enforced.

Value range Default value Definition scope Context

integer

0

local

postmaster

gpfdist_retry_timeout

Controls the time (in seconds) that Greengage DB waits before returning an error when Greengage DB is attempting to connect or write to a gpfdist server and gpfdist does not respond. The default value is 300 (5 minutes). A value of 0 deactivates the timeout.

Value range Default value Definition scope Context

integer >= 0

300

local

user

gpperfmon_port

Sets the port number of gpperfmon.

Value range Default value Definition scope Context

1024 — 65535

8888

master

postmaster

ignore_checksum_failure

Only has effect if data_checksums is enabled.

Greengage DB uses checksums to prevent loading data that has been corrupted in the file system into memory managed by database processes.

By default, if a checksum verification error occurs when reading a heap data page, Greengage DB generates an error and prevents the page from being loaded into managed memory. When ignore_checksum_failure is set to on and a checksum verify failure occurs, Greengage DB generates a warning and allows the page to be read into managed memory. If the page is then updated, it is saved to disk and replicated to the mirror. If the page header is corrupt, an error is reported even if this option is enabled.

CAUTION

Setting ignore_checksum_failure to on may propagate or hide data corruption or lead to other serious problems. However, if a checksum failure has already been detected and the page header is uncorrupted, setting ignore_checksum_failure to on may allow you to bypass the error and recover undamaged tuples that may still be present in the table.

The default setting is off, and it can only be changed by a superuser.

Value range Default value Definition scope Context

boolean

off

local

superuser

integer_datetimes

Reports whether PostgreSQL was built with support for 64-bit integer dates and times.

Value range Default value Definition scope Context

boolean

on

read only

internal

IntervalStyle

Sets the display format for interval values:

  • sql_standard — produces output matching SQL standard interval literals.

  • postgres — produces output matching PostgreSQL releases prior to 8.4 when the DateStyle parameter was set to ISO.

  • postgres_verbose — produces output matching PostgreSQL releases prior to 8.4 when the DateStyle parameter was set to non-ISO output.

  • iso_8601 — produces output matching the time interval format with designators defined in section 4.4.3.2 of ISO 8601.

See Date/Time Types in the PostgreSQL documentation for more information.

Value range Default value Definition scope Context

postgres
postgres_verbose
sql_standard
iso_8601

postgres

master

user

join_collapse_limit

The Postgres Planner will rewrite explicit JOIN constructs into lists of FROM items whenever a list of no more than this many items in total would result. By default, this variable is set to the same as from_collapse_limit, which is appropriate for most uses. Setting it to 1 prevents any reordering of inner joins. Setting this variable to a value between 1 and from_collapse_limit might be useful to trade off planning time against the quality of the chosen plan (higher values produce better plans).

Value range Default value Definition scope Context

1 — from_collapse_limit

20

master

user

krb_caseins_users

Sets whether Kerberos user names should be treated case-insensitively. The default is case-sensitive (off).

Value range Default value Definition scope Context

boolean

off

master

sighup

krb_server_keyfile

Sets the location of the Kerberos server key file.

Value range Default value Definition scope Context

path and file name

 — 

master

sighup

lc_collate

Reports the locale in which sorting of textual data is done. The value is determined when the Greengage DB cluster is initialized.

Value range Default value Definition scope Context

system dependent

 — 

read only

internal

lc_ctype

Reports the locale that determines character classifications. The value is determined when the Greengage DB cluster is initialized.

Value range Default value Definition scope Context

system dependent

 — 

read only

internal

lc_messages

Sets the language in which messages are displayed. The locales available depends on what was installed with your operating system — use locale -a to list available locales. The default value is inherited from the execution environment of the server. On some systems, this locale category does not exist. Setting this variable will still work, but there will be no effect. Also, there is a chance that no translated messages for the desired language exist. In that case, you will continue to see the English messages.

Value range Default value Definition scope Context

system dependent

 — 

local

superuser

lc_monetary

Sets the locale to use for formatting monetary amounts, for example, with the to_char family of functions. The locales available depend on what was installed with your operating system — use locale -a to list available locales. The default value is inherited from the execution environment of the server.

Value range Default value Definition scope Context

system dependent

 — 

local

user

lc_numeric

Sets the locale to use for formatting numbers, for example, with the to_char family of functions. The locales available depends on what was installed with your operating system — use locale -a to list available locales. The default value is inherited from the execution environment of the server.

Value range Default value Definition scope Context

system dependent

 — 

local

user

lc_time

Sets the locale for formatting date and time values.

Value range Default value Definition scope Context

system dependent

 — 

local

user

listen_addresses

Specifies the TCP/IP address(es) on which the server is to listen for connections from client applications — a comma-separated list of host names and/or numeric IP addresses. The special entry * corresponds to all available IP interfaces. If the list is empty, only Unix domain sockets can connect.

Value range Default value Definition scope Context

localhost
host names
IP addresses
* (all available IP interfaces)

*

master

postmaster

local_preload_libraries

Comma-separated list of shared library files to preload at the start of a client session.

Value range Default value Definition scope Context

comma-separated list of libraries

 — 

local

backend

lock_timeout

Abort any statement that waits longer than the specified number of milliseconds while attempting to acquire a lock on a table, index, row, or other database object. The time limit applies separately to each lock acquisition attempt. The limit applies both to explicit locking requests (such as LOCK TABLE or SELECT FOR UPDATE and to implicitly-acquired locks. If log_min_error_statement is set to ERROR or lower, Greengage DB logs the statement that timed out. A value of zero (the default) turns off this lock wait monitoring.

Unlike statement_timeout, this timeout can only occur while waiting for locks. Note that if statement_timeout is nonzero, it is rather pointless to set lock_timeout to the same or larger value, since the statement timeout would always trigger first.

Greengage DB uses the deadlock_timeout and gp_global_deadlock_detector_period to trigger local and global deadlock detection. Note that if lock_timeout is turned on and set to a value smaller than these deadlock detection timeouts, Greengage DB will abort a statement before it would ever trigger a deadlock check in that session.

NOTE

Setting lock_timeout in postgresql.conf is not recommended because it would affect all sessions.

Value range Default value Definition scope Context

integer >= 0

0

master

user

log_autostats

Logs information about automatic ANALYZE operations related to gp_autostats_mode and gp_autostats_on_change_threshold.

Value range Default value Definition scope Context

boolean

off

master

superuser

log_autovacuum_min_duration

Sets the minimum execution time (in milliseconds) above which autovacuum actions will be logged. Zero prints all actions. -1 turns autovacuum logging off.

Value range Default value Definition scope Context

integer >= -1

-1

master

sighup

log_checkpoints

Causes checkpoints and restart points to be logged in the server log. Some statistics are included in the log messages, including the number of buffers written and the time spent writing them.

Value range Default value Definition scope Context

boolean

on

local

sighup

log_connections

This outputs a line to the server log detailing each successful connection. Some client programs, like psql, attempt to connect twice while determining if a password is required, so duplicate connection received messages do not always indicate a problem.

Value range Default value Definition scope Context

boolean

off

local

backend

log_disconnections

This outputs a line in the server log at termination of a client session, and includes the duration of the session.

Value range Default value Definition scope Context

boolean

off

local

backend

log_dispatch_stats

When set to on, this parameter adds a log message with verbose information about the dispatch of the statement.

Value range Default value Definition scope Context

boolean

off

local

superuser

log_duration

Causes the duration of every completed statement that satisfies log_statement to be logged.

Value range Default value Definition scope Context

boolean

off

master

superuser

log_error_verbosity

Controls the amount of detail written in the server log for each message that is logged.

Value range Default value Definition scope Context

TERSE
DEFAULT
VERBOSE

DEFAULT

master

superuser

log_executor_stats

For each query, write performance statistics of the query executor to the server log. This is a crude profiling instrument. Cannot be enabled together with log_statement_stats.

Value range Default value Definition scope Context

boolean

off

local

superuser

log_hostname

By default, connection log messages only show the IP address of the connecting host. Turning on this option causes logging of the host name as well. Note that depending on your host name resolution setup, this might impose a non-negligible performance penalty.

Value range Default value Definition scope Context

boolean

off

master

sighup

log_lock_waits

Defines whether a log message is produced when a session waits longer than deadlock_timeout to acquire a lock.

Value range Default value Definition scope Context

boolean

off

master

superuser

log_min_duration_statement

Logs the statement and its duration on a single log line if its duration is greater than or equal to the specified number of milliseconds. Setting this to 0 will print all statements and their durations. -1 deactivates the feature. For example, if you set it to 250 then all SQL statements that run 250 ms or longer will be logged. Enabling this option can be useful in tracking down unoptimized queries in your applications.

Value range Default value Definition scope Context

number of milliseconds
0
-1

-1

master

superuser

log_min_error_statement

Controls whether the SQL statement that causes an error condition will also be recorded in the server log. All SQL statements that cause an error of the specified level or higher are logged. The default is ERROR. To effectively turn off logging of failing statements, set this parameter to PANIC.

Value range Default value Definition scope Context

DEBUG5
DEBUG4
DEBUG3
DEBUG2
DEBUG1
INFO
NOTICE
WARNING
ERROR
LOG
FATAL
PANIC

ERROR

master

superuser

log_min_messages

Controls which message levels are written to the server log. Each level includes all the levels that follow it. The later the level, the fewer messages are sent to the log.

If the Greengage DB PL/Container extension is installed, this parameter also controls the PL/Container log level. For information about the extension, see PL/Container.

Value range Default value Definition scope Context

DEBUG5
DEBUG4
DEBUG3
DEBUG2
DEBUG1
INFO
NOTICE
WARNING
LOG
ERROR
FATAL
PANIC

WARNING

master

superuser

log_parser_stats

For each query, write performance statistics of the query parser to the server log. This is a crude profiling instrument. Cannot be enabled together with log_statement_stats.

Value range Default value Definition scope Context

boolean

off

master

superuser

log_planner_stats

For each query, write performance statistics of the Postgres Planner to the server log. This is a crude profiling instrument. Cannot be enabled together with log_statement_stats.

Value range Default value Definition scope Context

boolean

off

master

superuser

log_rotation_age

Determines the amount of time Greengage DB writes messages to the active log file. When this amount of time has elapsed, the file is closed and a new log file is created. Set to 0 to deactivate time-based creation of new log files.

Value range Default value Definition scope Context

Time expression (number and unit)

1d

local

sighup

log_rotation_size

Determines the size of an individual log file that triggers rotation in kilobytes. When the log file size is equal to or greater than this size, the file is closed and a new log file is created. Set to zero to deactivate size-based creation of new log files.

The maximum value is INT_MAX/1024. If an invalid value is specified, the default value is used. INT_MAX is the largest value that can be stored as an integer on your system.

Value range Default value Definition scope Context

0 — INT_MAX/1024

1048576

local

sighup

log_statement

Controls which SQL statements are logged:

  • DDL logs all data definition commands like CREATE, ALTER, and DROP commands.

  • MOD logs all DDL statements, plus INSERT, UPDATE, DELETE, TRUNCATE, and COPY FROM.

PREPARE and EXPLAIN ANALYZE statements are also logged if their contained command is of an appropriate type.

Value range Default value Definition scope Context

NONE
DDL
MOD
ALL

ALL

master

superuser

log_statement_stats

For each query, write total performance statistics of the query parser, planner, and executor to the server log. This is a crude profiling instrument.

Value range Default value Definition scope Context

boolean

off

master

superuser

log_temp_files

Controls logging of temporary file names and sizes. Temporary files can be created for sorts, hashes, temporary query results and spill files. A log entry is made in log for each temporary file when it is deleted. Depending on the source of the temporary files, the log entry could be created on either the master and/or segments. A log_temp_files value of zero logs all temporary file information, while positive values log only files whose size is greater than or equal to the specified number of kilobytes. The default setting is -1, which deactivates logging.

Value range Default value Definition scope Context

integer

-1

local

superuser

log_timezone

Sets the time zone used for timestamps written in the log. Unlike TimeZone, this value is system-wide, so that all sessions will report timestamps consistently. The default is the master host’s system time zone defined at the time of the cluster creation.

Value range Default value Definition scope Context

string

unknown

local

sighup

log_truncate_on_rotation

Truncates (overwrites), rather than appends to, any existing log file of the same name. Truncation will occur only when a new file is being opened due to time-based rotation. For example, using this setting in combination with log_filename such as gpseg#-%H.log would result in generating twenty-four hourly log files and then cyclically overwriting them. When off, pre-existing files will be appended to in all cases.

Value range Default value Definition scope Context

boolean

off

local

sighup

logging_collector

Start the logging collector background process to capture log messages from stderr and send them into log files.

Value range Default value Definition scope Context

boolean

on

master

postmaster

maintenance_work_mem

Specifies the maximum amount of memory (in megabytes) to be used in maintenance operations, such as VACUUM and CREATE INDEX. It defaults to 64 MB. Larger settings might improve performance for vacuuming and for restoring database dumps.

Value range Default value Definition scope Context

integer

64

local

user

max_appendonly_tables

Sets the maximum number of append-optimized tables that can be written to or updated at the same time. Operations that exceed the maximum return an error.

Operations that are counted are INSERT, UPDATE, COPY, VACUUM. The limit is only for append-optimized tables that are being modified by in-progress transactions. Once a transaction ends (either aborted or committed), the tables that are being modified are no longer counted against this limit.

NOTE

Greengage DB limits the maximum number of concurrent inserts into an append-only table to 127.

For operations against a partitioned table, each leaf partition that is an append-optimized table and is changed counts as a single table towards the maximum. For example, a partitioned table p_tbl is defined with three subpartitions that are append-optimized tables p_tbl_ao1, p_tbl_ao2, and p_tbl_ao3. An INSERT or UPDATE command against the partitioned table p_tbl that changes append-optimized tables p_tbl_ao1 and p_tbl_ao2 will contribute two towards the limit.

Increasing the limit allocates more shared memory on the master host at server start.

Value range Default value Definition scope Context

integer > 0

10000

master

postmaster

max_connections

The maximum number of concurrent connections to the database server. In a Greengage DB system, user client connections go through the Greengage DB master instance only. Segment instances should allow 3 — 10 times the amount as the master. When you increase this parameter, max_prepared_transactions must be increased as well.

Increasing this parameter may cause Greengage DB to request more shared memory. See shared_buffers for information about Greengage DB server instance shared memory buffers.

Value range Default value Definition scope Context

10 — 8388607

250 on master
750 on segments

local

postmaster

max_files_per_process

Sets the maximum number of simultaneously open files allowed to each server subprocess. If the kernel is enforcing a safe per-process limit, you don’t need to worry about this setting. On some platforms, such as BSD, the kernel will allow individual processes to open many more files than the system can really support.

Value range Default value Definition scope Context

integer

1000

local

postmaster

max_function_args

Reports the maximum number of function arguments.

Value range Default value Definition scope Context

integer

100

read only

internal

max_identifier_length

Reports the maximum identifier length.

Value range Default value Definition scope Context

integer

63

read only

internal

max_index_keys

Reports the maximum number of index keys.

Value range Default value Definition scope Context

integer

32

read only

internal

max_locks_per_transaction

The shared lock table is created with room to describe locks on max_locks_per_transaction * (max_connections + max_prepared_transactions) objects, so no more than this many distinct objects can be locked at any one time. This is not a hard limit on the number of locks taken by any one transaction, but rather a maximum average value. You might need to raise this value if you have clients that touch many different tables in a single transaction.

Value range Default value Definition scope Context

integer

128

local

postmaster

max_prepared_transactions

Sets the maximum number of transactions that can be in the prepared state simultaneously. Greengage DB uses prepared transactions internally to ensure data integrity across the segments. This value must be at least as large as the value of max_connections on the master. Segment instances should be set to the same value as the master.

Value range Default value Definition scope Context

integer

250

local

postmaster

max_resource_portals_per_transaction

NOTE

The max_resource_portals_per_transaction server configuration parameter is enforced only when resource queue-based resource management is active.

Sets the maximum number of simultaneously open user-declared cursors allowed per transaction. Note that an open cursor will hold an active query slot in a resource queue. Used for resource management.

Value range Default value Definition scope Context

integer

64

master

postmaster

max_resource_queues

NOTE

The max_resource_queues server configuration parameter is enforced only when resource queue-based resource management is active.

Sets the maximum number of resource queues that can be created in a Greengage DB system. Note that resource queues are system-wide (as are roles), so they apply to all databases in the system.

Value range Default value Definition scope Context

integer

9

master

postmaster

max_slot_wal_keep_size

Sets the maximum size in megabytes of write-ahead logging (WAL) files on disk per segment instance that can be reserved when Greengage DB streams data to the mirror segment instance or standby master to keep it synchronized with the corresponding primary segment instance or master. The default is -1, Greengage DB can retain an unlimited amount of WAL files on disk.

If the file size exceeds the maximum size, the files are released and are available for deletion. A mirror or standby may no longer be able to continue replication due to removal of required WAL files.

CAUTION

If max_slot_wal_keep_size is set to a non-default value for acting primaries, full and incremental recovery of their mirrors may not be possible. Depending on the workload on the primary running concurrently with a full recovery, the recovery may fail with a missing WAL error. Therefore, you must ensure that max_slot_wal_keep_size is set to the default of -1 or a high enough value before running full recovery. Similarly, depending on how far behind the downed mirror is, its incremental recovery may fail with a missing WAL complaint. In this case, full recovery would be the only recourse.

Value range Default value Definition scope Context

integer

-1

local

sighup

max_stack_depth

Specifies the maximum safe depth of the server’s execution stack. The ideal setting for this parameter is the actual stack size limit enforced by the kernel (as set by ulimit -s or local equivalent), less a safety margin of a megabyte or so. Setting the parameter higher than the actual kernel limit will mean that a runaway recursive function can crash an individual backend process.

Value range Default value Definition scope Context

number of kilobytes

2MB

local

superuser

max_statement_mem

Sets the maximum memory limit for a query in kilobytes. Helps avoid out-of-memory errors on a segment host during query processing as a result of setting statement_mem too high.

Taking into account the configuration of a single segment host, calculate max_statement_mem as follows:

seghost_physical_memory / average_number_concurrent_queries

When changing both max_statement_mem and statement_mem, max_statement_mem must be changed first, or listed first in the postgresql.conf file.

Value range Default value Definition scope Context

number of kilobytes

2000MB

master

superuser

memory_spill_ratio

NOTE

The memory_spill_ratio server configuration parameter is enforced only when resource group-based resource management is active.

Sets the memory usage threshold percentage for memory-intensive operators in a transaction. When a transaction reaches this threshold, it spills to disk.

The default memory_spill_ratio percentage is the value defined for the resource group assigned to the currently active role. You can set memory_spill_ratio at the session level to selectively set this limit on a per-query basis. For example, if you have a specific query that spills to disk and requires more memory, you may choose to set a larger memory_spill_ratio to increase the initial memory allocation.

You can specify an integer percentage value from 0 to 100 inclusive. If you specify a value of 0, Greengage DB uses the statement_mem server configuration parameter value to control the initial query operator memory amount.

Value range Default value Definition scope Context

0 — 100

20

master

user

optimizer

Activates or deactivates GPORCA when running SQL queries. The default is on. If you deactivate GPORCA, Greengage DB uses only the Postgres Planner.

GPORCA co-exists with the Postgres Planner. With GPORCA enabled, Greengage DB uses GPORCA to generate an execution plan for a query when possible. If GPORCA cannot be used, then the Postgres Planner is used.

The optimizer parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

on

master

user

optimizer_analyze_root_partition

For a partitioned table, controls whether the ROOTPARTITION keyword is required to collect root partition statistics when the ANALYZE command is run on the table. GPORCA uses the root partition statistics when generating a query plan. The Postgres Planner does not use these statistics.

The default setting for the parameter is on, the ANALYZE command can collect root partition statistics without the ROOTPARTITION keyword. Root partition statistics are collected when you run ANALYZE on the root partition, or when you run ANALYZE on a child leaf partition of the partitioned table and the other child leaf partitions have statistics. When the value is off, you must run ANALYZE ROOTPARTITION to collect root partition statistics.

When the value of the server configuration parameter optimizer is on (the default), the value of this parameter should also be on. For information about collecting table statistics on partitioned tables, see Collect statistics via ANALYZE.

Value range Default value Definition scope Context

boolean

on

master

user

optimizer_control

Controls whether the server configuration parameter optimizer can be changed with SET and RESET commands, or the Greengage DB utility gpconfig. If the optimizer_control parameter value is on, users can set the optimizer parameter. If the optimizer_control parameter value is off, the optimizer parameter cannot be changed.

Value range Default value Definition scope Context

boolean

on

master

superuser

optimizer_enable_associativity

When GPORCA is enabled (the default), this parameter controls whether the join associativity transform is enabled during query optimization. The transform analyzes join orders. For the default value off, only the GPORCA dynamic programming algorithm for analyzing join orders is enabled. The join associativity transform largely duplicates the functionality of the newer dynamic programming algorithm.

If the value is on, GPORCA can use the associativity transform during query optimization.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

off

master

user

optimizer_enable_dynamicbitmapscan

When GPORCA is enabled (the default) and this parameter is true (the default), GPORCA can produce dynamic bitmap index scans that combine multiple index bitmaps efficiently for complex queries with predicates on indexed columns.

Value range Default value Definition scope Context

boolean

on

master

user

optimizer_enable_dynamicindexscan

When GPORCA is enabled (the default) and this parameter is true (the default), GPORCA uses plans with dynamic index scans. Such scans target only relevant data partitions, avoiding full table or index scans across all segments.

Value range Default value Definition scope Context

boolean

on

master

user

optimizer_enable_orderedagg

When GPORCA is enabled (the default), this parameter determines whether GPORCA generates a query plan for ordered aggregates. This parameter is deactivated by default; GPORCA does not generate a plan for a query that includes an ordered aggregate, and the query falls back to the Postgres Planner.

You can set this parameter for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

off

master

user

optimizer_enable_right_outer_join

When GPORCA is enabled (the default), this parameter allows you to control whether GPORCA generates right outer joins.

When set to the default value of on, GPORCA may both generate right outer joins and convert left outer joins to right outer joins if the situation calls for it. By setting this to off, you force GPORCA to generate equivalent left outer joins for incoming right outer joins and never generate right outer joins.

In situations in which you are observing poor performance related to right outer joins, you may choose to suppress their use by setting this parameter to off.

You may set this parameter for a database system, an individual database, or a session or query. However, it is recommended that you set this parameter at the query level, as there are a number of use cases where a right outer join is the correct query plan alternative to choose.

Value range Default value Definition scope Context

boolean

on

master

user

optimizer_enable_replicated_table

When GPORCA is enabled (the default), this parameter controls GPORCA’s behavior when it encounters DML operations on a replicated table.

The default value is on, GPORCA attempts to plan and execute operations on replicated tables. When off, GPORCA immediately falls back to the Postgres Planner when it detects replicated table operations.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

on

master

user

optimizer_join_arity_for_associativity_commutativity

The value is an optimization hint to limit the number of join associativity and join commutativity transformations explored during query optimization. The limit controls the alternative plans that GPORCA considers during query optimization. For example, the default value of 18 is an optimization hint for GPORCA to stop exploring join associativity and join commutativity transformations when an n-ary join operator has more than 18 children during optimization.

For a query with a large number of joins, specifying a lower value improves query performance by limiting the number of alternate query plans that GPORCA evaluates. However, setting the value too low might cause GPORCA to generate a query plan that performs suboptimally.

This parameter has no effect when the optimizer_join_order parameter is set to query or greedy.

This parameter can be set for a database system or a session.

Value range Default value Definition scope Context

integer >= 0

18

local

user

optimizer_join_order

When GPORCA is enabled (the default), this parameter sets the join enumeration algorithm:

  • query — uses the join order specified in the query.

  • greedy — evaluates the join order specified in the query and alternatives based on minimum cardinalities of the relations in the joins.

  • exhaustive — applies transformation rules to find and evaluate up to a configurable threshold number (optimizer_join_order_threshold, default 10) of n-way inner joins, and then changes to and uses the greedy method beyond that. While planning time drops significantly at that point, plan quality and execution time may get worse.

  • exhaustive2 — operates with an emphasis on generating join orders that are suitable for dynamic partition elimination. This algorithm applies transformation rules to find and evaluate n-way inner and outer joins. When evaluating very large joins with more than optimizer_join_order_threshold (default 10) tables, this algorithm employs a gradual transition to the greedy method; planning time goes up smoothly as the query gets more complicated, and plan quality and execution time only gradually degrade. exhaustive2 provides a good trade-off between planning time and execution time for many queries.

Setting this parameter to query or greedy can generate a suboptimal query plan. However, if the administrator is confident that a satisfactory plan is generated with the query or greedy setting, query optimization time may be improved by setting the parameter to the lower optimization level.

When you set this parameter to query or greedy, GPORCA ignores the optimizer_join_order_threshold parameter.

This parameter can be set for an individual database, a session, or a query.

Value range Default value Definition scope Context

query
greedy
exhaustive
exhaustive2

exhaustive

master

user

optimizer_join_order_threshold

When GPORCA is enabled (the default), this parameter sets the maximum number of join children for which GPORCA will use the dynamic programming-based join ordering algorithm. This threshold restricts the search effort for a join plan to reasonable limits.

GPORCA examines the optimizer_join_order_threshold parameter when optimizer_join_order is set to exhaustive or exhaustive2. GPORCA ignores this parameter when optimizer_join_order is set to query or greedy.

You can set this value for a single query or for an entire session.

Value range Default value Definition scope Context

0 — 12

10

master

user

optimizer_mdcache_size

Sets the maximum amount of memory on the Greengage DB master that GPORCA uses to cache query metadata (optimization data) during query optimization. The memory limit is session-based. GPORCA caches query metadata during query optimization with the default settings: GPORCA is enabled and optimizer_metadata_caching is on.

The default value is 16384 (16 MB). This is an optimal value that has been determined through performance analysis.

You can specify a value in KB (default), MB, or GB. For example, a value of 16384 is 16384KB. A value of 1GB is the same as 1024MB or 1048576KB. If the value is 0, the size of the cache is not limited.

This parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

integer >= 0

16384

master

user

optimizer_metadata_caching

When GPORCA is enabled (the default), this parameter specifies whether GPORCA caches query metadata (optimization data) in memory on the Greengage DB master during query optimization. The default for this parameter is on, enable caching. The cache is session-based — when a session ends, the cache is released. If the amount of query metadata exceeds the cache size, then old, unused metadata is evicted from the cache.

If the value is off, GPORCA does not cache metadata during query optimization.

This parameter can be set for a database system, an individual database, or a session or query.

The server configuration parameter optimizer_mdcache_size controls the size of the query metadata cache.

Value range Default value Definition scope Context

boolean

on

master

user

optimizer_minidump

GPORCA generates minidump files to describe the optimization context for a given query. The information in the file is not in a format that can be easily used for debugging or troubleshooting. The minidump file is located under the master data directory and uses the following naming format: Minidump_YYYYMMSS_HHMMSS.mdp.

The minidump file contains this query-related information:

  • Catalog objects, including data types, tables, operators, and statistics required by GPORCA.

  • An internal representation (DXL) of the query.

  • An internal representation (DXL) of the plan produced by GPORCA.

  • System configuration information passed to GPORCA such as server configuration parameters, cost and statistics configuration, and number of segments.

  • A stack trace of errors generated while optimizing the query.

Setting this parameter to ALWAYS generates a minidump for all queries. Set this parameter to ONERROR to minimize total optimization time.

Value range Default value Definition scope Context

ONERROR
ALWAYS

ONERROR

master

user

optimizer_parallel_union

When GPORCA is enabled (the default), optimizer_parallel_union controls the amount of parallelization that occurs for queries that contain a UNION or UNION ALL clause.

When the value is off, the default, GPORCA generates a query plan where each child of an APPEND(UNION) operator is in the same slice as the APPEND operator. During query execution, the children are run in a sequential manner.

When the value is on, GPORCA generates a query plan where a redistribution motion node is under an APPEND(UNION) operator. During query execution, the children and the parent APPEND operator are on different slices, allowing the children of the APPEND(UNION) operator to run in parallel on segment instances.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

off

master

user

password_encryption

When a password is specified in CREATE USER or ALTER USER without writing either ENCRYPTED or UNENCRYPTED, this option determines whether the password is to be encrypted.

Value range Default value Definition scope Context

boolean

on

master

user

password_hash_algorithm

Specifies the cryptographic hash algorithm that is used when storing an encrypted Greengage DB user password. The default algorithm is MD5.

For information about setting the password hash algorithm to protect user passwords, see Password hashing.

Value range Default value Definition scope Context

MD5
SHA-256
SCRAM-SHA-256

MD5

master

superuser

plan_cache_mode

Prepared statements (either explicitly prepared or implicitly generated, for example, by PL/pgSQL) can be run using custom or generic plans.

Custom plans are created for each execution using its specific set of parameter values, while generic plans do not rely on the parameter values and can be reused across executions. The use of a generic plan saves planning time, but if the ideal plan depends strongly on the parameter values, then a generic plan might be inefficient. The choice between these options is normally made automatically, but it can be overridden by setting the plan_cache_mode parameter. If the prepared statement has no parameters, a generic plan is always used.

The allowed values are auto (the default), force_custom_plan, and force_generic_plan. This setting is considered when a cached plan is to be run, not when it is prepared.

The parameter can be set for a database system, an individual database, a session, or a query.

Value range Default value Definition scope Context

auto
force_custom_plan
force_generic_plan

auto

master

user

pljava_classpath

A colon (:) separated list of JAR files or directories containing JAR files needed for PL/Java functions. The full path to the JAR file or directory must be specified, except the path can be omitted for JAR files in the $GPHOME/lib/postgresql/java directory. The JAR files must be installed in the same locations on all Greengage DB hosts and readable by the gpadmin user.

The pljava_classpath parameter is used to assemble the PL/Java classpath at the beginning of each user session. JAR files added after a session has started are not available to that session.

If the full path to a JAR file is specified in pljava_classpath, it is added to the PL/Java classpath. When a directory is specified, any JAR files the directory contains are added to the PL/Java classpath. The search does not descend into subdirectories of the specified directories. If the name of a JAR file is included in pljava_classpath with no path, the JAR file must be in the $GPHOME/lib/postgresql/java directory.

NOTE

Performance can be affected if there are many directories to search or a large number of JAR files.

If pljava_classpath_insecure is false, setting the pljava_classpath parameter requires superuser privileges. Setting the classpath in SQL code will fail when the code is run by a user without superuser privileges. The pljava_classpath parameter must have been set previously by a superuser or in the postgresql.conf file. Changing the classpath in the postgresql.conf file requires a reload (gpstop -u).

Value range Default value Definition scope Context

string

 — 

master

superuser

pljava_classpath_insecure

Controls whether the server configuration parameter pljava_classpath can be set by a user without Greengage DB superuser privileges. When true, pljava_classpath can be set by a regular user. Otherwise, pljava_classpath can be set only by a database superuser. The default is false.

CAUTION

Enabling pljava_classpath_insecure exposes a security risk by giving non-administrator database users the ability to run unauthorized Java methods.

Value range Default value Definition scope Context

boolean

false

master

postmaster

pljava_release_lingering_savepoints

If true, lingering savepoints used in PL/Java functions will be released on function exit. If false, savepoints will be rolled back.

Value range Default value Definition scope Context

boolean

false

master

superuser

pljava_statement_cache_size

Sets the size in KB of the JRE MRU (Most Recently Used) cache for prepared statements.

Value range Default value Definition scope Context

number of kilobytes

0

master

superuser

pljava_vmoptions

Defines the startup options for the Java VM. The default value is an empty string ("").

Value range Default value Definition scope Context

string

 — 

master

superuser

port

The database listener port for a Greengage DB instance. The master and each segment have their own ports. Port numbers for the Greengage DB system must also be changed in the gp_segment_configuration system catalog table. You must shut down your Greengage DB system before changing port numbers.

Value range Default value Definition scope Context

1 — 65535

5432

local

postmaster

quote_all_identifiers

Ensures that all identifiers are quoted, even if they are not keywords, when the database generates SQL.

Value range Default value Definition scope Context

boolean

false

local

user

random_page_cost

Sets the estimate of the cost of a nonsequentially fetched disk page for the Postgres Planner. This is measured as a multiple of the cost of a sequential page fetch. A higher value makes it more likely a sequential scan will be used, a lower value makes it more likely an index scan will be used.

Value range Default value Definition scope Context

floating point

100

master

user

readable_external_table_timeout

When an SQL query reads from an external table, the parameter value specifies the amount of time in seconds that Greengage DB waits before cancelling the query when data stops being returned from the external table.

The default value of 0 — no timeout. Greengage DB does not cancel the query.

If queries that use gpfdist run a long time and then return the error intermittent network connectivity issues, you can specify a value for readable_external_table_timeout. If no data is returned by gpfdist for the specified length of time, Greengage DB cancels the query.

Value range Default value Definition scope Context

0 — INT_MAX

0

master

user

repl_catchup_within_range

For Greengage DB master mirroring, controls updates to the active master. If the number of WAL segment files that have not been processed by the walsender exceeds this value, Greengage DB updates the active master.

If the number of segment files does not exceed the value, Greengage DB blocks updates to allow the walsender process the files. If all WAL segments have been processed, the active master is updated.

Value range Default value Definition scope Context

0 — 64

1

master

superuser

resource_cleanup_gangs_on_wait

NOTE

The resource_cleanup_gangs_on_wait server configuration parameter is enforced only when resource queue-based resource management is active.

If a statement is submitted through a resource queue, clean up any idle query executor worker processes before taking a lock on the resource queue.

Value range Default value Definition scope Context

boolean

on

master

user

resource_select_only

NOTE

The resource_select_only server configuration parameter is enforced only when resource queue-based resource management is active.

Sets the types of queries managed by resource queues. If set to on, then SELECT, SELECT INTO, CREATE TABLE AS SELECT, and DECLARE CURSOR commands are evaluated. If set to off, INSERT, UPDATE, and DELETE commands will be evaluated as well.

Value range Default value Definition scope Context

boolean

off

master

postmaster

runaway_detector_activation_percent

For queries that are managed by resource queues or resource groups, this parameter determines when Greengage DB terminates running queries based on the amount of memory the queries are using. A value of 100 deactivates the automatic termination of queries based on the percentage of memory that is utilized.

  • When resource queues are enabled

    This parameter sets the percentage of utilized Greengage DB vmem memory that triggers the termination of queries. If the percentage of vmem memory that is utilized for a Greengage DB segment exceeds the specified value, Greengage DB terminates queries managed by resource queues based on memory usage, starting with the query consuming the largest amount of memory. Queries are terminated until the percentage of utilized vmem is below the specified percentage.

    Specify the maximum vmem value for active Greengage DB segment instances with the server configuration parameter gp_vmem_protect_limit.

    For example, if vmem memory is set to 10 GB, and this parameter is 90 (90%), Greengage DB starts terminating queries when the utilized vmem memory exceeds 9 GB.

    For information about resource queues, see Use resource queues.

  • When resource groups are enabled

    This parameter sets the percent of utilized resource group global shared memory that triggers the termination of queries that are managed by resource groups that are configured to use the vmtracker memory auditor, such as admin_group and default_group.

    For information about memory auditors, see Memory auditor.

    Resource groups have a global shared memory pool when the sum of the MEMORY_LIMIT attribute values configured for all resource groups is less than 100. For example, if you have 3 resource groups configured with memory_limit values of 10, 20, and 30, then global shared memory is 40% = 100% - (10% + 20% + 30%). See Global shared memory.

    If the percentage of utilized global shared memory exceeds the specified value, Greengage DB terminates queries based on memory usage, selecting from queries managed by the resource groups that are configured to use the vmtracker memory auditor. Greengage DB starts with the query consuming the largest amount of memory. Queries are terminated until the percentage of utilized global shared memory is below the specified percentage.

    For example, if global shared memory is 10 GB, and this parameter is 90 (90%), Greengage DB starts terminating queries when the utilized global shared memory exceeds 9 GB.

    For information about resource groups, see Use resource groups.

Value range Default value Definition scope Context

percentage (integer)

90

local

postmaster

search_path

Specifies the order in which schemas are searched when an object is referenced by a simple name with no schema component. When there are objects of identical names in different schemas, the one found first in the search path is used. The system catalog schema, pg_catalog, is always searched, whether it is mentioned in the path or not. When objects are created without specifying a particular target schema, they will be placed in the first schema listed in the search path. The current effective value of the search path can be examined via the SQL function current_schema(). current_schema() shows how the requests appearing in search_path were resolved.

See also Schema search path.

Value range Default value Definition scope Context

a comma-separated list of schema names

$user,public

master

user

seq_page_cost

For the Postgres Planner, sets the estimate of the cost of a disk page fetch that is part of a series of sequential fetches.

Value range Default value Definition scope Context

floating point

1

master

user

server_encoding

Reports the database encoding (character set). It is determined when the Greengage DB cluster is initialized. Ordinarily, clients need only be concerned with the value of client_encoding.

Value range Default value Definition scope Context

system dependent

UTF8

read only

internal

server_version

Reports the version of PostgreSQL that this release of Greengage DB is based on.

Value range Default value Definition scope Context

string

9.4.26

read only

internal

server_version_num

Reports the version of PostgreSQL that this release of Greengage DB is based on as an integer.

Value range Default value Definition scope Context

integer

90426

read only

internal

shared_buffers

Sets the amount of memory a Greengage DB segment instance uses for shared memory buffers. This setting must be at least 128 KB and at least 16 KB times max_connections.

Each Greengage DB segment instance calculates and attempts to allocate a certain amount of shared memory based on the segment configuration. The value of shared_buffers is a significant portion of this shared memory calculation, but is not all it.

When setting shared_buffers, the values for the operating system parameters SHMMAX or SHMALL might also need to be adjusted.

The operating system parameter SHMMAX specifies the maximum size of a single shared memory allocation. The value of SHMMAX must be greater than this value:

shared_buffers + <other_seg_shmem>

The value of other_seg_shmem is the portion of the Greengage DB shared memory calculation that is not accounted for by the shared_buffers value. The other_seg_shmem value will vary based on the segment configuration.

With the default Greengage DB parameter values, the value for other_seg_shmem is approximately 111 MB for Greengage DB segments and approximately 79 MB for the Greengage DB master.

The operating system parameter SHMALL specifies the maximum amount of shared memory on the host. The value of SHMALL must be greater than this value:

(<num_instances_per_host> * (shared_buffers + <other_seg_shmem>)) + <other_app_shared_mem>

The value of other_app_shared_mem is the amount of shared memory that is used by other applications and processes on the host.

When shared memory allocation errors occur, possible ways to resolve shared memory allocation issues are to increase SHMMAX or SHMALL, or decrease shared_buffers or max_connections.

Value range Default value Definition scope Context

integer > 16K * max_connections

125MB

local

postmaster

shared_preload_libraries

A comma-separated list of shared libraries that are to be preloaded at server start. PostgreSQL procedural language libraries can be preloaded in this way, typically by using the syntax $libdir/plXXX where XXX is pgsql, perl, tcl, or python. By preloading a shared library, the library startup time is avoided when the library is first used. If a specified library is not found, the server will fail to start.

NOTE

When you add a library to shared_preload_libraries, be sure to retain any previous setting of the parameter.

Value range Default value Definition scope Context

comma-separated list of libraries

 — 

local

postmaster

ssl

Enables SSL connections.

Value range Default value Definition scope Context

boolean

off

master

postmaster

ssl_ciphers

Specifies a list of SSL ciphers that are allowed to be used on secure connections. ssl_ciphers overrides any ciphers string specified in /etc/openssl.cnf. The default value ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH enables all ciphers except for ADH, LOW, EXP, and MD5 ciphers, and prioritizes ciphers by their strength.

NOTE

With TLS 1.2 some ciphers in MEDIUM and HIGH strength still use NULL encryption (no encryption for transport), which the default ssl_ciphers string allows. To bypass NULL ciphers with TLS 1.2, use a string such as TLSv1.2:!eNULL:!aNULL.

See the OpenSSL manual page for a list of supported ciphers.

Value range Default value Definition scope Context

string

HIGH:MEDIUM:+3DES:!aNULL

master

postmaster

standard_conforming_strings

Determines whether ordinary string literals ('…​') treat backslashes literally, as specified in the SQL standard. The default value is on. Set this parameter to off to treat backslashes in string literals as escape characters instead of literal backslashes. Applications may check this parameter to determine how string literals are processed. The presence of this parameter can also be taken as an indication that the escape string syntax (E'…​') is supported.

Value range Default value Definition scope Context

boolean

on

master

user

statement_mem

Allocates segment host memory per query. The amount of memory allocated with this parameter cannot exceed max_statement_mem or the memory limit on the resource queue or resource group through which the query was submitted. If additional memory is required for a query, temporary spill files on disk are used.

If you are using resource groups to control resource allocation in your Greengage DB cluster:

  • Greengage DB uses statement_mem to control query memory usage when the resource group MEMORY_SPILL_RATIO is set to 0.

  • You can use the following calculation to estimate a reasonable statement_mem value:

    rg_perseg_mem = ((RAM * (vm.overcommit_ratio / 100) + SWAP) * gp_resource_group_memory_limit) / num_active_primary_segments
    statement_mem = rg_perseg_mem / max_expected_concurrent_queries

If you are using resource queues to control resource allocation in your Greengage DB cluster:

  • When gp_resqueue_memory_policy is auto, statement_mem and resource queue memory limits control query memory usage.

  • You can use the following calculation to estimate a reasonable statement_mem value for a wide variety of situations:

    ( <gp_vmem_protect_limit>GB * 0.9 ) / <max_expected_concurrent_queries>

    For example, with a gp_vmem_protect_limit set to 8192MB (8 GB) and assuming a maximum of 40 concurrent queries with a 10% buffer, you would use the following calculation to determine the statement_mem value:

    (8GB * 0.9) / 40 = 0.18GB = 184MB

When changing both max_statement_mem and statement_mem, max_statement_mem must be changed first, or listed first in the postgresql.conf file.

Value range Default value Definition scope Context

number of kilobytes up to max_statement_mem

125MB

master

user

statement_timeout

Abort any statement that takes over the specified number of milliseconds. 0 turns off the limitation.

Value range Default value Definition scope Context

integer

0

master

user

stats_queue_level

NOTE

The stats_queue_level server configuration parameter is enforced only when resource queue-based resource management is active.

Collects resource queue statistics on database activity.

Value range Default value Definition scope Context

boolean

off

master

superuser

superuser_reserved_connections

Determines the number of connection slots that are reserved for Greengage DB superusers.

Value range Default value Definition scope Context

1 — max_connections

10

local

postmaster

tcp_keepalives_count

How many keepalives may be lost before the connection is considered dead. A value of 0 uses the system default. If TCP_KEEPCNT is not supported, this parameter must be 0.

Use this parameter for all connections that are not between a primary and mirror segment.

Value range Default value Definition scope Context

integer >= 0

0

local

user

tcp_keepalives_idle

Number of seconds between sending keepalives on an otherwise idle connection. A value of 0 uses the system default. If TCP_KEEPIDLE is not supported, this parameter must be 0.

Use this parameter for all connections that are not between a primary and mirror segment.

Value range Default value Definition scope Context

integer >= 0

0

local

user

tcp_keepalives_interval

How many seconds to wait for a response to a keepalive before retransmitting. A value of 0 uses the system default. If TCP_KEEPINTVL is not supported, this parameter must be 0.

Use this parameter for all connections that are not between a primary and mirror segment.

Value range Default value Definition scope Context

integer >= 0

0

local

user

temp_buffers

Sets the maximum memory, in blocks, to allow for temporary buffers by each database session. These are session-local buffers used only for access to temporary tables. The setting can be changed within individual sessions, but only up until the first use of temporary tables within a session. The cost of setting a large value in sessions that do not actually need a lot of temporary buffers is only a buffer descriptor for each block, or about 64 bytes, per increment. However, if a buffer is actually used, an additional 32768 bytes will be consumed.

You can set this parameter to the number of 32 KB blocks (for example, 1024 to allow 32 MB for buffers), or specify the maximum amount of memory to allow (for example '48MB' for 1536 blocks). The gpconfig utility and SHOW command report the maximum amount of memory allowed for temporary buffers.

Value range Default value Definition scope Context

integer

1024 (32MB)

master

user

temp_file_limit

Sets the maximum total size of all temporary files used by each session, in kilobytes.

Value range Default value Definition scope Context

integer

-1 (no limit)

master

superuser

temp_spill_files_tablespaces

Defines a separate tablespace for spill files. This setting takes precedence over temp_tablespaces for spill files if both settings are defined.

The value is a comma-separated list of tablespace names. When the list contains more than one tablespace name, all spill files created by processes of a single session are placed in the same tablespace. Greengage DB chooses a tablespace from the list for each session based on its gp_session_id as follows:

<tablespace_number> = gp_session_id % <count>

where:

  • <tablespace_number> is the 0-based ordinal number of the tablespace in the list.

  • <count> is the total number of tablespaces in the list.

See also Temporary objects.

Value range Default value Definition scope Context

comma-separated list of tablespace names

 — 

master

user

temp_tablespaces

Specifies tablespaces in which to create temporary objects (temp tables and indexes on temp tables) when a CREATE command does not explicitly specify a tablespace. These tablespaces can also include temporary files for purposes such as large data set sorting. Separate tablespaces for spill files can be defined using the temp_spill_files_tablespaces parameter.

The value is a comma-separated list of tablespace names. When the list contains more than one tablespace name, Greengage DB chooses a random list member each time it creates a temporary object. An exception applies within a transaction, where successively created temporary objects are placed in successive tablespaces from the list. If the selected element of the list is an empty string, Greengage DB automatically uses the default tablespace of the current database instead.

When setting temp_tablespaces interactively, avoid specifying a nonexistent tablespace, or a tablespace for which the user does not have CREATE privileges. For non-superusers, a superuser must GRANT them the CREATE privilege on the temp tablespace. When using a previously set value (for example a value in postgresql.conf), nonexistent tablespaces are ignored, as are tablespaces for which the user lacks CREATE privilege.

The default value is an empty string, which results in all temporary objects being created in the default tablespace of the current database.

See also default_tablespace.

Value range Default value Definition scope Context

comma-separated list of tablespace names

 — 

master

user

TimeZone

Sets the time zone for displaying and interpreting timestamps. The default is the system time zone defined at the time of the cluster creation. See Date/Time Keywords in the PostgreSQL documentation.

Value range Default value Definition scope Context

time zone abbreviation

 — 

local

user

timezone_abbreviations

Sets the collection of time zone abbreviations that will be accepted by the server for date/time input. The default is Default, which is a collection that works in most of the world. Australia and India, and other collections can be defined for a particular installation. Possible values are names of configuration files stored in $GPHOME/share/postgresql/timezonesets/.

To configure Greengage DB to use a custom collection of timezones, copy the file that contains the timezone definitions to the directory $GPHOME/share/postgresql/timezonesets/ on the Greengage DB master and segment hosts. Then set the value of the server configuration parameter timezone_abbreviations to the file. For example, to use a file custom that contains the default timezones and the WIB (Waktu Indonesia Barat) timezone:

  1. Copy the file Default from the directory $GPHOME/share/postgresql/timezonesets/ to the new file custom. Add the WIB timezone information from the file Asia.txt to the custom.

  2. Copy the file custom to the directory $GPHOME/share/postgresql/timezonesets/ on the Greengage DB master and segment hosts.

  3. Set the value of the server configuration parameter timezone_abbreviations to custom.

  4. Reload the server configuration file (gpstop -u).

Value range Default value Definition scope Context

string

Default

master

user

track_activities

Enables the collection of information on the currently executing command of each session, along with the time when that command began execution. The default value is true. Only superusers can change this setting.

NOTE

Even when enabled, this information is not visible to all users, only to superusers and the user owning the session being reported on, so it should not represent a security risk.

Value range Default value Definition scope Context

boolean

true

master

superuser

track_activity_query_size

Sets the maximum length limit for the query text stored in the query column of the system catalog view pg_stat_activity. The minimum length is 1024 characters.

Value range Default value Definition scope Context

integer

1024

local

postmaster

track_counts

Enables collection of statistics on database activity.

Value range Default value Definition scope Context

boolean

true

master

superuser

transaction_isolation

Sets the current transaction’s isolation level. Greengage DB treats read uncommitted the same way as read committed, and treats serializable the same way as repeatable read.

Value range Default value Definition scope Context

read committed
read uncommitted
repeatable read
serializable

read committed

master

user

transaction_read_only

Sets the current transaction’s read-only status.

Value range Default value Definition scope Context

boolean

off

master

user

transform_null_equals

When on, expressions of the form <expr> = NULL (or NULL = <expr>) are treated as <expr> IS NULL, that is, they return true if expr evaluates to the null value, and false otherwise. The correct SQL-spec-compliant behavior of <expr> = NULL is to always return null (unknown).

Value range Default value Definition scope Context

boolean

off

master

user

unix_socket_directories

Specifies the directory of the Unix-domain socket(s) on which the server is to listen for connections from client applications. Multiple sockets can be created by listing multiple directories separated by commas. Because whitespace between entries is ignored, surround a directory name with double quotation marks if you need to include whitespace or commas in the name. An empty value specifies not listening on any Unix-domain sockets, in which case only TCP/IP sockets can be used to connect to the server. The default value is /tmp. This parameter can only be set at server start.

In addition to the socket file itself, which is named .s.PGSQL.nnnn where nnnn is the server’s port number, an ordinary file named .s.PGSQL.nnnn.lock is created in each of the unix_socket_directories directories.

IMPORTANT

Never remove either file manually, and do not change the value of the unix_socket_directories parameter. The default location of /tmp is required for Greengage DB utilities.

Value range Default value Definition scope Context

comma-separated list of directory paths

/tmp

local

postmaster

unix_socket_group

Sets the owning group of the Unix socket. By default, this is an empty string, which uses the default group for the current user.

Value range Default value Definition scope Context

Unix group name

 — 

local

postmaster

unix_socket_permissions

Sets the access permissions of the Unix domain socket. Unix domain sockets use the usual Unix file system permission set. Note that for a Unix domain socket, only write permission matters.

Value range Default value Definition scope Context

numeric Unix file permission mode (as accepted by the chmod or umask commands)

0777

local

postmaster

update_process_title

Enables updating of the process title every time a new SQL command is received by the server. The process title is typically viewed by the ps command.

Value range Default value Definition scope Context

boolean

on

local

superuser

vacuum_cost_delay

The time (in milliseconds) that the process will sleep when the cost limit has been exceeded. 0 deactivates the cost-based vacuum delay feature.

Value range Default value Definition scope Context

0 — 100

0

local

user

vacuum_cost_limit

The accumulated cost that will cause the vacuuming process to sleep.

Value range Default value Definition scope Context

integer > 0

200

local

user

vacuum_cost_page_dirty

The estimated cost charged when vacuum modifies a block that was previously clean. It represents the extra I/O required to flush the dirty block out to disk again.

Value range Default value Definition scope Context

integer > 0

20

local

user

vacuum_cost_page_hit

The estimated cost for vacuuming a buffer found in the shared buffer cache. It represents the cost to lock the buffer pool, look up the shared hash table, and scan the content of the page.

Value range Default value Definition scope Context

integer > 0

1

local

user

vacuum_cost_page_miss

The estimated cost for vacuuming a buffer that has to be read from disk. This represents the effort to lock the buffer pool, lookup the shared hash table, read the desired block in from the disk and scan its content.

Value range Default value Definition scope Context

integer > 0

10

local

user

vacuum_freeze_min_age

Specifies the cutoff age (in transactions) that VACUUM should use to decide whether to replace transaction IDs with FrozenXID while scanning a table.

For information about VACUUM and transaction ID management, see Remove expired table rows via VACUUM and Preventing Transaction ID Wraparound Failures in the PostgreSQL documentation.

Value range Default value Definition scope Context

0 — 1000000000

50000000

local

user

wait_for_replication_threshold

When Greengage DB segment mirroring is enabled, specifies the maximum total size of write-ahead logging (WAL)-based records (in KB) written by a transaction on the primary segment instance before the records are written to the mirror segment instance for replication. As the default, Greengage DB writes the records to the mirror segment instance when a checkpoint occurs or the wait_for_replication_threshold value is reached.

A value of 0 deactivates the check for the number of records. The records are written to the mirror segment instance only after a checkpoint occurs.

If you set the value to 0, database performance issues might occur under heavy loads that perform long transactions that do not perform a checkpoint operation.

Value range Default value Definition scope Context

0 — INT_MAX/1024

1024

master

sighup

wal_keep_segments

For Greengage DB master mirroring, sets the maximum number of processed WAL segment files that are saved by the active Greengage DB master if a checkpoint operation occurs.

The segment files are used to synchronize the active master with the standby master.

Value range Default value Definition scope Context

integer

5

master

sighup

wal_receiver_status_interval

For Greengage DB master mirroring, sets the interval in seconds between walreceiver process status messages that are sent to the active master. Under heavy loads, the time might be longer.

The value of wal_sender_timeout controls the time that the walsender process waits for a walreceiver message.

Value range Default value Definition scope Context

0 — INT_MAX/1000

10

master

sighup

wal_sender_archiving_status_interval

When Greengage DB segment mirroring and archiving is enabled, specifies the interval in milliseconds at which the walsender process on the primary segment sends archival status messages to the walreceiver process of its corresponding mirror segment.

A value of 0 deactivates this feature.

Value range Default value Definition scope Context

0 — INT_MAX

10000 (10 seconds)

local

sighup

wal_sender_timeout

For Greengage DB master mirroring, sets the maximum time in milliseconds that the walsender process on the active master waits for a status message from the walreceiver process on the standby master. If a message is not received, the walsender logs an error message.

The wal_receiver_status_interval parameter controls the interval between walreceiver status messages.

Value range Default value Definition scope Context

0 — INT_MAX

300000 (5 minutes)

master

user

work_mem

Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files. If this value is specified without units, it is taken as kilobytes. The default value is 32 MB. Note that for a complex query, several sort or hash operations might be running in parallel; each operation will be allowed to use as much memory as this value specifies before it starts to write data into temporary files. In addition, several running sessions may be performing such operations concurrently. Therefore, the total memory used could be many times the value of work_mem; keep this fact in mind when choosing the value for this parameter. Sort operations are used for ORDER BY, DISTINCT, and merge joins. Hash tables are used in hash joins, hash-based aggregation, and hash-based processing of IN subqueries. Apart from sorting and hashing, bitmap index scans also rely on work_mem. Operations relying on tuplestores such as function scans, CTEs, PL/pgSQL and administration UDFs also rely on work_mem.

Apart from assigning memory to specific execution operators, setting work_mem also influences certain query plans over others when the Postgres planner is used.

work_mem is a distinct memory management concept that does not interact with resource queue or resource group memory controls, which are imposed at the query level.

Value range Default value Definition scope Context

number of kilobytes

32MB

master

user

writable_external_table_bufsize

Size of the buffer that Greengage DB uses for network communication, such as the gpfdist utility and external web tables (that use HTTP). Valid units are KB (as in 128KB), MB, GB, and TB. Greengage DB stores data in the buffer before writing the data out. For information about gpfdist, see Use gpfdist.

Value range Default value Definition scope Context

32 — 131072 (32KB — 128MB)

1MB

local

user

xmlbinary

Specifies how binary values are encoded in XML data. For example, when bytea values are converted to xml. The binary data can be converted to either Base64 encoding or hexadecimal encoding. The default is base64.

The parameter can be set for a database system, an individual database, or a session.

See also Work with XML data.

Value range Default value Definition scope Context

base64
hex

base64

master

user

xmloption

Specifies whether XML data is to be considered as an XML document (document) or XML content fragment (content) for operations that perform implicit parsing and serialization. The default is content.

This parameter affects the validation performed by xml_is_well_formed(). If the value is document, the function checks for a well-formed XML document. If the value is content, the function checks for a well-formed XML content fragment.

NOTE

An XML document that contains a document type declaration (DTD) is not considered a valid XML content fragment. If xmloption is set to content, XML that contains a DTD is not considered valid XML.

To cast a character string that contains a DTD to the xml data type, use the xmlparse() function with the document keyword, or change the xmloption value to document.

The parameter can be set for a database system, an individual database, or a session.

See also Work with XML data.

SET XML OPTION { DOCUMENT | CONTENT };
Value range Default value Definition scope Context

document
content

content

master

user

Developer parameters

Server configuration parameters listed in this section are intended for development and testing only. They do not appear in the pg_settings view and gpconfig -l output but can be set in postgresql.conf or via the SET command, depending on their context.

CAUTION

It is not recommended to alter these parameters in production environments.

dtx_phase2_retry_count

The maximum number of retries attempted by Greengage DB during the second phase of a two-phase commit. When one or more segments cannot successfully complete the commit phase, the master retries the commit a maximum of dtx_phase2_retry_count times. If the commit continues to fail on the last retry attempt, the master generates a PANIC.

When the network is unstable, the master may be unable to connect to one or more segments. Increasing the number of two-phase commit retries may improve high availability of Greengage DB when the master encounters transient network issues.

Value range Default value Definition scope Context

integer >= 0

60

master

superuser

enable_implicit_timeformat_YYYYMMDDHH24MISS

Activates or deactivates the deprecated implicit conversion of a string with the YYYYMMDDHH24MISS timestamp format to a valid date/time type.

The default value is off. When this parameter is set to on, Greengage DB converts a string with the timestamp format YYYYMMDDHH24MISS into a valid date/time type.

Value range Default value Definition scope Context

boolean

off

master

user

gp_add_column_inherits_table_setting

When adding a column to an append-optimized, column-oriented table with the ALTER TABLE command, this parameter controls whether the table’s data compression parameters for a column (compresstype, compresslevel, and blocksize) can be inherited from the table values. The default is off; the table’s data compression settings are not considered when adding a column. If the value is on, the table’s settings are considered.

When you create an append-optimized column-oriented table, you can set the table’s data compression parameters compresstype, compresslevel, and blocksize for the table in the WITH clause. When you add a column, Greengage DB sets each data compression parameter based on one of the following settings, in order of preference:

  1. The data compression setting specified in the ALTER TABLE command ENCODING clause.

  2. If this server configuration parameter is set to on, the table’s data compression setting specified in the WITH clause when the table was created. Otherwise, the table’s data compression setting is ignored.

  3. The data compression setting specified in the server configuration parameter gp_default_storage_options.

  4. The default data compression setting.

You must specify --skipvalidation when modifying this parameter as it is a restricted configuration parameter. Use extreme caution when setting configuration parameters with this option.

$ gpconfig --skipvalidation -c gp_add_column_inherits_table_setting -v on
Value range Default value Definition scope Context

boolean

off

master

user

gp_appendonly_compaction

Enables compacting segment files during VACUUM commands. When deactivated, VACUUM only truncates the segment files to the EOF value, as is the current behavior. The administrator may want to deactivate compaction in high I/O load situations or low space situations.

Value range Default value Definition scope Context

boolean

on

master

superuser

gp_eager_two_phase_agg

Activates or deactivates two-phase aggregation for the Postgres Planner.

The default value is off — the planner chooses the best aggregate path for a query based on the cost. When set to on, the planner adds a deactivation cost to each of the first-stage aggregate paths, which in turn forces the Planner to generate and choose a multi-stage aggregate path.

Value range Default value Definition scope Context

boolean

off

master

user

gp_enable_segment_copy_checking

Controls whether the distribution policy for a table (from the table DISTRIBUTED clause) is checked when data is copied into the table with the COPY FROM …​ ON SEGMENT command. If true, an error is returned if a row of data violates the distribution policy for a segment instance. The default is true.

If the value is false, the distribution policy is not checked. The data added to the table might violate the table distribution policy for the segment instance. Manual redistribution of table data might be required.

The parameter can be set for a database system or a session. The parameter cannot be set for a specific database.

Value range Default value Definition scope Context

boolean

true

master

user

gpperfmon_log_alert_level

Controls which message levels are written to the gpperfmon log. Each level includes all the levels that follow it. The later the level, the fewer messages are sent to the log.

Value range Default value Definition scope Context

NONE
WARNING
ERROR
FATAL
PANIC

NONE

local

user

gp_log_endpoints

Controls whether parallel retrieve cursor endpoint information is written to the server log. The default value is false — Greengage DB does not log endpoint details to the log file. When set to true, Greengage DB writes endpoint detail information to the log file.

Value range Default value Definition scope Context

boolean

false

master

superuser

gp_log_fts

Controls the amount of detail the fault detection process (ftsprobe) writes to the log file.

Value range Default value Definition scope Context

OFF
TERSE
VERBOSE
DEBUG

TERSE

master

sighup

gp_log_interconnect

Controls the amount of information that is written to the log file about communication between Greengage DB segment instance worker processes. The default value is TERSE. The log information is written to both the master and segment instance logs.

Increasing the amount of logging could affect performance and increase disk space usage.

Value range Default value Definition scope Context

OFF
TERSE
VERBOSE
DEBUG

TERSE

master

user

gp_log_gang

Controls the amount of information that is written to the log file about query worker process creation and query management. The default value is OFF, do not log information.

Value range Default value Definition scope Context

OFF
TERSE
VERBOSE
DEBUG

OFF

master

user

gp_log_resqueue_priority_sleep_time

Controls the logging of per-statement sleep time when resource queue-based resource management is active. You can use this information for analysis of sleep time for queries.

The default value is false, do not log the statement sleep time. When set to true, Greengage DB:

  • Logs the current amount of sleep time for a running query every two minutes.

  • Logs the total sleep time duration for a query at the end of a query.

The information is written to the server log.

Value range Default value Definition scope Context

boolean

false

master

user

gp_max_parallel_cursors

Specifies the maximum number of active parallel retrieve cursors allowed on a Greengage DB cluster. A parallel retrieve cursor is considered active after it has been declared (DECLARE), but before it is closed (CLOSE) or returns an error. By default, no limit is set.

Value range Default value Definition scope Context

-1 — 1024

-1 (no limit)

master

superuser

gp_recursive_cte

Controls the availability of the RECURSIVE keyword in the WITH clause of a SELECT, SELECT INTO, DELETE, INSERT, or UPDATE command. The keyword allows a subquery in the WITH clause of a command to reference itself. The default value is true, the RECURSIVE keyword is allowed in the WITH clause of a command.

For information about the RECURSIVE keyword, see Common table expressions.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

true

master

user

gp_enable_explain_allstat

If enabled, will show stats for each individual segment in EXPLAIN ANALYZE output. This is useful to identify skew or slowness on a particular segment.

Value range Default value Definition scope Context

boolean

off

master

user

gp_retrieve_conn

A session that you initiate with PGOPTIONS='-c gp_retrieve_conn=true' is a retrieve session. You use a retrieve session to retrieve query result tuples from a specific endpoint instantiated for a parallel retrieve cursor.

This parameter can be set only in the PGOPTIONS value.

Value range Default value Definition scope Context

boolean

false

read only

backend

gp_session_role

The role of this server process is set to DISPATCH for the master and EXECUTE for a segment. UTILITY is used for connections to a Greengage DB cluster running in the master-only mode. This parameter can be set only in the PGOPTIONS value:

$ PGOPTIONS="-c gp_session_role=utility" psql postgres
Value range Default value Definition scope Context

DISPATCH
EXECUTE
UTILITY

DISPATCH (on master)
EXECUTE (on segment)

read only

backend

gp_use_legacy_hashops

For a table that is defined with a DISTRIBUTED BY <key_column> clause, this parameter controls the hash algorithm that is used to distribute table data among segment instances. The default value is false, use the jump consistent hash algorithm.

Setting the value to true uses the modulo hash algorithm.

Value range Default value Definition scope Context

boolean

false

master

user

log_file_mode

On Unix systems, this parameter sets the permissions for log files when logging_collector is enabled.

Value range Default value Definition scope Context

numeric Unix file permission mode (as accepted by the chmod or umask commands)

0600

local

sighup

optimizer_array_expansion_threshold

When GPORCA is enabled (the default) and is processing a query that contains a predicate with a constant array, the optimizer_array_expansion_threshold parameter limits the optimization process based on the number of constants in the array. If the array in the query predicate contains more than the number of elements specified by the parameter, GPORCA deactivates the transformation of the predicate into its disjunctive normal form during query optimization.

The default value is 100.

For example, when GPORCA is running a query that contains an IN clause with more than 100 elements, GPORCA does not transform the predicate into its disjunctive normal form during query optimization to reduce optimization time and consume less memory. The difference in query processing can be seen in the filter condition for the IN clause of the query EXPLAIN plan.

Changing the value of this parameter changes the trade-off between a shorter optimization time and lower memory consumption, and the potential benefits from constraint derivation during query optimization, for example, conflict detection and partition elimination.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

integer > 0

100

master

user

optimizer_cost_model

When GPORCA is enabled (the default), this parameter controls the cost model that GPORCA chooses for bitmap scans used with bitmap indexes or with B-tree indexes on AO tables.

  • legacy — preserves the calibrated cost model used by GPORCA in earlier versions.

  • calibrated — improves cost estimates for indexes.

  • experimental — reserved for future experimental cost models; currently equivalent to the calibrated model.

The default cost model, calibrated, is more likely to choose a faster bitmap index with nested loop joins instead of hash joins.

Value range Default value Definition scope Context

legacy
calibrated
experimental

calibrated

master

user

optimizer_cte_inlining_bound

When GPORCA is enabled (the default), this parameter controls the amount of inlining performed for common table expression (CTE) queries (queries that contain a WITH clause). The default value, 0, deactivates inlining.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

integer >= 0

0

master

user

optimizer_dpe_stats

When GPORCA is enabled (the default) and this parameter is true (the default), GPORCA derives statistics that allow it to more accurately estimate the number of rows to be scanned during dynamic partition elimination.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

true

master

user

optimizer_discard_redistribute_hashjoin

When GPORCA is enabled (the default), this parameter specifies whether GPORCA should eliminate plans that include a HashJoin operator with a Redistribute Motion child. Eliminating such plans can improve performance in cases where the data being joined exhibits high skewness in the join keys.

The default setting is off, GPORCA considers all plan alternatives, including those with a Redistribute Motion child, in the HashJoin operator. If you observe performance issues with queries that use a HashJoin with highly skewed data, you may want to consider setting optimizer_discard_redistribute_hashjoin to on to instruct GPORCA to discard such plans.

Value range Default value Definition scope Context

boolean

off

master

user

optimizer_enable_dml

When GPORCA is enabled (the default) and this parameter is true (the default), GPORCA attempts to run DML commands such as INSERT, UPDATE, and DELETE. If GPORCA cannot run the command, Greengage DB falls back to the Postgres Planner.

When set to false, Greengage DB always falls back to the Postgres Planner when performing DML commands.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

true

master

user

optimizer_enable_hashjoin

When GPORCA is enabled (the default) and this parameter is true (the default), GPORCA can generate all hash join plan types except for full hash join. Those may include inner, left, right, left semi, and left anti semi hash joins. This provides a query execution performance improvement, particularly when the table is large and is not indexed.

When deactivated (false), GPORCA does not generate hash join plan types.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

true

master

user

optimizer_enable_indexonlyscan

When GPORCA is enabled (the default) and this parameter is true (the default), GPORCA can generate index-only scan plan types for B-tree indexes. GPORCA accesses the index values only, not the data blocks of the relation. This provides a query execution performance improvement, particularly when the table has been vacuumed, has wide columns, and GPORCA does not need to fetch any data blocks.

When deactivated (false), GPORCA does not generate index-only scan plan types.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

true

master

user

optimizer_enable_master_only_queries

When GPORCA is enabled (the default), this parameter allows GPORCA to run catalog queries that run only on the Greengage DB master. For the default value off, only the Postgres Planner can run catalog queries that run only on the Greengage DB master.

The parameter can be set for a database system, an individual database, or a session or query.

NOTE

Enabling this parameter decreases the performance of short-running catalog queries. To avoid this issue, set this parameter only for a session or a query.

Value range Default value Definition scope Context

boolean

off

master

user

optimizer_enable_multiple_distinct_aggs

When GPORCA is enabled (the default), this parameter allows GPORCA to support Multiple Distinct Qualified Aggregates, such as SELECT count(DISTINCT a), sum(DISTINCT b) FROM foo. This parameter is deactivated by default because its plan is generally suboptimal in comparison to the plan generated by the Postgres planner.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

off

master

user

optimizer_enforce_subplans

When GPORCA is enabled (the default), this parameter controls whether queries containing scalar subqueries are forced to be planned as subplans.

By default, the value is off. In this case, GPORCA may plan a scalar subquery using a nested loop join if the subquery is uncorrelated or can be decorrelated. When set to on, GPORCA disables the join option and always plans the scalar subquery as a subplan.

You can set this parameter for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

off

master

user

optimizer_force_agg_skew_avoidance

When GPORCA is enabled (the default), this parameter affects the query plan alternatives that GPORCA considers when three-stage aggregate plans are generated.

When the value is true, the default, GPORCA considers only three-stage aggregate plans where the intermediate aggregation uses the GROUP BY and DISTINCT columns for distribution to reduce the effects of processing skew.

If the value is false, GPORCA can also consider a plan that uses GROUP BY columns for distribution. These plans might perform poorly when processing skew is present.

Value range Default value Definition scope Context

boolean

true

master

user

optimizer_force_comprehensive_join_implementation

When GPORCA is enabled (the default), this parameter affects its consideration of nested loop join and hash join alternatives.

The default value is false, GPORCA does not consider nested loop join alternatives when a hash join is available, which significantly improves optimization performance for most queries. When set to true, GPORCA will explore nested loop join alternatives even when a hash join is possible.

Value range Default value Definition scope Context

boolean

false

master

user

optimizer_force_multistage_agg

For the default settings, GPORCA is enabled and this parameter is false, GPORCA makes a cost-based choice between a one- or two-stage aggregate plan for a scalar distinct qualified aggregate. When true, GPORCA chooses a multi-stage aggregate plan when such a plan alternative is generated.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

false

master

user

optimizer_force_three_stage_scalar_dqa

For the default settings, GPORCA is enabled and this parameter is true, GPORCA chooses a plan with multistage aggregates when such a plan alternative is generated. When the value is false, GPORCA makes a cost-based choice rather than a heuristic choice.

The parameter can be set for a database system, an individual database, a session, or a query.

Value range Default value Definition scope Context

boolean

true

master

user

optimizer_nestloop_factor

This parameter adds a costing factor to GPORCA to prioritize hash joins instead of nested loop joins during query optimization. The default value of 1024 was chosen after evaluating numerous workloads with uniformly distributed data. 1024 should be treated as the practical upper bound setting for this parameter. If you find the GPORCA selects hash joins more often than it should, reduce the value to shift the costing factor in favor of nested loop joins.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

double >= 1.0

1024

master

user

optimizer_penalize_broadcast_threshold

When GPORCA is enabled (the default), during query optimization GPORCA penalizes the cost of plans that attempt to broadcast more rows than specified by optimizer_penalize_broadcast_threshold. Default 100000. When this parameter is set to 0, GPORCA sets this broadcast threshold to unlimited and never penalizes a broadcast motion.

Value range Default value Definition scope Context

integer >= 0

100000

master

user

optimizer_penalize_skew

When GPORCA is enabled (the default), this parameter allows GPORCA to penalize the local cost of a HashJoin with a skewed Redistribute Motion as a child to favor a Broadcast Motion during query optimization. The default value is true.

GPORCA determines there is skew for a Redistribute Motion when the number of distinct values (NDV) is less than the number of segments.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

true

master

user

optimizer_print_missing_stats

When GPORCA is enabled (the default), this parameter controls the display of table information about columns with missing statistics for a query. The default value is true, display the column information to the client. When the value is false, the information is not sent to the client.

The information is displayed during query execution, or with the EXPLAIN or EXPLAIN ANALYZE commands.

The parameter can be set for a database system, an individual database, or a session.

Value range Default value Definition scope Context

boolean

true

master

user

optimizer_print_optimization_stats

When GPORCA is enabled (the default), this parameter enables logging of GPORCA query optimization statistics for various optimization stages for a query. The default value is off, do not log optimization statistics. To log the optimization statistics, this parameter must be set to on and the parameter client_min_messages must be set to log.

  • SET optimizer_print_optimization_stats = on;

  • SET client_min_messages = 'log';

The information is logged during query execution, or with the EXPLAIN or EXPLAIN ANALYZE commands.

This parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

boolean

off

master

user

optimizer_skew_factor

When GPORCA is enabled (the default), optimizer_skew_factor controls skew ratio computation.

The default value is 0, skew computation is turned off for GPORCA. To enable skew computation, set optimizer_skew_factor to a value between 1 and 100, inclusive.

The larger the optimizer_skew_factor, the larger the cost that GPORCA assigns to redistributed hash join, such that GPORCA favors a broadcast hash join more.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

0 — 100

0

master

user

optimizer_sort_factor

When GPORCA is enabled (the default), optimizer_sort_factor controls the cost factor to apply to sorting operations during query optimization. The default value 1 specifies the default sort cost factor. The value is a ratio of increase or decrease from the default factor. For example, a value of 2.0 sets the cost factor at twice the default, and a value of 0.5 sets the factor at half the default.

The parameter can be set for a database system, an individual database, or a session or query.

Value range Default value Definition scope Context

decimal > 0

1.0

master

user

optimizer_use_gpdb_allocators

When GPORCA is enabled (the default) and this parameter is true (the default), GPORCA uses Greengage DB memory management when running queries. When set to false, GPORCA uses GPORCA-specific memory management. Greengage DB memory management allows for faster optimization, reduced memory usage during optimization, and improves GPORCA support of vmem limits when compared to GPORCA-specific memory management.

Value range Default value Definition scope Context

boolean

true

master

postmaster

optimizer_xform_bind_threshold

When GPORCA is enabled (the default), this parameter controls the maximum number of bindings per transform that GPORCA produces per group expression. Setting this parameter limits the number of alternatives that GPORCA creates, in many cases reducing the optimization time and overall memory usage of queries that include deeply nested expressions.

The default value is 0, GPORCA produces an unlimited set of bindings.

Value range Default value Definition scope Context

integer >= 0

0

master

user

verify_gpfdists_cert

When a Greengage DB external table is defined with the gpfdists protocol to use SSL security, this parameter controls whether SSL certificate authentication is enabled. Regardless of the setting of this server configuration parameter, Greengage DB always encrypts data that you read from or write to an external table that specifies the gpfdists protocol.

The default is true, SSL authentication is enabled when Greengage DB communicates with the gpfdist utility to either read data from or write data to an external data source.

The value false deactivates SSL certificate authentication. These SSL exceptions are ignored:

  • The self-signed SSL certificate that is used by gpfdist is not trusted by Greengage DB.

  • The host name contained in the SSL certificate does not match the host name that is running gpfdist.

You can set the value to false to deactivate authentication when testing the communication between the Greengage DB external table and the gpfdist utility that is serving the external data.

CAUTION

Deactivating SSL certificate authentication exposes a security risk by not validating the gpfdists SSL certificate.

For information about running the gpfdist utility, see Use gpfdist.

Value range Default value Definition scope Context

boolean

true

master

user

vmem_process_interrupt

Enables checking for interrupts before reserving vmem memory for a query during Greengage DB query execution. Before reserving further vmem for a query, check if the current session for the query has a pending query cancellation or other pending interrupts. This ensures more responsive interrupt processing, including query cancellation requests. The default is off.

Value range Default value Definition scope Context

boolean

off

master

user

xid_stop_limit

The number of transaction IDs prior to the ID where transaction ID wraparound occurs. When this limit is reached, Greengage DB stops creating new transactions to avoid data loss due to transaction ID wraparound.

Value range Default value Definition scope Context

integer >= 10000000

100000000

local

postmaster

xid_warn_limit

The number of transaction IDs prior to the limit specified by xid_stop_limit. When Greengage DB reaches this limit, it issues a warning to perform a VACUUM operation to avoid data loss due to transaction ID wraparound.

Value range Default value Definition scope Context

integer >= 10000000

500000000

local

postmaster