Updated on 2024-05-07 GMT+08:00

Data Import and Export

This section describes the parameters for importing and exporting data.

raise_errors_if_no_files

Parameter description: Specifies whether to distinguish between the problems "the number of imported file records is empty" and "the imported file does not exist". If this parameter is set to TRUE and the problem "the imported file does not exist" occurs, GaussDB will report the error message "file does not exist".

This parameter is a SUSET parameter. Set it based on instructions provided in Table 1.

Value range: Boolean

  • on indicates that the messages of "the number of imported file records is empty" and "the imported file does not exist" are distinguished when files are imported.
  • off indicates that the messages of "the number of imported file records is empty" and "the imported file does not exist" are the same when files are imported.

Default value: off

partition_mem_batch

Parameter description: In order to optimize the inserting of column-store partitioned tables in batches, the data is buffered during the inserting process and then written in the disk. You can specify the number of caches through partition_mem_batch. If the value is too large, much memory will be consumed. If it is too small, the performance of inserting column-store partitioned tables in batches will deteriorate.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: 1 to 65535

Default value: 256

partition_max_cache_size

Parameter description: In order to optimize the inserting of column-store partitioned tables in batches, the data is buffered during the inserting process and then written in the disk. You can specify the data buffer cache size through partition_max_cache_size. If the value is too large, much memory will be consumed. If it is too small, the performance of inserting column-store partitioned tables in batches will deteriorate.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range:

4096 to INT_MAX/2. The unit is KB.

Default value: 2 GB

enable_delta_store

Parameter description: Specifies whether to enable delta tables for column-store tables. Delta tables will improve the performance of importing a single piece of data to a column-store table and prevent table bloating. When this parameter is enabled, data is imported to a column-store table, the delta table or the primary table CU, depending on the value of DELTAROW_THRESHOLD in section "SQL Reference > SQL Syntax > CREATE TABLE" in Developer Guide. When the data volume is less than the value of DELTAROW_THRESHOLD, the data is stored in the delta table.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Value range:

  • on indicates that delta tables are enabled.
  • off indicates that delta tables are disabled.

Default value: off

safe_data_path

Parameter description: Specifies the path prefix restriction except for the initial user. Currently, the path prefix restriction applies to the COPY operation and advanced packages.

This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: a string of up to 4096 characters

Default value: NULL

  • If a soft link file exists in the safe_data_path directory, the system processes the file based on the actual file path to which the soft link points. If the actual path is not in the safe_data_path directory, an error is reported.
  • If a hard link file exists in the safe_data_path directory, it can be used properly. For security purposes, exercise caution when using hard link files. Do not create hard link files that point to other directories in the safe_data_path directory. Ensure that the permission on the safe_data_path directory is minimized.

enable_copy_server_files

Parameter description: Specifies whether to enable the permission to copy server files.

This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: Boolean

  • on indicates that the permission to copy server files is enabled.
  • off indicates that the permission to copy server files is disabled.

Default value: off

When the enable_copy_server_files parameter is disabled, only the initial user is allowed to run the COPY FROM FILENAME or COPY TO FILENAME statement. When the enable_copy_server_files parameter is enabled, users with the SYSADMIN permission or users who inherit the gs_role_copy_files permission of the built-in role are allowed to run the COPY FROM FILENAME or COPY TO FILENAME statement.