K.4. Additional Modules
K.4.1. Built-In Default Modules
To provide support for 1C solutions, the Postgres Pro distribution includes the following built-in modules that are enabled by default and do not require additional configuration:
fasttrun — provides a transaction-unsafe function to truncate temporary tables without growing the size of
pg_class.fulleq — provides an additional equivalence operator for compatibility with Microsoft SQL Server.
mchar — provides additional
MCHARandMVARCHARdata types for compatibility with Microsoft SQL Server.
K.4.2. plantuner
The plantuner module allows optimizing query execution plans. To configure it for 1C solutions, do the following:
Add the library name to the
shared_preload_librariesvariable in thepostgresql.conffile.shared_preload_libraries = 'plantuner'
Set the
plantuner.fix_empty_tableparameter toonto improve planning for recently created empty tables.plantuner.fix_empty_table = on
K.4.3. online_analyze
The online_analyze module provides a set of features that immediately update statistics after INSERT, UPDATE, DELETE, SELECT INTO, or COPY operations for the affected tables.
Note
Temporary tables cannot be accessed by autovacuum, and 1C solutions use them extensively. Historically, online_analyze was designed specifically for 1C and used to keep statistics on temporary tables up to date. For 1C:Enterprise version 8.3.13 and later, this module is not needed because 1C:Enterprise automatically performs ANALYZE after each insert into a temporary table.
Statistics on persistent tables are collected by autovacuum so analyzing them with online_analyze is rarely needed, and immediate statistics updates can slow down query execution. This is why the module is disabled by default. Once enabled, it analyzes only temporary tables. However, you can enable it if background updates do not provide the desired result or if the optimizer frequently fails to estimate the row count.
The instruction below is relevant only if you decide to use the module.
To configure this module, follow the steps below.
Add the library name to the
shared_preload_librariesvariable in thepostgresql.conffile.shared_preload_libraries = 'online_analyze'
Enable this module.
online_analyze.enable = on
Specify the minimum number of row updates before starting online analysis.
online_analyze.threshold = 50
Specify the fraction of the table size to start online analysis.
online_analyze.scale_factor = 0.1
Execute the
ANALYZEcommand withoutVERBOSE.online_analyze.verbose = off
Enable online analysis for temporary tables.
online_analyze.table_type = 'temporary'
Specify the minimum time interval between
ANALYZEcalls per table, in milliseconds.online_analyze.min_interval = 10000
K.4.4. auto_dump
The auto_dump extension is designed to collect data on long-running and problematic queries and to further reproduce these problems for troubleshooting.
To enable and configure this extension, do the following:
Add
auto_dumpto the shared_preload_libraries parameter in thepostgresql.conffile:shared_preload_libraries = 'auto_dump'
Enable the extension:
auto_dump.enable = on
Before using the extension, set other required configuration parameters and restart the database server for the changes to take effect.