Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1fwu-0008W5-IH for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Mar 2018 22:23:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f1fws-0002qV-9z for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Mar 2018 22:23:10 +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.89) (envelope-from ) id 1f1fwr-0002qL-Uw for pgsql-hackers@lists.postgresql.org; Thu, 29 Mar 2018 22:23:10 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f1fwn-0001f0-WD for pgsql-hackers@postgresql.org; Thu, 29 Mar 2018 22:23:08 +0000 Received: by mail-wm0-x241.google.com with SMTP id p9so13075888wmc.3 for ; Thu, 29 Mar 2018 15:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HAMPCZ/i6/GlZvF+RmwfNj+FFuZdyF4kYZltV1GaaUY=; b=hpbKOZPGX8zrhJS6cBWUUjNmkjDaihDnjVU+hhVPQDkONiFVjUp/JeH/ukOEpRxlXP TiwKWqpCwSTKrU2cl6+mR0oM9HZuktkE6LAKwb2U6FBsIcEs+w5K+deqj8x5DICgKasZ iJpN3mjCVJvg+TXKWasOSwsnDwMl9a5ArNM92D75tQNrXITigdLlDMYUhGO05q1zoC5q UlTittAzZF7x3LaEzcI6qMO8KbspJGopmAJcDrMMvR8IvdOtpUqPWJs/6+qR63adlr/s YzcglxIRJxpW07WK44CG7wwZg8uh1+WLaaZH6ge2KJ9X5AiTctNjW8eW1Zus6cktHtsY 8fKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HAMPCZ/i6/GlZvF+RmwfNj+FFuZdyF4kYZltV1GaaUY=; b=RP49tXwIF/VGpVpzzROE1Jcug1cFHO7mK7/WOSq73CGhIGIWbm/ZTkhCZuH2XQD7DU HiCUl6aEkeN0W9qumzrGi6fnAhHHFfeUYQbWppDjEcZyBi2947H+g0nO9/E0H6bkZ9Fg BgdaLFVepdY1u/n4ZPi4klEdsNjEzPd7bDY+80GLg3osBED/nK4XoAf30TzSvOMt0l5D b0k+Ru9qY1hcSoeKqIVqEWTJyFb+P7+pnKipYdaf1sHNuYqWH49C7oV8L2DKB6abI7++ 0fF/202/TWXba363ZWimz1bJI+gQG6CV9/NzxB7KHgUzPG+R3VPpUBgrdpZr9XBgXLqG gHIA== X-Gm-Message-State: ALQs6tBb2pxTnHpsTt/C/DggiIaXyOA22qRzmmCxuPJScKjdrKOujOtN 2m2gaixFAJq9Aw2mW2f7wkvuSQ== X-Google-Smtp-Source: AIpwx4+0+Xy/KFd1HuibRKEDIKp+2cMc14yE/2aRkrlvYeWvyuRM9WmObUuyltcd+eyVwVbDjqsotw== X-Received: by 10.28.218.1 with SMTP id r1mr474754wmg.156.1522362184033; Thu, 29 Mar 2018 15:23:04 -0700 (PDT) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id 69sm5274420wmn.9.2018.03.29.15.23.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 15:23:03 -0700 (PDT) Subject: Re: [HACKERS] logical decoding of two-phase transactions To: Andres Freund Cc: Nikhil Sontakke , Craig Ringer , Peter Eisentraut , Simon Riggs , Petr Jelinek , Sokolov Yura , Stas Kelvich , Dmitry Dolgov <9erthalion6@gmail.com>, Tom Lane , Masahiko Sawada , PostgreSQL Hackers , Robert Haas References: <20180212162040.rsnlnysmf7n4yo7i@alap3.anarazel.de> <20180302005343.zv6nsqimcujzjrcd@alap3.anarazel.de> <20180329215815.36xxakgujx4luo4m@alap3.anarazel.de> From: Tomas Vondra Message-ID: <0925358a-e11d-51bc-c3c1-959ded75f604@2ndquadrant.com> Date: Fri, 30 Mar 2018 00:23:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180329215815.36xxakgujx4luo4m@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 03/29/2018 11:58 PM, Andres Freund wrote: > On 2018-03-29 23:52:18 +0200, Tomas Vondra wrote: >>> I have added details about this in src/backend/storage/lmgr/README as >>> suggested by you. >>> >> >> Thanks. I think the README is a good start, but I think we also need to >> improve the comments, which is usually more detailed than the README. >> For example, it's not quite acceptable that LogicalLockTransaction and >> LogicalUnlockTransaction have about no comments, especially when it's >> meant to be public API for decoding plugins. > > FWIW, for me that's ground to not accept the feature. Burdening output > plugins with this will make their development painful (because they'll > have to adapt regularly) and correctness doubful (there's nothing > checking for the lock being skipped). Another way needs to be found. > The lack of docs/comments, or the fact that the decoding plugins would need to do some lock/unlock operation? I agree with the former, of course - docs are a must. I disagree with the latter, though - there have been about no proposals how to do it without the locking. If there are, I'd like to hear about it. FWIW plugins that don't want to decode in-progress transactions don't need to do anything, obviously. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services