citusdata / citusdata/citus

Unexpected wrong inserts into the user type

Open
#2,134 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

```
First show that in the pure PostgreSQL all fine.
=> create type b as (x int,y int);
CREATE TYPE
=> create table a (a int,b b);
CREATE TABLE
=> insert into a (a,b.x,b.y) values (0,0,0);
INSERT 0 1
=> select * from a;
a | b
---+-------
0 | (0,0)
(1 row)

Now create type on the work nodes.
=> \c - - - 9701
*****
=> create type b as (x int,y int);
CREATE TYPE
=> \c - - - 9702
*****
=> create type b as (x int,y int);
CREATE TYPE

Return to the coordinator and distrib table
=> \c - - - 9700
*****
=> select create_distributed_table('a','a');
NOTICE: Copying data from local table...
create_distributed_table
--------------------------

(1 row)
=> insert into a (a,b.x,b.y) values (1,1,1);
INSERT 0 1
=> select * from a;
a | b
---+-------
0 | (0,0)
1 | (1,)
(2 rows)
```
As you can see problem is only on inserting in the distributed table. And easy reapitable.
Ubuntu 17.10
$ dpkg -s postgresql-10|grep Version
Version: 10.1-1.pgdg17.04+1
$ dpkg -s postgresql-10-citus-7.3|grep Version
Version: 7.3.0.citus-1

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the SQL sequence in the issue with PostgreSQL 10.1 and Citus 7.3.0, comparing the coordinator and worker type definitions and the distributed-table insert. Done means inserting into the distributed table preserves both fields of the composite value, matching the local PostgreSQL result.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.