K.4. Additional Modules #

K.4.1. Built-In Default Modules
K.4.2. pg_trgm_mchar
K.4.3. dbcopies_decoding
K.4.4. plantuner
K.4.5. online_analyze
K.4.6. auto_dump

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 MCHAR and MVARCHAR data types for compatibility with Microsoft SQL Server.

K.4.2. pg_trgm_mchar #

pg_trgm_mchar is a Postgres Pro extension that allows fast trigram-based search for similar mchar and mvarchar strings. These data types are commonly used by 1C solutions.

To enable trigram‑based search support for these data types, install pg_trgm_mchar with the CASCADE option:

CREATE EXTENSION pg_trgm_mchar CASCADE;

This command automatically installs all required dependencies and enables trigram‑based search for mchar and mvarchar. This may be particularly useful for speeding up processing of dynamic lists in 1C solutions.

K.4.3. dbcopies_decoding #

dbcopies_decoding is a 1C module for updating database copies, which is enabled by default. To use the logical replication mechanism of this module, set the wal_level parameter to logical.

For more information about this module, contact 1C support.

K.4.4. plantuner #

The plantuner module allows optimizing query execution plans. To configure it for 1C solutions, do the following:

  1. Add the library name to the shared_preload_libraries variable in the postgresql.conf file.

    shared_preload_libraries = 'plantuner'
    
  2. Set the plantuner.fix_empty_table parameter to on to improve planning for recently created empty tables.

    plantuner.fix_empty_table = on
    

K.4.5. 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

For 1C:Enterprise versions 8.3.13 and later, using the online_analyze module is not necessary. This is because 1C:Enterprise automatically performs ANALYZE after each insert into a temporary table.

However, enabling online_analyze may still be useful for older versions of 1C:Enterprise or in specific cases, for example, when 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.

  1. Add the library name to the shared_preload_libraries variable in the postgresql.conf file.

    shared_preload_libraries = 'online_analyze'
    
  2. Enable this module.

    online_analyze.enable = on
    
  3. Specify the minimum number of row updates before starting online analysis.

    online_analyze.threshold = 50
    
  4. Specify the fraction of the table size to start online analysis.

    online_analyze.scale_factor = 0.1
    
  5. Execute the ANALYZE command without VERBOSE.

    online_analyze.verbose = off
    
  6. Enable online analysis for temporary tables.

    online_analyze.table_type = 'temporary'
    
  7. Specify the minimum time interval between ANALYZE calls per table, in milliseconds.

    online_analyze.min_interval = 10000
    

K.4.6. 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:

  1. Add auto_dump to the shared_preload_libraries parameter in the postgresql.conf file:

    shared_preload_libraries = 'auto_dump'
    
  2. 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.