[Bug] Failed to load data with singlenode mode using `insert into ... select ...`
Apache Cloudberry version
No response
What happened
postgres=# CREATE TABLE t1 (c1 int) with (appendonly=true, orientation=column);
CREATE TABLE
postgres=# CREATE EXTERNAL TABLE ext_t1 (like t1)
postgres-# LOCATION ('file://hashdata/home/gpadmin/data/data/tpcds10s/t1.dat')
postgres-# FORMAT 'TEXT' (DELIMITER '|' NULL AS '' ESCAPE AS E'\\');
CREATE EXTERNAL TABLE
postgres=# insert into t1 select * from ext_t1;
ERROR: 'ON COORDINATOR' is not supported by this protocol yet
What you think should happen instead
No response
How to reproduce
postgres=# CREATE TABLE t1 (c1 int) with (appendonly=true, orientation=column);
CREATE TABLE
postgres=# CREATE EXTERNAL TABLE ext_t1 (like t1)
postgres-# LOCATION ('file://hashdata/home/gpadmin/data/data/tpcds10s/t1.dat')
postgres-# FORMAT 'TEXT' (DELIMITER '|' NULL AS '' ESCAPE AS E'\\');
CREATE EXTERNAL TABLE
postgres=# insert into t1 select * from ext_t1;
ERROR: 'ON COORDINATOR' is not supported by this protocol yet
Operating System
Linux
Anything else
No response
Are you willing to submit PR?
- [ ] Yes, I am willing to submit a PR!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct.
Hi, @zhangyue-hashdata welcome!🎊 Thanks for taking the time to point this out.🙌
postgres=# CREATE TABLE t1 (c1 int) with (appendonly=true, orientation=column); CREATE TABLE postgres=# CREATE EXTERNAL TABLE ext_t1 (like t1) postgres-# LOCATION ('file://hashdata/home/gpadmin/data/data/tpcds10s/t1.dat') postgres-# FORMAT 'TEXT' (DELIMITER '|' NULL AS '' ESCAPE AS E'\'); CREATE EXTERNAL TABLE postgres=# insert into t1 select * from ext_t1; ERROR: 'ON COORDINATOR' is not supported by this protocol yet
This is expected.
The file protocol is not supported on the master node. In a single-node deployment, CBDB operates similarly to a single master node.
Recommended Solutions:
- Use the COPY command to import files when working on the master node or in single-node mode.
- If you must use a protocol, consider implementing a custom protocol instead. Reference: contrib/extprotocol