ApsaraDB / PolarDB-for-PostgreSQL

A cloud-native database based on PostgreSQL developed by Alibaba Cloud.
https://apsaradb.github.io/PolarDB-for-PostgreSQL/zh/
Apache License 2.0
2.89k stars 480 forks source link

Errors when making installcheck in the direction of extension pg_bulkload #532

Open cquheiha opened 2 weeks ago

cquheiha commented 2 weeks ago

Describe the bug Errors when making installcheck in the direction of extension pg_bulkload

To Reproduce Steps to reproduce the behavior:

  1. Git clone "pg_bulkload" from its re repository
  2. Resolve compilation errors caused by different source code between Postgresql and PolarDB-for-PG 11 during extended installation such as: (1) Add the value of last argument of the function BasicOpenFilePerm, which is false (2) Add #include "utils/palloc.h" to bin/recovery.c to resolve problem for undefined type MemoryContext;
  3. Execute the make installcheck command in its directory
  4. Following errors happen: In the file regression.diffs, there are many errors like this:
    \! pg_bulkload -d contrib_regression data/bin1.ctl -i data/data1.bin -l results/bin1.log -P results/bin1.prs -u results/bin1.dup
    NOTICE: BULK LOAD START
    ! ERROR: query failed: ERROR:  could not open data file: No such file or directory
    ! DETAIL: query was: SELECT * FROM pgbulkload.pg_bulkload($1)
    \! awk -f data/adjust.awk results/bin1.log

    In the file bin1.log, INPUT, PARSE_BADFILE and LOGFILE are all correct:

    
    INPUT = /home/postgres/polardb_pg/contrib/pg_bulkload-3.1.20/bin/data/data1.bin
    PARSE_BADFILE = /home/postgres/polardb_pg/contrib/pg_bulkload-3.1.20/bin/results/bin1.prs
    LOGFILE = /home/postgres/polardb_pg/contrib/pg_bulkload-3.1.20/bin/results/bin1.log

The data files can be found in the above directory, but errors happend when I make installcheck.

**Environment (please complete the following information):**
 - OS: in the docker container generated by the image "registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_devel:ubuntu20.04"
 - Version: PolarDB_11_STABLE

**Additional context**
Come to help me!
polardb-bot[bot] commented 2 weeks ago

Hi @cquheiha ~ Thanks for opening this issue! 🎉

Please make sure you have provided enough information for subsequent discussion.

We will get back to you as soon as possible. ❤️