Introduction
The AllegroGraph transaction log archiver is a built-in feature for managing transaction log files. Transaction logs are created in the directory specified by the TransactionLogDir configuration parameter (or the main database directory if TransactionLogDir is not specified). Unless they are moved or removed by the transaction log archiver, the number and total size of the transaction logs will grow without bound.
Configuration directives
The transaction log archiver is controlled by a set of catalog-specific configuration parameters. Configuration parameters are described in Server Configuration and Control.
There used to be three directives associated with transaction logs. Now there is only one, TransactionLogArchive
. The other two are no longer used. We describe them so users will know what they used to do and how to achieve the same result using new tools.
TransactionLogArchive PATHNAME
If this directive is specified, transaction log files, when no longer needed for data recovery or replication, will be moved the the directory specified by PATHNAME. If this directive is not specified, the files will be deleted when they are no longer needed. This behavior is a change from releases prior to version 6.3.0 where the no longer used TransactionLogRetain
directive specified what was to be done with unneeded transaction log files.
TransactionLogRetain VALUE
No longer used. This directive will be ignored starting in release 6.3.0 and a warning will be generated when AllegroGraph starts if this directive is found in the configuration file. This directive used to specify what to do with unneeded transaction log files. Now such files are either archived or deleted when they are no longer needed for data recovery or replication (that is, when all data they describe has been checkpointed). Whether the files are archived or deleted is controlled by the TransactionLogArchive
directive described above. VALUE used to be one of:
recovery: files are only kept as necessary for recovery. Files necessary for recovery are always kept so this choice meant the system should do nothing extra.
archive: told the system to move transaction log files to the archive location specified by the
TransactionLogArchive
directive when they were no longer needed for recovery or replication. Files are now archived when a value is specified for theTransactionLogArchive
directive.replication: this value informed the system that transaction log files were also needed by replica databases. This is now done when replicas are registered.
all: told the system to keep all transaction log files in the transaction log file location. This option is no longer supported, but archiving keeps all files in the archive directory.
TransactionLogReplicationJobname VALUE
This directive is no longer used. This directive will be ignored starting in release 6.3.0 and a warning will be generated when AllegroGraph starts if this directive is found in the configuration file. This directive allowed you to specify a replication jobname. Now you register a jobname with the agtool replicate command (see The agtool replicate utility and the Replication and Warm Standby document).
Examples
The transaction log archiver is configured by parameters in the <Catalog> or <RootCatalog> sections of the agraph.cfg file. (For additional information about agraph.cfg, see the Server Configuration document.)
Here are examples of configuration entries for different scenarios. The examples show these entries being added to the root catalog.
If you don't care about point-in-time recovery and just wish to keep the minimum number of transaction logs on the disk, do not specify a value for TransactionLogArchive
in any catalog specification.
If you care about point-in-time restore and you want to save all transaction logs, use the following configuration, choosing your own directory as the TransactionLogArchive
value. Here the directive is for the root catalog. A similar directive must appear in each catalog specification for all catalogs whose transaction logs you want archived.
<RootCatalog>
TransactionLogArchive /arch/root-tlogs/
....
</RootCatalog>