[Bug] Cross-partition UPDATE into a foreign partition silently loses rows

Abierto
#2,235 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c, postgresql, sql
Área
databases

Línea de trabajo

Start by tracing partition row movement through the UPDATE executor and the postgres_fdw foreign-partition write path; the reproduction uses batch_size '10' and moves 25 rows from local partition p1 to foreign partition p2. Check the existing tests for partition updates with foreign tables, then add a regression case showing all 25 rows reach p2 after the update.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

type: Bug
Apache Cloudberry version

No response

What happened

An UPDATE that moves rows from a local partition to a postgres_fdw foreign partition commits, but the rows are deleted from the local partition and never reach the foreign table.

What you think should happen instead

No response

How to reproduce
-- in database fdwr
CREATE TABLE r2 (a int, b int) DISTRIBUTED BY (b);

-- in another database
CREATE EXTENSION postgres_fdw;
CREATE SERVER s FOREIGN DATA WRAPPER postgres_fdw
    OPTIONS (host '/tmp', port '7000', dbname 'fdwr', batch_size '10');
CREATE USER MAPPING FOR current_user SERVER s;
CREATE TABLE part (a int, b int) PARTITION BY LIST (a) DISTRIBUTED BY (b);
CREATE TABLE p1 PARTITION OF part FOR VALUES IN (1);
CREATE FOREIGN TABLE p2 PARTITION OF part FOR VALUES IN (2)
    SERVER s OPTIONS (table_name 'r2');
INSERT INTO part SELECT 1, i FROM generate_series(1, 25) i;
UPDATE part SET a = 2 WHERE a = 1;
SELECT count(*) FROM p1;  -- 0
SELECT count(*) FROM p2;  -- 0, expected 25
Operating System

ubuntu24

Anything else

No response

Are you willing to submit PR?
  • Yes, I am willing to submit a PR!
Code of Conduct
Lenguaje dominante
C
Estrellas
1.4k
Forks
265
Merge medio
3 d 22 h
PR fusionados (30 d)
82

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/cloudberry

Todos los issues de apache/cloudberry

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.