Updated on 2025-05-29 GMT+08:00

Typical Scenarios

Preparations

During import or export using COPY, the database requires file read/write permissions on the server. To grant these permissions, enable the GUC parameter enable_copy_server_files.

gs_guc reload -I all -N all -Z datanode -c "enable_copy_server_files=on"
  • Parameters in the COPY command must match the actual data in files, including the format, delimiter, newline character, and character set.
  • If the specified client-side encoding matches the server-side encoding, the COPY command preserves the binary form of data during import and export, preventing any structural damage that may result from transcoding. This mechanism guarantees the integrity and originality of data migration, making it suitable for scenarios that demand absolute fidelity.