BUG #14732: partitioned table cann't alter set parallel_workers?

From: digoal(at)126(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14732: partitioned table cann't alter set parallel_workers?
Date: 2017-07-04 02:09:50
Message-ID: 20170704020950.27952.77640@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14732
Logged by: Zhou Digoal
Email address: digoal(at)126(dot)com
PostgreSQL version: 10beta1
Operating system: CentOS 6.x x64
Description:

HI,

there is an normal table and a partitiond table.
normal table can set parallel_works parameter, but partitioned table
cann't.

```
postgres=# \d orders
Unlogged table "public.orders"
Column | Type | Collation | Nullable |
Default
-----------------+-----------------------+-----------+----------+--------------------------------------------
o_orderkey | bigint | | not null |
nextval('orders_o_orderkey_seq'::regclass)
o_custkey | bigint | | not null |
o_orderstatus | character(1) | | |
o_totalprice | double precision | | |
o_orderdate | date | | |
o_orderpriority | character(15) | | |
o_clerk | character(15) | | |
o_shippriority | integer | | |
o_comment | character varying(79) | | |

postgres=# \d orders1
Unlogged table "public.orders1"
Column | Type | Collation | Nullable |
Default
-----------------+-----------------------+-----------+----------+---------------------------------------------
o_orderkey | bigint | | not null |
nextval('orders1_o_orderkey_seq'::regclass)
o_custkey | bigint | | not null |
o_orderstatus | character(1) | | |
o_totalprice | double precision | | |
o_orderdate | date | | |
o_orderpriority | character(15) | | |
o_clerk | character(15) | | |
o_shippriority | integer | | |
o_comment | character varying(79) | | |
Partition key: RANGE (o_orderdate)
Number of partitions: 84 (Use \d+ to list them.)

postgres=# alter table orders set (parallel_workers =32);
ALTER TABLE
postgres=# alter table orders1 set (parallel_workers =32);
ERROR: 22023: unrecognized parameter "parallel_workers"
LOCATION: parseRelOptions, reloptions.c:1094
```

but i can update pg_class to modify partitioned table's parallel_works.

```
postgres=# update pg_class set reloptions =array['parallel_workers=13']
where relname ~ 'lineitem' and relkind='r';
UPDATE 85
Time: 11.803 ms
postgres=# explain select count(*) from lineitem1;
QUERY PLAN

-----------------------------------------------------------------------------------------------------------
Finalize Aggregate (cost=130579654.20..130579654.21 rows=1 width=8)
-> Gather (cost=130579654.16..130579654.17 rows=13 width=8)
Workers Planned: 13
-> Partial Aggregate (cost=130579654.16..130579654.17 rows=1
width=8)
-> Append (cost=0.00..130557628.94 rows=8810089 width=0)
-> Parallel Seq Scan on lineitem_ptr_0
(cost=0.00..209424.27 rows=106127 width=0)
-> Parallel Seq Scan on lineitem_ptr_1
(cost=0.00..585852.15 rows=106115 width=0)
-> Parallel Seq Scan on lineitem_ptr_2
(cost=0.00..1043031.30 rows=106130 width=0)
-> Parallel Seq Scan on lineitem_ptr_3
(cost=0.00..1419621.31 rows=106131 width=0)
...
```

best regards.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2017-07-04 03:39:35 Re: [BUGS] BUG #14699: Statement trigger and logical replication
Previous Message YUKI Hiroshi 2017-07-04 01:09:11 Re: BUG #14728: Missing "pg_config.h" in the "postgresql96-devel" package