Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2KJ5-0007ls-BE for pgsql-performance@arkaria.postgresql.org; Wed, 11 Oct 2017 16:56:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e2KJ4-0004XP-Kq for pgsql-performance@arkaria.postgresql.org; Wed, 11 Oct 2017 16:56:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e2KHJ-0001HP-DV for pgsql-performance@postgresql.org; Wed, 11 Oct 2017 16:54:41 +0000 Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e2KHG-0002ZF-Vi for pgsql-performance@postgresql.org; Wed, 11 Oct 2017 16:54:39 +0000 Received: by mail-oi0-x236.google.com with SMTP id c202so3969247oih.9 for ; Wed, 11 Oct 2017 09:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1D6FKPr0Fa0zv07TfgXqMzMDdzCrCB8GTByTEF9ucps=; b=b7OLbhAm11Q7efB1ZmLDlv9U8t5+CBkVT4vVoBpVXul9kfQP6hHbbKG/ZNaTSGcTdf Jfc+Z77X1JTjt1AXNDCd7YwFu3fyFXBWt4Li1cf/7ZZds2h06CFf8NNzWazhuVa2QU5L h20PIwQA843N9nxBWhi+mBparL5ZtE4OImJkOySn1pCcb1D6XpJjNGZXJ7HlJuHbLKFh LM4tecR3klzCdx2mXpjotQC7blh5lKUruDOv6D/gZGcMnMvQ2+TwtWIcdNJUX7+2y2Ue VYOqiSOYSqYwTg5l18gRIK9Z132TFUuvXWg30FKV/e9GFQ8yA2inkr+Ivgo/2zBoNg4y U+tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1D6FKPr0Fa0zv07TfgXqMzMDdzCrCB8GTByTEF9ucps=; b=gse65oZL7/pcCgpFen/oHRW1oFDYetKxnlleE8WAsI1yaAUgDERos+BdPx6V4ip7wq 7jNdbzWi438K6xsSLbb7fRU72sDiERMF7OclXBZnVKO1Y2eAqmmICZZBTATInsHAx40t G61zFJ6Sy1pP0BdawREzCGB0Y5YHLbvx9okXL9iJyszXVrYPDamZCHwzQxbspoR9E3// lYj4mwVgxUdZcRLk/FdweOOuHTO+X8L1TbYZfUkYvGOiQJ7DQqbcSFJbwi3UMTUQfAZo IGGSvmYthC8NQo7Qp33XxWRoCru2lK/s7jzZFgBf2kCe9NI7J9AN38il54Qkl3KY1SxD TupA== X-Gm-Message-State: AMCzsaW8GEXkyojwQiwWbC+vq1bXonocCzclvmB2qPjibcCGHOpuoksm KwAHehaOXJK20yHCDBbo2x0IjU2WwfW3b4ud65SJgTLI X-Google-Smtp-Source: AOwi7QBsfzkmHwhuRYdQnXDounMYElm7i6IWzm1OOXD8a2+O9w2cr5NWl++IKx9euXsQEUZP3gSk6jjjkQeqmJuaDQY= X-Received: by 10.157.43.132 with SMTP id u4mr128382ota.17.1507740878263; Wed, 11 Oct 2017 09:54:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.6.162 with HTTP; Wed, 11 Oct 2017 09:54:37 -0700 (PDT) In-Reply-To: References: <1507042486.2998.1.camel@cybertec.at> From: Adam Brusselback Date: Wed, 11 Oct 2017 12:54:37 -0400 Message-ID: Subject: Re: Stored Procedure Performance To: Purav Chovatia Cc: Pavel Stehule , Laurenz Albe , "pgsql-performance@postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org > Yes, there is some code to catch exceptions like unique constraint violation and no data found. Do you suggest we trying by commenting that part? That is likely it. Comment that out and test. If you still need to handle a unique violation, see if you can instead use the ON CONFLICT clause on the INSERT. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance