HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Corrupt Files Handling

Availability

This feature is available since MogDB 5.0.6.

Introduction

This feature provides handling capabilities for abnormal behaviors caused by database file corruption or loss.

Benefits

Ensures MogDB's ability to continue providing service in extreme scenarios.

Description

Operating system or human factors may lead to database file corruption or loss, which can cause the following abnormal behaviors:

  • Inability to complete the checkpoint due to missing files when stopping the database, preventing the database from being stopped;
  • The checkpoint command hangs or encounters a core issue;
  • Hangs or core issues when creating a database or tablespace;
  • System functions such as pg_switch_xlog, create_physical_replication_slot_for_archive, etc., hang or encounter a core issue;
  • Page checksum corruption, and the database stops when a corrupted page is used during the restart redo or when the standby database applies the corrupted page, causing a failure to start.

This feature introduces two new GUC parameters to provide handling capabilities for the above abnormal scenarios.

The data_sync_failed_ignore parameter is used to control whether to discard items pending sync when the pagewriter's fsync fails. Setting it to 'off' allows normal stopping of the database.

The damage_page_ignore controls whether to ignore corrupted pages during redo, setting it to 'on' can force the database to start (requires setting force_promote = on).

Parameter Description

data_sync_failed_ignore

Parameter Description: Controls whether to discard items pending sync when the pagewriter's fsync fails. This parameter is of the SIGHUP type.

Value Range: Boolean

  • 'on' indicates that fsync failure will cause the database to stop.
  • 'off' indicates that fsync failure will be retried and will not cause a core, allowing normal stopping of the database.

Default Value: 'off'

damage_page_ignore

Parameter Description: Controls whether to ignore corrupted pages during redo to force the database to start. This parameter is of the SIGHUP type.

Value Range: Boolean

  • 'on' indicates that corrupted pages will be ignored, and the database will be forced to start.
  • 'off' indicates that corrupted pages will not be ignored, and the database will fail to start.

Default Value: 'off'

data_sync_failed_ignore, damage_page_ignore

Copyright © 2011-2024 www.enmotech.com All rights reserved.