Re: immutable function querying table for partitioning

2021-06-15 Thread Vijaykumar Jain
On Tue, 15 Jun 2021 at 18:21, David G. Johnston wrote: > You probably avoid the complications by doing the above, but the amount of bloat you are causing seems excessive. > > I’d suggest an approach where you use the table data to build DDL in a form that does adhere to the limitations described

Re: immutable function querying table for partitioning

2021-06-15 Thread David G. Johnston
On Tuesday, June 15, 2021, Vijaykumar Jain wrote: > > > --- now since the lookup table is update, a noop update would get new > shards for ids and rebalance them accordingly. > > test=# update t set id = id ; > UPDATE 25 > You probably avoid the complications by doing the above, but the amount o

immutable function querying table for partitioning

2021-06-15 Thread Vijaykumar Jain
hi, I was playing around with a setup of having a lookup table for partitioning. Basically, I wanted to be able to rebalance partitions based on my lookup table. -- create a lookup and assign shard nos to ids test=# create table pt(id int, sh int); CREATE TABLE test=# insert into pt select x, 1