pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: weiboyiyou@163.com
Subject: BUG #15093: hash partition  exector plan is error!!!!
Date: Tue, 27 Feb 2018 08:38:52 +0000
Message-ID: <151972073247.21251.16067714732326421096@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15093
Logged by:          jiang fei
Email address:      weiboyiyou@163.com
PostgreSQL version: Unsupported/Unknown
Operating system:   CentOS release 6.8
Description:        

I create a table like this:
test=# \d+ orders
                                   Table "public.orders"
  Column  |  Type  | Collation | Nullable | Default | Storage  | Stats
target | Description 
----------+--------+-----------+----------+---------+----------+--------------+-------------
 order_id | bigint |           | not null |         | plain    |            
 | 
 cust_id  | bigint |           | not null |         | plain    |            
 | 
 status   | text   |           |          |         | extended |            
 | 
Partition key: HASH (order_id)
Partitions: orders_p1 FOR VALUES WITH (modulus 4, remainder 0),
            orders_p2 FOR VALUES WITH (modulus 4, remainder 1),
            orders_p3 FOR VALUES WITH (modulus 4, remainder 2),
            orders_p4 FOR VALUES WITH (modulus 4, remainder 3)


but the exector plan is:
test=# explain select * from orders where order_id = 1;
                           QUERY PLAN                            
-----------------------------------------------------------------
 Append  (cost=0.00..93.60 rows=20 width=48)
   ->  Seq Scan on orders_p1  (cost=0.00..23.38 rows=5 width=48)
         Filter: (order_id = 1)
   ->  Seq Scan on orders_p2  (cost=0.00..23.38 rows=5 width=48)
         Filter: (order_id = 1)
   ->  Seq Scan on orders_p3  (cost=0.00..23.38 rows=5 width=48)
         Filter: (order_id = 1)
   ->  Seq Scan on orders_p4  (cost=0.00..23.38 rows=5 width=48)
         Filter: (order_id = 1)





view thread (2+ messages)  latest in thread

Message-ID: <151972073247.21251.16067714732326421096@wrigleys.postgresql.org>
Permalink:  ../151972073247.21251.16067714732326421096@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/151972073247.21251.16067714732326421096@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, weiboyiyou@163.com
  Subject: Re: BUG #15093: hash partition  exector plan is error!!!!
  In-Reply-To: <151972073247.21251.16067714732326421096@wrigleys.postgresql.org>
  References: <151972073247.21251.16067714732326421096@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox