Load continuation

If you enable load continuation, the system ensures that a simple load that uses external tables continues after the system is paused and resumed. You do not have to stop and resubmit the load.

To enable load continuation, use one of the following methods:
    • Issue the nzload command with the -allowReplay n option, where n is a nonzero number. The value of n specifies the number of allowable restarts; the option sets the LOAD_REPLAY_REGION session variable to 1 and the MAX_QUERY_RESTART session variable to n. If you do not specify the -allowReplay option or the option setting is 0, the system uses the Postgres default setting.
    • Perform the following steps:
      1. Issue the nzsql command.
      2. Manually set the LOAD_REPLAY_REGION session variable to true or 1.
      3. Manually set the MAX_QUERY_RESTART session variable to a nonzero number.
      4. Load the data by using the following statement:
        insert into target select * from external table external_table using …
        If you set the session variables as described, restarts are allowed. Otherwise, the system uses the Postgres default setting.
  • Specify the -allowReplay option of the nzload command or set the LOAD_REPLAY_REGION session variable to 1 or true, the system ensures that a simple load that uses external tables continues after the system is paused and resumed. You do not have to stop and resubmit the load.

When you enable load continuation, the system holds the records to be sent to the SPU in the replay region in host memory. After the system sends the data in this region to the SPUs, it does a partial commit that forces all the unwritten data to the disks and allows the system to reuse the data buffers of the reload region. If a SPU reboots or resets, the system rolls back to the last partial commit and reprocesses and resends the data.

Important:

Setting the LOAD_REPLAY_REGION and MAX_QUERY_RESTART session variables, either indirectly by using the -allowReplay option or by setting the session variables manually, has a performance impact, which depends on the speed of the incoming data.

Load continuation cannot operate on any table that has one or more materialized views in an active state. Before enabling load continuation, suspend the associated materialized views. You can suspend active materialized views by issuing the ALTER VIEWS command. Sample syntax for the ALTER VIEWS command follows.
ALTER VIEWS ON <table> MATERIALIZE SUSPEND
After loading is completed, you can update and activate the materialized views for the table. Sample syntax follows:
ALTER VIEWS ON <table> MATERIALIZE REFRESH