Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJbyb-0006Zr-9e for pgsql-committers@arkaria.postgresql.org; Mon, 14 Feb 2022 14:05:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJbyZ-0007vD-OL for pgsql-committers@arkaria.postgresql.org; Mon, 14 Feb 2022 14:05:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJbyZ-0007ue-27 for pgsql-committers@lists.postgresql.org; Mon, 14 Feb 2022 14:05:11 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nJbyV-0005aw-0d for pgsql-committers@lists.postgresql.org; Mon, 14 Feb 2022 14:05:09 +0000 Received: by mail-ej1-x62d.google.com with SMTP id jg20so12743150ejc.3 for ; Mon, 14 Feb 2022 06:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=SvREUN6JXnOECDLYxRkhjtZxnF6hVDr7+Jt4LILhO3s=; b=ZascU+t9FlFZt7vCKmltIslQey5FPcW1Mz8+GAUx60OIoxYs3dskf11UZ3ag5J96nI KGiXA1Sr3au5pOAeF1XJC9WyuHpJ9+tx20uXOwSORfFbRqNTJoncrG5Z5kuJ2wPXIiMb 8DBq8oSim3ycac1yK8M8SiYQ0+YOWn0Nlkcduc5UAvF78G0sHiaFMg3lJh26e8AeBJcp zz53JOvGzEpY3iRPRyTtOkKCa1Nh/FfJs+nMbZgHIz2cgz6k7Cz8lmUIu/0ZhROR/zPM kAMS2TVtEfA+o1UTYyw1BGZBwwhkT5eFgzDASkO6RfwzyBMd17s2ACawBA+lA65LnYLk mV1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=SvREUN6JXnOECDLYxRkhjtZxnF6hVDr7+Jt4LILhO3s=; b=vtWcIsTfxr6JkKRI0IfAn8j0F/YixRlUUiTp05D2pUTtOVpsJhGoECQ9oXsdkMrlzw UjuXmDAtRg/mdNsiY+ajPtb6C37D9baFILmcTqzaLjOXQYt9Eda5dlAQbf6b5f3FuJI0 SJNpU0QyKoQLb8IQxRxahW1auqKd/Zy3k7P/4qKwkpxqa3xyYrYtuDWCSgoqjTLksbnG 3yGNUoJjExziuEL7OSTnZKEeeRgfbqpmfthcwBSwdEtdzh8wO7HqmbRGaDKqXr9oFQJO PMpkmOcd5bAk3YMaQU+osP+mY/OQanQ2OEDW10ZcDJop0IIxHAbZDmfNnsFsM0gG+W/x 1emg== X-Gm-Message-State: AOAM533C3bP8QaaUtpvK3DnjyEuJVXG0UgXec0QImiYqi9XXph9pYvCD 8kQZ9KCXmV7oM8oP6uxEr6QITBpyEv1khwtDeHYey0e+QjNYr7fPFAcIvck78pglYIw7W+raRj3 mIPhexRrk6XlXK5m0ZWr+qbPfSBRC0XJ3GkK47yxN5oa2kwoyngMvjhlxIKrhoKJffBiFLwq6bw JsoEbNGrd9pHK3CyoafmvBQUqoXvWSsT24CeT6HJGOkzgsIbqkOJDRASYMryMv X-Google-Smtp-Source: ABdhPJxjNAvgzmcgZRFfWAmCOPasBBXzOIU04gH1gLnUoIE3w5wfR9mPrVtaTd7FIc73cKkANMuWBA== X-Received: by 2002:a17:907:6091:: with SMTP id ht17mr11834200ejc.607.1644847505330; Mon, 14 Feb 2022 06:05:05 -0800 (PST) Received: from [10.137.0.18] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id v24sm1931988ejf.7.2022.02.14.06.05.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Feb 2022 06:05:04 -0800 (PST) Message-ID: <0f39ab04-950e-d62f-b413-b07f1b8b36b9@enterprisedb.com> Date: Mon, 14 Feb 2022 15:05:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: pgsql: Fix skip-empty-xacts with sequences in test_decoding Content-Language: en-US To: Alvaro Herrera Cc: Tomas Vondra , pgsql-committers@lists.postgresql.org References: <202202141336.xv35beswc6ec@alvherre.pgsql> From: Tomas Vondra In-Reply-To: <202202141336.xv35beswc6ec@alvherre.pgsql> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/14/22 14:36, Alvaro Herrera wrote: > On 2022-Feb-13, Tomas Vondra wrote: > >>>> Fixing the tests however uncovered a bug in the code, because sequence >>>> callbacks did not handle skip-empty-xacts properly. For trasactional >>>> increments we need to check/update the xact_wrote_changes flag, and emit >>>> the BEGIN if it's the first change in the transaction. >>> >>> Hmm. Perhaps there should be a separate test script that runs various >>> things under skip-empty-xacts=0 and somehow protected against ancillary >>> activities (maybe a TAP test using autovacuum=0), just so that this new >>> code is covered ... >> >> I'm not sure what exactly would be the benefit? > > Yeah, it's pointless. > > I propose the attached comment additions instead. > The comments seem fine to me (although not really related to these commits about sequence decoding). regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company