Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWiKS-0002Oz-Q2 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jan 2017 11:35:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cWiKS-0006cq-3x for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jan 2017 11:35:00 +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 1cWiKR-0006cj-55 for pgsql-hackers@postgresql.org; Thu, 26 Jan 2017 11:34:59 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWiKJ-0007TL-62 for pgsql-hackers@postgresql.org; Thu, 26 Jan 2017 11:34:57 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 8B4B121C2A3C; Thu, 26 Jan 2017 14:34:48 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1485430488; bh=vFpx7EQU6WYqTz2GPdNFzPonzb4qdGuOZSqIFSYJB2w=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=aMVfMF+wmXs1QD7QbdZ3VTuX4z3Wjw/sBox7Q88JgIStUtkCcRUv5u4o2LE7rZ3cZ GK80re+9ht/t3m1MXPjImMLFCF3EVQ3gmY0yk6nO4mP1IOAKPV+3QO/g5dCdNvCijF 6BgogOnqfElyOOpOuQxg0D5EhM9PvFcwJWJwJUuk= Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: logical decoding of two-phase transactions From: Stas Kelvich In-Reply-To: Date: Thu, 26 Jan 2017 14:34:47 +0300 Cc: PostgreSQL Hackers , Simon Riggs Content-Transfer-Encoding: quoted-printable Message-Id: <3477E635-F590-4432-BD20-C59142B65CD3@postgrespro.ru> References: <02DA5F5E-CECE-4D9C-8B4B-418077E2C010@postgrespro.ru> <89073436-925E-4299-A9AF-88D04E55C231@postgrespro.ru> To: Craig Ringer X-Mailer: Apple Mail (2.3259) X-Pg-Spam-Score: -5.2 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org > On 26 Jan 2017, at 12:51, Craig Ringer wrote: >=20 > * Tracking xid/gid map in memory also doesn=E2=80=99t help much =E2=80=94= if server reboots between prepare > and commit we=E2=80=99ll lose that mapping. >=20 > Er what? That's why I suggested using the prepared xacts shmem state. It'= s persistent as you know from your work on prepared transaction files. It h= as all the required info. Imagine following scenario: 1. PREPARE happend 2. PREPARE decoded and sent where it should be sent 3. We got all responses from participating nodes and issuing COMMIT/ABORT 4. COMMIT/ABORT decoded and sent After step 3 there is no more memory state associated with that prepared tx= , so if will fail between 3 and 4 then we can=E2=80=99t know GID unless we wrote it commit re= cord (or table). -- Stas Kelvich Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers