F.3. Configuration Parameters #
You can configure pgpro_axe parameters in the postgresql.conf file.
duckdb.force_execution#Forces analytical queries to use DuckDB execution. This is necessary when accessing only Postgres Pro tables in a query. As soon as you use a DuckDB-only feature, DuckDB execution is used automatically.
DuckDB-only features include reading from DuckDB tables, using DuckDB functions (e.g.,
read_parquet) orCOPYto a remote storage (e.g.,s3://).Possible values:
truefalse
Default value:
false.Access: All roles.
duckdb.default_collation#Specifies the default collation to use for DuckDB string operations and sorting. This parameter allows configuring locale-specific string comparison behavior.
Example F.31.
"en_us""de_de""C"
Default value:
""— uses DuckDB default.Access: Superuser only.
F.3.1. Security #
duckdb.postgres_role#Specifies the Postgres Pro role that is allowed to use DuckDB execution and manage secrets. If the specified role does not exist when running
CREATE EXTENSION pgpro_axe, this role is created automatically.Default value:
""— superuser only.Access: Requires a restart.
duckdb.disabled_filesystems#Disables storages for pgpro_axe.
Possible values:
LocalFileSystem: Disable local storages.S3FileSystem: Disable S3 storages.HTTPFileSystem: Disable NFS storages.
By default, the local storage is disabled:
Example F.32.
postgres=> SHOW duckdb.disabled_filesystems; duckdb.disabled_filesystems ----------------------------- LocalFileSystem (1 row)
You can specify multiple storages by separating their names with commas without spaces:
Example F.33.
postgres=# ALTER SYSTEM SET duckdb.disabled_filesystems TO 'LocalFileSystem,HTTPFileSystem'; ALTER SYSTEM -- after server reboot -- postgres=# SHOW duckdb.disabled_filesystems; duckdb.disabled_filesystems -------------------------------- LocalFileSystem,HTTPFileSystem (1 row)Access: Superuser only.
duckdb.autoinstall_known_extensions#Specifies whether known DuckDB extensions can be automatically installed into pgpro_axe when an analytical query requires them.
Possible values:
truefalse
Only extensions that DuckDB marks as auto-installable can be installed automatically. You can install extensions manually using the
duckdb.install_extensionstored procedure.If this parameter is set to
true, known extensions are also automatically loaded into pgpro_axe.Default value:
true.Access: Superuser only.
duckdb.autoload_known_extensions#Specifies whether known extensions can be automatically loaded into pgpro_axe when an analytical query requires them.
Possible values:
truefalse
Only loads extensions that are already installed into pgpro_axe. You can also install extensions automatically by setting the
duckdb.autoinstall_known_extensionsconfiguration parameter totrue.Default value:
true.Access: Superuser only.
duckdb.allow_community_extensions#Specifies whether community extensions can be installed.
Possible values:
truefalse
Default value:
false.Access: Superuser only.
duckdb.unsafe_allow_execution_inside_functions#Allows DuckDB execution inside Postgres Pro functions.
Possible values:
truefalse
Important
This feature can cause Postgres Pro AXE to crash and is disabled by default.
Default value:
false.Access: Superuser only.
duckdb.enable_external_access#Allows DuckDB to access external resources (e.g., HTTP, S3).
Possible values:
truefalse
Important
This feature can cause Postgres Pro AXE to crash and is disabled by default.
Default value:
true.Access: Superuser only.
F.3.2. Resource Management #
Since any connection that uses DuckDB has its own DuckDB instance, these parameters are per-connection. When using pgpro_axe in many concurrent connections, it is recommended to specify lower values for certain parameters as compared to their defaults.
-
duckdb.max_memory/duckdb.memory_limit# The maximum memory that pgpro_axe can use to process a single analytical query, in megabytes. For example:
4096(4 GB),8192(8 GB), or1024(1 GB). When set to zero, 80% of RAM is used. You can configure this parameter for each session.Default value:
4096(4 GB).Access: Superuser only.
duckdb.threads/duckdb.worker_threads#The maximum number of threads (CPU cores) that Postgres Pro can use to process a single query. You can configure this parameter for each session.
Default value:
-1— the value is equal to the number of CPU cores.Access: Superuser only.
duckdb.max_workers_per_postgres_scan#The maximum number of Postgres Pro workers used for a single Postgres Pro scan. This parameter is similar to
max_parallel_workers_per_gather.Default value:
2.Access: All roles.
duckdb.threads_for_postgres_scan#The maximum number of DuckDB threads used for a single Postgres Pro scan. This parameter controls parallelism within DuckDB when scanning Postgres Pro tables.
Default value:
2.Access: All roles.
F.3.3. Advanced #
duckdb.convert_unsupported_numeric_to_double#Converts
NUMERICtypes with unsupportedprecision/scaletoDOUBLEinstead of throwing an error.Possible values:
truefalse
DuckDB supports
NUMERIC/DECIMALwith precision 1-38 and scale 0-38 (where scale ≤ precision). ForNUMERICs outside these limits:If
trueis specified, unsupportedNUMERICs are converted toDOUBLEwith possible precision loss.If
falseis specified, unsupportedNUMERICs cause an error.
Default value:
false.Access: All roles.
duckdb.unsafe_allow_mixed_transactions#Allows mixed transactions between DuckDB and Postgres Pro.
Possible values:
truefalse
Important
This parameter enables transactions that modify data in both databases, but it may cause consistency issues and is not recommended for production use.
Default value:
false.Access: All roles.
axe.use_postgres_snapshot#Specifies whether Postgres Pro AXE uses Postgres Pro snapshots for queries.
Possible values:
truefalse
If this parameter is set to
false, Postgres Pro snapshots are not used, which prevents Postgres Pro AXE from holding the transaction horizon. In this case, queries that work with heap tables fail with an error. For more information, refer to Section 26.4.Default value:
true.Access: All roles.
axe.unsafe_allow_savepoints#Specifies whether
SAVEPOINTcommands are allowed when DuckDB execution is used.Possible values:
truefalse
pgpro_axe does not support savepoints, so any changes made to DuckDB tables between
SAVEPOINTandROLLBACK TO SAVEPOINTcommands cannot be rolled back. By default, Postgres Pro AXE outputs an error when aSAVEPOINTcommand is executed. If this parameter is set totrue, Postgres Pro AXE ignoresSAVEPOINTcommands instead of outputting an error. Postgres Pro still processesSAVEPOINTandROLLBACK TO SAVEPOINTcommands for heap tables, so changes to heap tables are rolled back as expected.Default value:
false.Access: All roles.
F.3.4. Storage #
duckdb.temporary_directory#Specifies the directory for temporary files that pgpro_axe creates when the available RAM is insufficient for executing analytical queries. By default, temporary files are stored in the
DataDir/pg_duckdb/tempdirectory.Default value:
DataDir/pg_duckdb/temp.Access: Superuser only.
duckdb.max_temp_directory_size / duckdb.max_temporary_directory_size#The maximum amount of data that can be stored in the DuckDB temporary directory. This parameter allows preventing runaway analytical queries from consuming all available disk space.
Example F.34.
"10GB""500MB""2TB"
Default value:
""— no limit is enforced.Access: Superuser only.
duckdb.extension_directory#Specifies the directory where DuckDB stores its extensions. By default, extensions are stored under the Postgres Pro directory (
DataDir/pg_duckdb/extensions). This is useful for managing the extension storage or sharing extensions across multiple Postgres Pro instances.Default value:
"DataDir/pg_duckdb/extensions".Access: Superuser only.
duckdb.enable_external_file_cache#Enables or disables the cache for Parquet files from S3 storages. When enabled, Parquet files are cached in RAM to reduce storage read I/O requirements. For more information, refer to Section 20.3.
Possible values:
truefalse
Default value:
true.Access: Superuser only.
F.3.5. For Developers #
duckdb.allow_unsigned_extensions#Allows DuckDB to load extensions with invalid or missing signatures. This is mostly useful for the development of DuckDB extensions.
Possible values:
truefalse
Default value:
false.Access: Superuser only.
duckdb.log_pg_explain#Logs the
EXPLAINplan of a Postgres Pro scan at theNOTICElog level. This parameter is useful for debugging query execution and understanding how DuckDB interacts with Postgres Pro tables.Possible values:
truefalse
Default value:
false.Access: All roles.