E.6. Release Notes for Tantor Certified 15.6.1#

E.6. Release Notes for Tantor Certified 15.6.1

E.6. Release Notes for Tantor Certified 15.6.1

Release date: 2024-05-22

E.6.1. Review

Tantor Certified is a Russian-made DBMS based on the updated and improved version of the PostgreSQL DBMS. Tantor Certified 15.6.1 is based on PostgreSQL 15.

Below are the additional modules and utilities added to Tantor Certified, as well as the list of changes to the server core.

E.6.2. Significant differences in this version

E.6.2.1. 64-bit transactions counter implemented

  • In PostgreSQL there is a limit (N = 2^32) on the number of transaction IDs (XIDs); when reached, you must execute the freeze procedure. This procedure is necessary to prevent looping (every N/2 transactions), which leads to performance degradation due to the need to read and rewrite all pages of the table that are not yet frozen. With 64-bit XID this need is actually postponed to a very distant future.

  • Transaction counter overflow is now only possible within a single page, only if a snapshot of more than 4 billion transactions is held, which in practice is difficult to achieve. In the future, it is planned to remove this restriction as well.

xid64 details:

buffers config

E.6.2.2. Support for autonomous transactions in PL/pgSQL

  • Added PL/pgSQL grammar extension for autonomous transactions. This grammar extension partially inherits the PL/SQL syntax from Oracle (PRAGMA AUTONOMOUS_TRANSACTION).

  • The main use case for this grammar extension is the ability to independently commit or undo a child transaction without affecting what happens to the current, parent transaction, for example, to maintain an audit trail.

  • The grammar extension implements autonomous transactions through the background process mechanism.

  • Future releases will add support for PL/Python and SQL grammar extensions.

E.6.2.3. Added ability to create bidirectional logical replication

  • It is now possible to use bidirectional logical replication between two tables, by adding a new origin parameter to the CREATE SUBSCRIPTION command.

  • The origin parameter can have two possible values: none and any.

  • Setting origin to none means that the subscription will only ask the publisher for changes that have no source. I.e. origin=none avoids looping during bidirectional replication.

  • Setting origin=any means that the publisher sends changes regardless of their origin (behavior as in PostgreSQL). The default is origin=any.

E.6.2.4. Added support for compression in the libpq library

  • Added support for compression in the libpq library, implemented by a new parameter in the libpq_compression configuration. The functionality can be used by client applications and drivers written in C or other languages that support API calls to C.

  • The libpq_compression parameter can take the following values: off, on, lz4, zlib. By default libpq_compression = off.

  • Compression is especially useful for importing/exporting data using the COPY command and for replication (both physical and logical). Compression can also reduce the response time of the Tantor Certified server for requests that return large amounts of data (e.g., JSON, BLOB, text, etc.).

libpq-compression details:

E.6.2.5. SIMD in data processing implemented

  • Accelerating data processing by means of several modifications of the Tantor Certified kernel that implement the SIMD (Single Instruction, Multiple Data) computing model.

  • Improved performance of the Tantor Certified through more efficient use of processor resources, especially when dealing with large volumes of data or complex data processing, such as processing text and JSON data.

  • Among implemented features: Linear search optimization, support for SSE2 (Streaming SIMD Extensions 2), abstraction of architecture-dependent parts, support for SIMD NEON.

E.6.2.6. Reserving connections

  • Added ability to reserve connection slots for users that do not have superuser rights.

  • Connections are reserved via the new reserved_connections configuration parameter (in the postgresql.conf file), and are only available to users with the new pg_use_reserved_connections predefined role.

  • The value of the superuser_reserved_connections parameter remains as a final reserve in case reserved_connections have been exhausted.

E.6.2.7. Added transaction_timeout parameter

  • The transaction_timeout parameter allows you to cancel any transaction that lasts longer than the specified time period. The limit applies to both explicit transactions (started with the BEGIN command) and implicitly started transactions corresponding to an individual statement.

transaction_timeout details:

E.6.2.8. Prefetching blocks for the prefetching log (WAL)

  • Improves performance by pre-reading Tantor Certified log blocks (WAL blocks) using the posix_fadvise() system call with the POSIX_FADV_WILLNEED parameter.

  • Added new WAIT_EVENT_WAL_PREFETCH event to track the time it takes to pre-read the WAL.

E.6.3. Fixes in the core of Tantor Certified

  • Fixed incorrect handling of the TYPALIGN_XID data type when JIT is enabled.

  • Fixed the "cache lookup failed for type" bug when using autonomous transactions.

  • Corrected behavior of autonomous transactions for stored procedures.

  • Added a mechanism for verifying transaction log checksums.

  • Some minor fixes related with llvmjit.

  • Made changes to improve DBMS stability.

  • Changes made to improve DBMS performance with a large number of concurrent connections.

  • Implemented a thread pool for autonomous transactions, which speeds up the creation of autonomous transactions.

  • Extended the use of SIMD (Single Instruction, Multiple Data) for several linear search functions.

  • Unified the version of libzstd.

  • Optimized scheduler performance for 1C scenarios.

  • Fixed a rare error "missing chunk number 0 for toast value XXX in pg_toast_XXX" when working with a 64-bit transaction counter.

  • Improved the informativeness of server logs.

E.6.4. Supply Method

Three packages are now available for installation:

  • Full DBMS package (server, header files, client applications, libpq5)

  • Client applications

  • libpq5 (a library that allows user programs to connect to Tantor Certified and PostgreSQL database servers)

E.6.5. Fixes in Packaging

  • Fixed the logic of pre-install and post-uninstall for RPM and DEB packages.

