Re: atomically replace partition of range partitioned table

2019-02-25 Thread David Rowley
On Tue, 26 Feb 2019 at 12:03, Kevin Wilkinson wrote: > 1. create a new partition table by copying the old partition table, > ordered by index key. both tables will have the same partition key range. > 2. create a brin index on the new table. > 3. detach the old partition table from the parent and

atomically replace partition of range partitioned table

2019-02-25 Thread Kevin Wilkinson
i have a range partitioned table with a brin index that i am using for "Internet-of-Things" kind of data (essentially timeseries data about some entities). the partition key is a timestamp. data is only loaded to the "current" partition and data is never modified. older partitions are static. t