Archive Logging Options

3. Archive Logging Options

archive_dir (text)

This indicates in what directory sync archive files should be stored.

command_on_logarchive (text)

This indicates a Unix command to be submitted each time an archive log is successfully generated.

The command will be passed one parameter, namely the full pathname of the archive file. Thus, supposing we have the settings...

command_on_logarchive = /usr/local/bin/logstuff

archive_dir = /var/log/slony1/archivelogs/payroll

A typical log file might be named something like /var/log/slony1/archivelogs/payroll/slony1_log_1_00000000000000000036.sql

The command run after that SYNC was generated would be:

/usr/local/bin/logstuff /var/log/slony1/archivelogs/payroll/slony1_log_1_00000000000000000036.sql


Note that this is run via system(const char *COMMAND); if the program that is run takes five minutes to run, that will defer the next SYNC by five minutes. You probably don't want the archiving command to do much "in-line" work.