Re: deadlock on declarative partitioned table (11.3)

2019-09-17 Thread Kevin Wilkinson
disregard. problem found. i was locking the wrong table. On 9/16/2019 11:10 AM, Kevin Wilkinson wrote: on linux, pg11.3, i have a (declarative) partitioned table with a deadlock that i do not understand. one process does a copy to the partitioned table. another process is executing a jdbc

deadlock on declarative partitioned table (11.3)

2019-09-16 Thread Kevin Wilkinson
on linux, pg11.3, i have a (declarative) partitioned table with a deadlock that i do not understand. one process does a copy to the partitioned table. another process is executing a jdbc batch of commands to "atomically" replace one of the table partitions. it has the following commands (autoco

Re: Storage Inefficiency In PostgreSQL

2019-04-16 Thread Kevin Wilkinson
we were able to use a brin index for our time-series data and that saved a lot of space. basically, we used a btree for recent data and, once the data was "stable", reclustered the data to get high correlation on the brin index, created a brin index and dropped the btree. it works well. On 4/1

Re: 10.2: high cpu usage on update statement

2019-04-08 Thread Kevin Wilkinson
for updating a single row. kevin On 4/7/2019 11:41 PM, Laurenz Albe wrote: Kevin Wilkinson wrote: on 10.2, we're seeing very high cpu usage when doing an update statement on a relatively small table (1GB). one of the updated columns is text, about 1k bytes. there are four threads doing si

10.2: high cpu usage on update statement

2019-04-05 Thread Kevin Wilkinson
on 10.2, we're seeing very high cpu usage when doing an update statement on a relatively small table (1GB). one of the updated columns is text, about 1k bytes. there are four threads doing similar updates concurrently to the same table (but different rows). each thread does an update about ever

how best to specify table constraints with "create table as "

2019-03-01 Thread Kevin Wilkinson
i want to recluster an immutable table without locking the table and then add the table as a partition of a parent table. my plan was: create table tbl_cpy as select * from tbl order by c1 asc; alter table tbl_cpy add constraint c1 not null, c1>=lo c1i want this to run quickly. so, i popul

Re: Methods to quickly spin up copies of an existing databases

2019-03-01 Thread Kevin Wilkinson
if you are able/willing to use ZFS (rather than ext4, xfs, ...) to store your database, then it might work for you. ZFS is copy-on-write so it can very quickly clone a database. kevin On 3/1/2019 12:08 PM, Arjun Ranade wrote: I'm working on a project that requires on-demand creation of a fresh

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