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 1gn4tL-0000c0-4t for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Jan 2019 17:03:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gn4tJ-0003EL-Ly for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Jan 2019 17:03:41 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gn4tJ-0003EE-BD for pgsql-hackers@lists.postgresql.org; Fri, 25 Jan 2019 17:03:41 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gn4tB-0003XD-SW for pgsql-hackers@postgresql.org; Fri, 25 Jan 2019 17:03:40 +0000 Received: by mail-qt1-x841.google.com with SMTP id l11so11469858qtp.0 for ; Fri, 25 Jan 2019 09:03:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=gRi7enM+cgPX4UdVxdHPf3faYR1vjZx1nszM6a/d8EQ=; b=mF6RtNoReMD/YKnZJv6BFFdeCeHGYlz4pSdYZZLORXbvjtxIRktvWMowLIFcFulkT1 ox/xp0bI+FRCfBixCL69enLu2jfgRNZ54R4qGC1hDSWqXiRadnIEhRHv80nUU/X6ciBu OWN7SEUyopib9H7NiyP2yNvBlfBtUyjJy2BEOpIemOnzmhbgHdznbry+Ao1zglS1d5/l 9D/yjTAtw0YGODdX0QUIE90/UX4CrtGZ/BgeM1OO/rLZfBgg4RwTILb5BCNe9zbNWVSl gIjeACFPz0SOLp335+dfROoQF+1qbhE92w50W2OelfY+NgjbWAkFfAzZXdHMe153pqBt GWOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=gRi7enM+cgPX4UdVxdHPf3faYR1vjZx1nszM6a/d8EQ=; b=UXZubt7U+k/RoJksqcJ2z+fYxMbGaXN1VIy2dwQTEwCWWrM+FqjnbvjOolT3fFJzY5 2BekmpN2VtfY0/phZboOEaKAf6q4HrkllrgvfdsV4DizV4b/cxzxy2fnR6kn3+uH8Hcq Ng3rE+IIPnAJeFJqo4LTsqJmAj37yuzKWOQudjAOpsBUJF2eRREBcGBMc8SmXp5GZJGF qcmw7GK2efokZFQCxPykWCtIaMCbIvEGfUZjg8S3u1Sdyidwlhm7PJOsF5WNrGyfw49m BCzG9Qk18kwI908o8ZOgKi/mozskRV96qUdh/ZV5KBxAZF+NtrRk36AOk9OIHyZZr1dh HoVA== X-Gm-Message-State: AJcUukfddkmJtY0BHSs5p7qSSGO0TYU+Ej9UHaK6n4pKfXtVVWgCurcT 1317G+KDOkOGxiGe57cAWTKoqw== X-Google-Smtp-Source: ALg8bN6S78bCiXaKMzlMoITZV2EZXTzxM/dKyK37t/FDKEjVv67ZC5heVzm6BWShASwgeD3tKo+JGw== X-Received: by 2002:ac8:1b82:: with SMTP id z2mr11966425qtj.321.1548435810358; Fri, 25 Jan 2019 09:03:30 -0800 (PST) Received: from alvin.alvh.no-ip.org ([201.186.80.67]) by smtp.gmail.com with ESMTPSA id f2sm59192111qkj.54.2019.01.25.09.03.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 09:03:29 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id CC4DA6D8; Fri, 25 Jan 2019 14:03:27 -0300 (-03) Date: Fri, 25 Jan 2019 14:03:27 -0300 From: Alvaro Herrera To: Nikhil Sontakke Cc: Tomas Vondra , Andres Freund , Robert Haas , 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 mailing lists Subject: Re: [HACKERS] logical decoding of two-phase transactions Message-ID: <201901251703.r7idekybsep2@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716-1013-2c1e88 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Eyeballing 0001, it has a few problems. 1. It's under-parenthesizing the txn argument of the macros. 2. the "has"/"is" macro definitions don't return booleans -- see fce4609d5e5b. 3. the remainder of this no longer makes sense: /* Do we know this is a subxact? Xid of top-level txn if so */ - bool is_known_as_subxact; TransactionId toplevel_xid; I suggest to fix the comment, and also improve the comment next to the macro that tests this flag. (4. the macro names are ugly.) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services