This query is not currently supported by GPDB. (dbsize.c:xxx) (entry db xxx ) (cdbdisp.c:xxx)
search cancel

This query is not currently supported by GPDB. (dbsize.c:xxx) (entry db xxx ) (cdbdisp.c:xxx)

book

Article ID: 296524

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

This issue occurs when a user tries to insert a subquery result into a table and the subquery includes a pg_relation_size() function. A sample query is shown below:

create table test2 as select pg_relation_size(ta.schemaname || '."' ||ta.tablename || '" ') from pg_tables;


Here is the explanation from the R&D team:


"On gpdb 5, 6, and master, the test will be created as distributed randomly, this is correct. The reproducer is expected to report that error as it’s inserting from entry tables to distributed tables, so an entrydb segment is created, however functions [such as] pg_relation_size_oid() and pg_relation_size_name() refuse to run on entrydb segments."



Environment

Product Version: 5.27

Resolution

We can try to workaround this issue by using the copy tool:
 

  1. Create a view for the selected query, for example, v1.
  2. Run copy: psql -c 'copy (select * from v1) to stdout' |psql -c "copy table_name from stdin"