Informix Error -573: Cannot set log to buffered in a mode ANSI database.
Cause and resolution
Cannot set log to buffered in a mode ANSI database.
This statement tries to apply BUFFERED LOG mode, but the database is ANSI compliant; that is, it was created with the clause MODE ANSI. One aspect of ANSI compliance is that all transactions are logged immediately during the execution of the COMMIT WORK statement. The use of a buffered log entails a deferred write of log records. It improves performance at some slight risk of failing to log a transaction. Such a risk is not allowed under the standard; an ANSI-compliant database must use unbuffered logging.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-573 fires when BUFFERED LOG mode is applied to a database created WITH LOG MODE ANSI — per
the official guidance, ANSI compliance requires every transaction to be logged immediately during
COMMIT WORK, while buffered logging deliberately defers the log write for performance, at a
slight risk of losing a just-committed transaction's log record. That risk isn't permitted under
the standard, so ANSI-compliant databases must use unbuffered logging.
ALTER DATABASE/administrative action attempting to switch aMODE ANSIdatabase to buffered logging, per the official guidance — the direct, only cause.- A logging-mode change applied uniformly across a set of databases (for a performance
tuning pass) without excluding the ones created with
MODE ANSI. - A misunderstanding of what ANSI compliance guarantees, expecting buffered logging's performance benefit to be available regardless of the database's ANSI mode.
Solutions / Resolution
- Don't apply buffered logging to a
MODE ANSIdatabase — per the official guidance, this is a hard requirement of ANSI compliance, not a configurable trade-off. - Use unbuffered logging on this database, accepting the immediate-log-write overhead as the cost of ANSI compliance.
- If buffered logging's performance benefit is genuinely needed, reconsider whether the database needs to be ANSI-compliant at all — a non-ANSI database can use buffered logging without restriction.
Examples
The disallowed attempt
$ onmode -A stores7_ansi -- or equivalent administrative buffered-log request
-- -573: stores7_ansi was created WITH LOG MODE ANSI
Checking a database's ANSI mode first
SELECT name, is_ansi FROM sysmaster:sysdatabases WHERE name = 'stores7_ansi';
Diagnostic Checks
- Query
sysmaster:sysdatabasesfor theis_ansistatus of the target database before attempting to change its logging to buffered.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -573 in this set yet.
A fixed ANSI-compliance requirement, not a configurable option — an ANSI-mode database must stay on unbuffered logging.