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 1nJ1PE-0007iT-LB for pgsql-committers@arkaria.postgresql.org; Sat, 12 Feb 2022 23:02:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJ1PD-0008T6-Ay for pgsql-committers@arkaria.postgresql.org; Sat, 12 Feb 2022 23:02:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJ1PC-0008Sx-Ou for pgsql-committers@lists.postgresql.org; Sat, 12 Feb 2022 23:02:15 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nJ1P8-00007O-Ao for pgsql-committers@lists.postgresql.org; Sat, 12 Feb 2022 23:02:14 +0000 Received: by mail-ed1-x535.google.com with SMTP id z21so445439edb.13 for ; Sat, 12 Feb 2022 15:02:09 -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=G5/pq33qdwqyr/0SUTcZIAz67fNi6RTzSQ9WRB1DmtA=; b=Ye+Wb6gqbVXjctBqcJNJyxchBlWmw08TugWnOhZpb/dYk1stRKSRY4H1UQZ65B2Z4v /O1djVYilny/RXGwxmCC54AYX8puPNUkKKlB4EISrGC+C0jYKECr+xniMen9TW6ryEaE md1dhR281wfbnpD7gVkkwsTr99rStgSrNtBnzLxb2tbaD/nxEYpTgHZzwkQzCXYBqz1X K90/UudsRTIzu9VlvnlIm8Y44jHsYbxgGUgvViO+mMMDCeLl6PGbMemEl780hvIKZAn8 4LTp5RNWwl5lTFgNQeML/eqbqzVvktkOz7k8Rzw/CbvjpF0DlRsD8FF+DsJ//ZU2k+4N QG1w== 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=G5/pq33qdwqyr/0SUTcZIAz67fNi6RTzSQ9WRB1DmtA=; b=P9UhYsIXiwzPu7HYcOZkJ9eIuAHYqo4pAQxqlfrGfsGFlNI1mWJBsBdmiNBh3vpClQ NKKmSxEAZ9ps36wEAPsP0nl3AsTX/Hy4qLNY0VoLgEzuvBG0exSDp9FG0dD5VKr+d5mD +sq9dptr0J3Zecw9kH1g6+9dJz6LCeXb3EFW0ccYsq29O7hAotKD3r5mA5Ol5vN4KKaq rIVdb2gSWtZsEoruExo758Q/wcPf6X2tg5Ddy44Kt6iQJ2n02y1oyfotSNhUyWS+/4Tq uirGKDNLIkvgOfR3KWZwhJbYEmjuzs0OZ7poiKRGlfoFhy7YiciEBRoPrIQlRK54/iV1 wuvA== X-Gm-Message-State: AOAM530UlTemt/envUNanHgxL1DizxN20dc53wLJSfTLcARfJkWbBCE6 WO1Et0ye+XGJ5sbMfFVjYRtztpCgGrtEBAmgNLq/U6MW28mqMcxxFGJK9KZWk7uRIIfM+gQtDca AM9ijbYf2IWaCD3vo+7w+DkdB/BxVJH7VyrlovCQ5RlpzHCef6MZaE/3I/RfsHRYlUEGPHC89P/ lrbG2k0sJh7YjSr7PAy7zT20++yiRMfsUp1YJd3iXjfbRxLB1DVheGw3aUkmaZ X-Google-Smtp-Source: ABdhPJxMVgRJD3SJTjhULwMUHba52gv7lt8e6GN59FZtGqYTiXsAQTtdOUJOupOH2tRNF5ZVUap2dw== X-Received: by 2002:a50:ec0f:: with SMTP id g15mr7208305edr.122.1644706928429; Sat, 12 Feb 2022 15:02:08 -0800 (PST) Received: from [10.137.0.19] (ip-86-49-251-241.net.upcbroadband.cz. [86.49.251.241]) by smtp.gmail.com with ESMTPSA id z4sm9061627ejd.39.2022.02.12.15.02.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Feb 2022 15:02:08 -0800 (PST) Message-ID: Date: Sun, 13 Feb 2022 00:02:05 +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: Add decoding of sequences to test_decoding Content-Language: en-US To: Andres Freund , Tomas Vondra Cc: pgsql-committers@lists.postgresql.org References: <20220212220413.b25amklo7t4xb7ni@alap3.anarazel.de> From: Tomas Vondra In-Reply-To: <20220212220413.b25amklo7t4xb7ni@alap3.anarazel.de> Content-Type: text/plain; charset=UTF-8 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/12/22 23:04, Andres Freund wrote: > Hi, > > On 2022-02-11 23:52:20 +0000, Tomas Vondra wrote: >> Add decoding of sequences to test_decoding >> >> Commit 0da92dc530 improved the logical decoding infrastructure to handle >> sequences, and did various changes to related parts (WAL logging etc.). >> But it did not include any implementation of the new callbacks added to >> OutputPluginCallbacks. >> >> This extends test_decoding with two callbacks to decode sequences. The >> decoding of sequences may be disabled using 'include-sequences', a new >> option of the output plugin. >> >> Author: Tomas Vondra, Cary Huang >> Reviewed-by: Peter Eisentraut, Hannu Krosing, Andres Freund >> Discussion: https://postgr.es/m/d045f3c2-6cfb-06d3-5540-e63c320df8bc@enterprisedb.com >> Discussion: https://postgr.es/m/1710ed7e13b.cd7177461430746.3372264562543607781@highgo.ca > > The tests fail on slow machines (valgrind in this case), with some spurious > output differences: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2022-02-12%2010%3A24%3A22 > > diff -U3 /mnt/resource/bf/build/skink-master/HEAD/pgsql/contrib/test_decoding/expected/sequence.out /mnt/resource/bf/build/skink-master/HEAD/pgsql.build/contrib/test_decoding/results/sequence.out > --- /mnt/resource/bf/build/skink-master/HEAD/pgsql/contrib/test_decoding/expected/sequence.out 2022-02-12 00:40:25.431913374 +0000 > +++ /mnt/resource/bf/build/skink-master/HEAD/pgsql.build/contrib/test_decoding/results/sequence.out 2022-02-12 11:07:19.177487256 +0000 > @@ -263,12 +263,14 @@ > data > ----------------------------------------------------------------------------------------- > BEGIN > + COMMIT > + BEGIN > sequence public.test_table_a_seq: transactional:1 last_value: 1 log_cnt: 0 is_called:0 > sequence public.test_table_a_seq: transactional:1 last_value: 33 log_cnt: 0 is_called:1 > table public.test_table: INSERT: a[integer]:1 b[integer]:100 > table public.test_table: INSERT: a[integer]:2 b[integer]:200 > COMMIT > -(6 rows) > +(8 rows) > > I don't think it's a good idea to use skip-empty-xacts = 0 in tests, there > always can be an autovacuum or such. > Thanks, I pushed a fix. Turns out the bug was a bit worse, because the sequence callbacks did not actually deal with empty xacts correctly, so I fixed that too. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company