Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhd8Q-0000wf-6U for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jul 2018 15:52:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fhd8O-0001VJ-4n for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jul 2018 15:52:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fhd8N-0001VC-QE for pgsql-hackers@lists.postgresql.org; Mon, 23 Jul 2018 15:52:27 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fhd8K-0004oH-W0 for pgsql-hackers@postgresql.org; Mon, 23 Jul 2018 15:52:27 +0000 Received: by mail-pg1-x536.google.com with SMTP id g2-v6so674985pgs.6 for ; Mon, 23 Jul 2018 08:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wr78JWAGKu7V7qK8fE7b77zj4YJu0RLWpGdtqtCLF1k=; b=le5aOXzZGmNB3mqz7CVBJgDb4tcB3pm/u+6ll7elL44VlPEE50hQ9ZNN/b5F0W2n0F Xo1kcXowfUsdcS4VrNVtElT8xCDV34gegzGr6WzHhGwcDohI7ofRBZHSnlOcSevHIMcP UVZLeJreLUidc4evToV0b1gq+UwRzug3ab20l3kTf6CkxKbLYjFcOe6J/HU1/LwhEGK5 EmCvRYe5xRl3WbvhA7mu3FhzoSwDH/IzBrcrVsx3b/VzroyOKN7XfFKbHQbV6AnBUUKw yyqV3g+pEWRoAerGPfxYBhZuECjLt8NeBzK39qrDye6t8oQ+njoQMsxo/+EjUd/0+ajF O4MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wr78JWAGKu7V7qK8fE7b77zj4YJu0RLWpGdtqtCLF1k=; b=CsAhAVOEt638gcWOrRbFjXD71cS3OQr6xFa8c9DUoAIXYy3pDwaPn/vWZ5UlkK6qB/ 9tGjOMdvuCJX5yC7r0d4HtUK7YCffrNCOMUoD9momVQlddZMjwmRUxlPYDu+IFHl30h8 5F7Hf4K8vgKsofdREd9hlkOsgMwiOLDFtybw3cwca070L3KnWyFltAwc8resjRYQHSiT Kwv8Ybhw1eLgWPq3XokQGKXrR7mGBvt4q2T03S9rwW2ispBPLhjc9SD/z2DpSGpJHfU5 8WgGKziiS3wpKUhgW74UdyRXsiNYTHSMI3ZC5gGHNjK4NWdf/2DWhTB0XBShpKgoUYm+ eqiw== X-Gm-Message-State: AOUpUlEIw9T5ofcR2AK9fim2vlpvcaF9Wf+2H6cybJDwaqd9S5TtOocv Jwvbvsz+DsqS7atiOybNs1kDdQ== X-Google-Smtp-Source: AAOMgpfrLIjQJGjgc2sv4ba/whsgZp4+yGrUK8N6p/H/bXupDzZSdEqWOJtR7Z6/+euZ+b7/oY+qbQ== X-Received: by 2002:a63:b256:: with SMTP id t22-v6mr13090257pgo.101.1532361142955; Mon, 23 Jul 2018 08:52:22 -0700 (PDT) Received: from [10.0.0.7] ([223.229.186.146]) by smtp.gmail.com with ESMTPSA id z5-v6sm6843703pfi.4.2018.07.23.08.52.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 08:52:20 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [HACKERS] logical decoding of two-phase transactions From: Nikhil Sontakke X-Mailer: iPhone Mail (15G77) In-Reply-To: <20180723141435.ercxxh3bj2uc2mjm@alap3.anarazel.de> Date: Mon, 23 Jul 2018 21:22:18 +0530 Cc: Nikhil Sontakke , Robert Haas , Tomas Vondra , David Steele , Andrew Dunstan , Simon Riggs , Craig Ringer , Peter Eisentraut , Petr Jelinek , Sokolov Yura , Stas Kelvich , Dmitry Dolgov <9erthalion6@gmail.com>, Tom Lane , Masahiko Sawada , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <3B37B16B-A473-4352-ABCF-F23AE314D4F7@2ndquadrant.com> References: <20180719194208.j5m7qhdmqp46d6yg@alap3.anarazel.de> <20180719223500.lclj45aiojikwnwm@alap3.anarazel.de> <20180720145836.gxwhbftuoyx5h4gc@alap3.anarazel.de> <20180723135009.w25re6qxbb7njrbd@alap3.anarazel.de> <20180723141435.ercxxh3bj2uc2mjm@alap3.anarazel.de> To: Andres Freund List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Andres, >> We can find out if the snapshot is a logical decoding one by virtue of >> its "satisfies" function pointing to HeapTupleSatisfiesHistoricMVCC. >=20 > I think we even can just do something like a global > TransactionId check_if_transaction_is_alive =3D InvalidTransactionId; > and just set it up during decoding. And then just check it whenever it's > not set tot InvalidTransactionId. >=20 >=20 Ok. I will work on something along these lines and re-submit the set of patc= hes.=20 Regards,=20 Nikhils=