Menu

#239 prepared insert on round robin table

Development Queue
open
nobody
4
2013-06-12
2011-11-16
No

When determining a node for a round robin table the same node is always targeted in the case of a prepared insert.
The node targeted is determined at prepare state and not changed after.

postgres=# create table aa (a int) distribute by round robin;
CREATE TABLE
postgres=# prepare aa as insert into aa values ($1);
PREPARE
postgres=# execute aa (1);
INSERT 0 1
postgres=# execute aa (2);
INSERT 0 1
postgres=# execute aa (3);
INSERT 0 1
postgres=# execute aa (4);
INSERT 0 1
postgres=# execute direct on node dn1 'select * from aa';
a
---
(0 rows)
postgres=# execute direct on node dn2 'select * from aa';
a
---
1
2
3
4
(4 rows)

Discussion

  • Abbas Butt

    Abbas Butt - 2012-03-10
    • milestone: --> 2663488
     
  • Koichi Suzuki

    Koichi Suzuki - 2012-03-12
    • milestone: 2663488 --> 2663467
     
  • Koichi Suzuki

    Koichi Suzuki - 2012-06-03
    • labels: 2091149 --> Database Server
    • assigned_to: nobody --> michaelpq
     
  • Koichi Suzuki

    Koichi Suzuki - 2012-09-12

    Q3
    Lack a mechanism to determin the target datanode in executor.
    On the other hand, in the sense that we cannot predict where each row goes, it is a kind of what users should expect and it does not break any data consistency. On the other hand, JDBC is based upon prepared statement and this behavior is not good.
    To reduce the whole effort, it is related to executor code cleanup. Issue is which should be done first, fix or cleanup?

     
  • Koichi Suzuki

    Koichi Suzuki - 2012-09-12
    • priority: 5 --> 4
     
  • Koichi Suzuki

    Koichi Suzuki - 2013-03-12
    • assigned_to: michaelpq --> nobody
    • milestone: 2663467 --> 5139567
     
  • Koichi Suzuki

    Koichi Suzuki - 2013-06-12
    • milestone: 5139567 --> Development Queue
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.