Re: pgsql: Fix skip-empty-xacts with sequences in test_decoding

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix skip-empty-xacts with sequences in test_decoding
Date: 2022-02-14 14:05:02
Message-ID: 0f39ab04-950e-d62f-b413-b07f1b8b36b9@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-02-14 14:41:40 Re: pgsql: Add test case for an archive recovery corner case.
Previous Message Alvaro Herrera 2022-02-14 13:36:34 Re: pgsql: Fix skip-empty-xacts with sequences in test_decoding