postgres_scanner icon indicating copy to clipboard operation
postgres_scanner copied to clipboard

ERROR: deletes on append-only tables are not supported in serializable transactions

Open wonb168 opened this issue 1 year ago • 0 comments

What happens?

ERROR: deletes on append-only tables are not supported in serializable transactions

To Reproduce

I am computing in DuckDB and then writing the results back to Greenplum. Before writing, I need to delete existing data, but I tried two methods:

delete from gp.dm.fct_sale_stockorg_kpi 
where day_date > ('2024-07-04'::timestamp - '40 day'::interval) and day_date <= ('2024-07-04'::timestamp)

method2:

call postgres_execute('gp',$gp$
delete from dm.fct_sale_stockorg_kpi 
where day_date > ('2024-07-04'::timestamp - '40 day'::interval) and day_date <= ('2024-07-04'::timestamp)
$gp$)

the first method is very slow, and the second method gives an error as described in the title. why?

OS:

centos7

PostgreSQL Version:

gp7.1(pg12.12)

DuckDB Version:

1.0.0

DuckDB Client:

python3.9

Full Name:

wang cz

Affiliation:

Linezone

Have you tried this on the latest main branch?

  • [X] I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • [X] I agree

wonb168 avatar Jul 03 '24 06:07 wonb168