ALTER TABLE RESUME WAL
Restarts transactions of a WAL table after recovery from errors.
Syntax#
Description#
sequencerTxn is the unique txn identification that the Sequencer issues to
transactions.
When sequencerTxn is not specified, the operation resumes the WAL apply job
from the next uncommitted transaction, including the failed one.
When sequencerTxn is not specified, the operation resumes the WAL apply job
from the provided sequencerTxn number explicitly.
ALTER TABLE RESUME WAL is used to restart WAL table transactions after
resolving errors. When transactions are stopped, the suspended status from the
wal_tables() function is marked as
true, and the sequencerTxn value indicates the last successful commit in the
Sequencer. Once the error is resolved, ALTER TABLE RESUME WAL restarts the
suspended WAL transactions from the failed transaction. Alternatively, an
optional sequencerTxn value can be provided to skip the failed transaction.
Examples#
Using the wal_tables() function to
investigate the table status:
| name | suspended | writerTxn | sequencerTxn |
|---|---|---|---|
| sensor_wal | false | 6 | 6 |
| weather_wal | true | 3 | 5 |
The table weather_wal is suspended. The last successful commit in the
table is 3.
The following query restarts transactions from the failed transaction, 4:
Alternatively, specifying the sequencerTxn to skip the failed commit (4 in
this case):