Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j46ej-0002iJ-GH for pgsql-performance@arkaria.postgresql.org; Tue, 18 Feb 2020 17:27:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j46eg-0004uL-Kt for pgsql-performance@arkaria.postgresql.org; Tue, 18 Feb 2020 17:27:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j46eg-0004uD-49 for pgsql-performance@lists.postgresql.org; Tue, 18 Feb 2020 17:27:30 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j46ed-0002Gd-B3 for pgsql-performance@lists.postgresql.org; Tue, 18 Feb 2020 17:27:29 +0000 Received: by mail-wr1-x443.google.com with SMTP id r11so24910062wrq.10 for ; Tue, 18 Feb 2020 09:27:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=nW6ToaI/UU9kBGaY0PWJnJpPGmylS+uHm3FpE7yy+WE=; b=d1vylKb59W0rKfK0dYdL7Vo0q/alPMT/rPYEo86Vp8mYJZiglQROz2cVyasywhjTje F7Z3DzapNXBNfIfKC6uZkO42Yms2ib08K3/WNaN2jLSviLHZPcuJc75YRvXqhWlj7FeW dkg4O1//7KvZqbMSiRLTShSsxPNtqkY9JwCyUqnOzD5O7ewRxR2aD1oykCOwi5+oh67H v4Je58Hc201/Jfq/kq6sS9z7QSh680AFrRtpiTaAe3UVuaKUbBuiqX2xnDViTKecGvbR 3EMRmX/tnLKkQhKXZksH9w7WN9Hrqkb9JFF71ujYi+zXLzER7ibnzFsXgFhU2ZeZqChC bObQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=nW6ToaI/UU9kBGaY0PWJnJpPGmylS+uHm3FpE7yy+WE=; b=PlFQiTwizJsLDqGSAQPfmjhCeqpxibD4JJDI1A+0xHlRliIRDU2ysbA2T8tJdwaTyu sKMWVXjibyOdOndIb4hceeQMdi54tHG+e71F5sx5U2AdfnRaR2OoDcbg8TnHng5asLuo oXbSWueYwz1O0aqBf0BSbdPPIf2KhVJVJowoIBasVUD2R8vcCM1penE4cRcmcTc3wXLX On2Gm/JIYZvh/XT+BF7sm2h28lrMtld6TZFw+cgMbPD5nZjQj6DLcxhUvUnel9WwZZ89 lF5QmdExBkPL4vfTWLkhB+gvtUBfrf+UA17gCJ7r1cJmn6u7sdzxnNRwwIBk/sw6X5uj pWSQ== X-Gm-Message-State: APjAAAVX/4SBhSf4ZqRPMJZWBqdJJj20mVZ5tCZRjjDBH/p6AJT34I7g s9wB0YoySqEke+FpfH0Ewn1j8A== X-Google-Smtp-Source: APXvYqzLb2d6vLolmjQr/xXWRjKxGMqrfrCmgC8JdLVLkQgHqsshiMXdg8bFr8RR95c/cJxrC4lRPQ== X-Received: by 2002:a5d:62c8:: with SMTP id o8mr29599750wrv.316.1582046845448; Tue, 18 Feb 2020 09:27:25 -0800 (PST) Received: from localhost.localdomain (217-149-168-77.nat.highway.telekom.at. [217.149.168.77]) by smtp.gmail.com with ESMTPSA id a6sm6995520wrm.69.2020.02.18.09.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 09:27:24 -0800 (PST) Message-ID: Subject: Re: SubtransControlLock and performance problems From: Laurenz Albe To: Pavel Stehule , Tom Lane Cc: Lars Aksel Opsahl , "pgsql-performance@lists.postgresql.org" Date: Tue, 18 Feb 2020 18:27:24 +0100 In-Reply-To: References: <61eeb178848bdc2e0dd6c81ce94f3ace7c1348ff.camel@cybertec.at> <9908.1581963796@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2020-02-17 at 19:41 +0100, Pavel Stehule wrote: > I tested > > CREATE OR REPLACE FUNCTION public.fx(integer) > RETURNS void > LANGUAGE plpgsql > AS $function$ > begin > for i in 1..$1 loop > begin > insert into foo values(i); > exception when others then > raise notice 'yyy'; > end; > end loop; > end; > $function$ > > and I don't see any significant difference between numbers less than 64 and higher Did you have several concurrent sessions accessing the rows that others created? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com