E.6.6. Additional supplied modules

E.6.6.1. Modules added in the current release

Table E.1.  Table of extensions

Extension Description
credcheck The module provides few general credential checks, which will be evaluated during the user creation, during the password change and user renaming. By using this extension, we can define a set of rules to allow a specific set of credentials, and a set of rules to reject a certain type of credentials. This extension is developed based on the PostgreSQL's check_password_hook hook.
dbcopies_decoding A module for supporting the database copy mechanism and data accelerator.
fasttrun The module provides transaction unsafe function to truncate temporary tables without growing pg_class size. This module is required for 1C Enterprise support. Fast truncate operation is not transactional, so its results cannot be rolled back and become immediately visible in all sessions regardless of isolation level.
fulleq The module provides additional equivalence operator for compatibility with Microsoft SQL Server. This module is required for 1C Enterprise support.
hypopg The module adds support for hypothetical_indexes. A hypothetical or virtual index is an index that does not actually exist. Thus, no CPU, disk, or any other resource is required to create. It is useful to know if certain indexes can improve performance for problematic queries, as you can know if Tantor will use those indexes or not without having to spend resources creating them.
mchar The module designed to improve 1C Enterprise support, most popular Russian CRM and ERP system. It implements types MCHAR and MVARCHAR, which are bug-to-bug compatible with MS SQL CHAR and VARCHAR respectively. Additionally, these types use the ICU library for comparison and case conversion, so their behavior is identical across different operating systems. Tantor DBMS also includes citext extension which provides types similar to MCHAR. But this extension doesn’t emulate MS-SQL behavior concerning end-of-value whitespace.
online_analyze The module performs activation of statistic collection right after INSERT/UPDATE/DELETE/SELECT INTO for involved tables.
orafce The module represents a set of functions that provide compatibility with Oracle databases.These functions allow simplifying of the migration to Tantor and reducing the expenses on applications' reconfiguration.
Optimized Row Columnar(ORC) The module provides column method of data storage with a possibility of compression to decrease in-out volume and assure high performance. Applicable to append-only, e.g. data time series and displays of corporate storages.
page_repair A module for restoring individual damaged pages using data from the hot standby server. Allows you to save recovery time because it does not require recovery of all data, but only individual pages.
pg_background The module allows the user to execute an arbitrary command in the background and gives users the ability to run commands such as: VACUUM and CREATE INDEX CONCURRENTLY from SQL, as well as run autonomous transactions, including asynchronous mode.
pg_cron The module represents a cron-based job scheduler working within the database as an extension. It uses the same syntax as regular cron, but it allows scheduling Tantor DBMS commands directly from the database.
pg_hint_plan The module allows configuring plans of SQL queries execution using so called "hints" in SQL comments. This gives an opportunity to compensate the scheduler errors occurring in critical cases.
pg_partman The module allows you to automatically create and manage batches of tables, both based on time intervals and lists.
pg_qualstats The module saves statistic data on found predicates in WHERE operators and JOIN operations. This allows analysing the most frequent qualifiers (predicates) in the database, and also to identify correlated columns by defining which columns are most frequently requested together.
pg_repack The module allows you to eliminate the bloat of tables and indexes (bloat) and, if necessary, restore the physical order of clustered indexes (CLUSTER). Unlike CLUSTER and VACUUM FULL commands, it works online without holding the exclusive lock of the tables being served during operation.
pg_store_plans The module provides the means to keep track of the execution plan statistics for all SQL statements executed by the Tantor server.
pg_variables The module provides functionality to work with variables of different types in the current user session.
pg_wait_sampling The module provides information about current waiting event for a certain process. However, to collect a descriptive statistics of server behaviour a user must repeatedly collect the current waiting event. This module represents an extension for collecting sample statistics of waiting events that prevent needless sampling of the current event waiting.
pgaudit The module provides detailed session and/or object audit logging via the standard Tantor DBMS logging facility. The goal of the pgAudit is to provide Tantor DBMS users with capability to produce audit logs often required to comply with government, financial, or ISO certifications.
pgauditlogtofile Is an addon to pgAudit than will redirect audit log lines to an independent file, instead of using PostgreSQL server logger. This will allow us to have an audit file that we can easily rotate without polluting server logs with those messages. Audit logs in heavily used systems can grow very fast. This extension allows to automatically rotate the files based in a number of minutes.
pgq The module provides a universal high-performance non-blocking queue with a simple API based on SQL functions.
pgsql-http The module allows making a trigger that calls a web service available to return a result, or makes the service update according to the new state of the database.
plantuner The module provides a possibility to manage the scheduler by providing prompts that make the optimizer partially ignore its algorithm.

E.6.6.2. Additional supplied programs

Table E.2.  Table of utilities

Utility Description
pgcompacttable pgcompacttable is a tool for reducing the size of bloated tables and indexes (bloat) without heavy blocking. It is designed to reorganize data in tables and rebuild indexes to regain disk space without affecting database performance.

E.6.7. Fixes for Additional Supplied Modules

  • Fixed a segmentation fault error in rare usage scenarios of pg_store_plans.

  • Optimized performance of fasttrun.

  • Optimized performance of online_analyze.

E.6.8. Supported Operating Systems

The list of supported operating systems (OS) has been expanded. The full list is provided below:

  • AstraLinux 1.7

  • AstraLinux 1.8

  • Redos 7.3

DBMS builds are created and tested for these operating systems on an ongoing basis.

E.6.9. Migration to version 15.6.1

To migrate from PostgreSQL or Tantor DB, first install the latest minor version and then perform a data offload/restore by applying pg_dumpall, or use the pg_upgrade utility.