Re: SubtransControlLock and performance problems

2020-02-17 Thread Laurenz Albe
On Mon, 2020-02-17 at 15:03 +, Lars Aksel Opsahl wrote: > I have tested in branch ( > https://github.com/larsop/resolve-overlap-and-gap/tree/add_postgis_topology_using_func) > where I use only have functions and no procedures and I still have the same > problem with subtransaction locks. >

Re: SubtransControlLock and performance problems

2020-02-17 Thread Lars Aksel Opsahl
>From: Laurenz Albe >Sent: Monday, February 17, 2020 10:53 AM >To: Lars Aksel Opsahl ; >pgsql-performance@lists.postgresql.org >Subject: Re: SubtransControlLock and performance problems > >Lars Aksel Opsahl wrote: >> What happens is that after some minutes the CPU can fall to maybe 20%

Re: SubtransControlLock and performance problems

2020-02-17 Thread Pavel Stehule
Hi po 17. 2. 2020 v 17:36 odesílatel Laurenz Albe napsal: > On Mon, 2020-02-17 at 15:03 +, Lars Aksel Opsahl wrote: > > I have tested in branch ( > https://github.com/larsop/resolve-overlap-and-gap/tree/add_postgis_topology_using_func > ) > > where I use only have functions and no

Re: SubtransControlLock and performance problems

2020-02-17 Thread Alvaro Herrera
On 2020-Feb-16, Lars Aksel Opsahl wrote: > On a server with 32 cores and 250 GB memory, with CentOS 7 and kernel > 4.4.214-1.el7.elrepo.x86_64, I try to run 30 parallel threads using > dblink. (https://github.com/larsop/postgres_execute_parallel) . I have > tried to disconnect and reconnect in

Re: SubtransControlLock and performance problems

2020-02-17 Thread Tom Lane
Pavel Stehule writes: > po 17. 2. 2020 v 17:36 odesílatel Laurenz Albe > napsal: >> Either use shorter transactions, or start fewer subtransactions. > it is interesting topic, but I don't see it in my example > CREATE OR REPLACE FUNCTION public.fx(integer) > RETURNS void > LANGUAGE plpgsql >

Re: SubtransControlLock and performance problems

2020-02-17 Thread Pavel Stehule
po 17. 2. 2020 v 19:23 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > po 17. 2. 2020 v 17:36 odesílatel Laurenz Albe > > > napsal: > >> Either use shorter transactions, or start fewer subtransactions. > > > it is interesting topic, but I don't see it in my example > > > CREATE OR

Re: SubtransControlLock and performance problems

2020-02-17 Thread Laurenz Albe
Lars Aksel Opsahl wrote: > What happens is that after some minutes the CPU can fall to maybe 20% usage > and most of > the threads are blocked by SubtransControlLock, and when the number > SubtransControlLock > goes down the CPU load increases again. The jobs usually goes through without > any