update gp by duck:ERROR: multiple updates to a row by the same query is not allowed
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing the two UPDATE statements with the reported DuckDB 0.10.1, Greenplum 6.12, and Python client setup. Inspect the PL/Python function p_rst_ra_skc_org_detail at lines 2743 and 19, where exesql executes the generated SQL, and compare why the temporary DuckDB table produces duplicate matches while the Greenplum table does not. Done means the cause and a verified resolution are documented.
Written by the indexing model from the issue text.
Description
my sql:
update gp.tenant_peacebird_biz.rst_ra_sku_org_detail a
set compute_status='0'
from tmp_distinct_order_id b
where a.skc_order_id=b.skc_order_id
and a.day_date = '2024-04-29' and a.is_deleted = '0';
raise error:
ERROR: duckdb.duckdb.Error: Failed to execute query "UPDATE "tenant_peacebird_biz"."rst_ra_sku_org_detail"
SET "compute_status" = "update_data_63f7bf5c-4235-4a4b-8c40-ddbdf9382dfa"."compute_status" FROM "update_data_63f7bf5c-4235-4a4b-8c40-ddbdf9382dfa" WHERE "rst_ra_sku_org_detail".ctid=__page_id_string::TID":
ERROR: multiple updates to a row by the same query is not allowed (seg0 172.18.10.106:33000 pid=61539) (plpy_elog.c:121)
在位置:Traceback (most recent call last):
PL/Python function "p_rst_ra_skc_org_detail", line 2743, in <module>
exesql(sql)
PL/Python function "p_rst_ra_skc_org_detail", line 19, in exesql
dd.execute(sql)
PL/Python function "p_rst_ra_skc_org_detail"
If I write the duck table into gp,and then run sql, it's OK:
update tenant_peacebird_biz.rst_ra_sku_org_detail a
set compute_status='0'
from tenant_peacebird_biz.tmp_id b
where a.skc_order_id=b.skc_order_id
and a.day_date = '2024-04-29' and a.is_deleted = '0';
why?
and how to resolve?
OS:
Centos7
Greenplum Version:
6.12 (pg:9.4)
DuckDB Version:
0.10.1
DuckDB Client:
python
- Dominant language
- C++
- Stars
- 372
- Forks
- 107
- Avg merge
- 13h 55m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from duckdb/duckdb-postgres
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#575 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
duckdb/duckdb-postgres#564 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
duckdb/duckdb-postgres#491 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#487 · 1 comment ·
Maintainers usually reply within 1 day
-
After `COPY DATABASE FROM <pg>`, the types from pg are improperly formatted in `EXPORT` commandsOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-postgres#429 ·
Maintainers usually reply within 1 day
All issues in duckdb/duckdb-postgres
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CleverRaven/Cataclysm-DDA#88974 ·
Maintainers usually reply within 1 day
-
comp-mysql
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ClickHouse/ClickHouse#124749 ·
Maintainers usually reply within 1 day
-
Status: Needs confirmation Status: Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day