Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOMxi-0001wG-8D for pgsql-performance@arkaria.postgresql.org; Mon, 11 Dec 2017 12:13:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOMxh-0005G9-RT for pgsql-performance@arkaria.postgresql.org; Mon, 11 Dec 2017 12:13:33 +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 1eOMxh-0005Fw-HX for pgsql-performance@lists.postgresql.org; Mon, 11 Dec 2017 12:13:33 +0000 Received: from mail-wr0-f193.google.com ([209.85.128.193]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eOMxc-0003Dr-OM for pgsql-performance@lists.postgresql.org; Mon, 11 Dec 2017 12:13:31 +0000 Received: by mail-wr0-f193.google.com with SMTP id z18so17334348wrb.8 for ; Mon, 11 Dec 2017 04:13:27 -0800 (PST) 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:mime-version:content-transfer-encoding; bh=k7+XLaB0wHqj0QlH4ndlw8sgbNgolHpi1k9xpUndfP4=; b=VxrljIQoQCLE+5ILjhHB4dN1R9Hs2MGGhixDZwFci3CNHt91UwbO4O9tcn1tL3W0wo AyGrgLt0QvufN7/sHuxfTDeXiJg5iC3Siscvwf6ERv2U0j5y9Cc1p1uKU8DK0VuZA58p zuwyMVCBn5chelmasUB/Sw2h/9xHoEP7wirrDZXeZjzYBJe1gls1IenVohgbDfiRMFOF AF/ptcg4qZcbjhSEPGsgoh21xBnAlyj1lJKlzIuXMPmWgV/gJx7vDAKjTVfizVTTiv7N zhqlJXF1ms8hy0cxckOVpwaWBZbyhfAW91IulCMM8bT/eWkJBJhuqF1sN9FCx32Rrk/t bIeA== X-Gm-Message-State: AKGB3mJTRYUK1zbedaBMi/6Ef6NrC4PaMLnVLRftitbAZPoRy5gVMiY2 rn4OdjhL8wMvDJWPZLTHlRztsJItUJk= X-Google-Smtp-Source: ACJfBotDzZSE4VOGjM7MXUg0Hq3i7I419B4v6zh4NH0I2JbayyHc7t2+c6QqEzaLxrSoCgMy2e6MLw== X-Received: by 10.223.134.116 with SMTP id 49mr189668wrw.85.1512994406440; Mon, 11 Dec 2017 04:13:26 -0800 (PST) Received: from f26lite (cpc115198-nmal23-2-0-cust249.19-2.cable.virginm.net. [81.97.152.250]) by smtp.gmail.com with ESMTPSA id v47sm16253488wrc.13.2017.12.11.04.13.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2017 04:13:25 -0800 (PST) Message-ID: <1512994403.12727.23.camel@redhat.com> Subject: Re: Prepared Transactions From: jwhiting@redhat.com To: Riaan Stander Cc: pgsql-performance@lists.postgresql.org, Sergei Kornilov Date: Mon, 11 Dec 2017 12:13:23 +0000 In-Reply-To: <96631512980099@web21g.yandex.ru> References: <160430354e0.27df.e05fafc80f8daf1488764675043d44fb@exa.co.za> <96631512980099@web21g.yandex.ru> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Riaan, You benefit from greater fault tolerance performance. Recovering from a crash/network outage is quicker/easier. On the downside you might see a reduction in transactions per second. It's worth benchmarking. To see if the impact to tps is acceptable to live with. Jeremy On Mon, 2017-12-11 at 11:14 +0300, Sergei Kornilov wrote: > Hello! > > You need prepared transactions only if you need two-phase commit to > provide distributed atomic transaction on multiple different > databases. > If you not need distributed transactions - you not needed prepared > transactions at all. > But if you need distributed transactions - here is no more choice > regardless performance questions. > > As say in documentation https://www.postgresql.org/docs/current/stati > c/sql-prepare-transaction.html > > Unless you're writing a transaction manager, you probably shouldn't > > be using PREPARE TRANSACTION. > > Regards, Sergei >