You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jira Link: DB-2495
After creating a partitioned table, rows do not get persisted inside the table using the copy from command.
Eg.
// set up partition table
create table test1 (a int, b int) partition by list (a);
create table test2 (b int, a int);
alter table test1 attach partition test2 for values in (1);
// copy from
copy test1 from stdout;
>> 1 2
>> 1 3
>> 1 4
>> \.
COPY 3
// verified nothing persisted in parent nor child tables
select * from test1;
a | b
---+---
(0 rows)
select * from test2;
a | b
---+---
(0 rows)
It is confirmed this only occurs with COPY FROM command, including when input is sourced from regular file not stdin.
Explicit insertion (ie. INSERT INTO) works.
Note, this issue occurred prior to COPY FROM OOM fix (eg. #5453, #2855).
The reason why this issue has not been detected before is because there doesn't seem to be "yb" test file that explicitly verifies this use case.
Eg. yb_pg_insert.sql's donothingbrtrig_test is a partitioned table that copies from stdout.
However, it attaches row level trigger to return null and expects nothing to be persisted into the table.
As a workaround, users should try to copy directly into child/partitioned tables rather than the parent/partitioning table.
The text was updated successfully, but these errors were encountered:
yugabyte=# copy test1 from stdin with (format csv);
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself, or an EOF signal.
>> 1,2
>> 1, 3
>> 1, 4
>> \.
COPY 3
yugabyte=#
yugabyte=#
yugabyte=# select * from test1;
a | b
---+---
1 | 4
1 | 3
1 | 2
(3 rows)
yugabyte=# select * from test2;
b | a
---+---
4 | 1
3 | 1
2 | 1
(3 rows)
yugabyte=#
yugabyte=# select version();
version
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
------------------------
PostgreSQL 11.2-YB-2.15.3.0-b0 on x86_64-pc-linux-gnu, compiled by clang version 13.0.1 (/opt/yb-build/llvm/y
b-llvm-v13.0.1-yb-2-1659058819-0131d8e1-centos7-x86_64-build/src/llvm-project/clang 0131d8e1a20f72a0f374979985
db4c2871be71bc), 64-bit
(1 row)
Jira Link: DB-2495
After creating a partitioned table, rows do not get persisted inside the table using the
copy from
command.Eg.
It is confirmed this only occurs with COPY FROM command, including when input is sourced from regular file not stdin.
Explicit insertion (ie. INSERT INTO) works.
Note, this issue occurred prior to COPY FROM OOM fix (eg. #5453, #2855).
The reason why this issue has not been detected before is because there doesn't seem to be "yb" test file that explicitly verifies this use case.
Eg. yb_pg_insert.sql's
donothingbrtrig_test
is a partitioned table that copies from stdout.However, it attaches row level trigger to return null and expects nothing to be persisted into the table.
As a workaround, users should try to copy directly into child/partitioned tables rather than the parent/partitioning table.
The text was updated successfully, but these errors were encountered: