Re: Add two missing tests in 035_standby_logical_decoding.pl

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, "Yu Shi (Fujitsu)" <shiy(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add two missing tests in 035_standby_logical_decoding.pl
Date: 2023-05-06 08:22:10
Message-ID: 2894687f-141d-85a9-e8c3-2151e5b7e662@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 5/6/23 4:10 AM, Amit Kapila wrote:
> On Fri, May 5, 2023 at 7:53 PM Drouvot, Bertrand
> <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>>
>> On 5/5/23 2:28 PM, Amit Kapila wrote:
>>> On Fri, May 5, 2023 at 5:36 PM Drouvot, Bertrand
>>
>> So, even on a successful test, we can see that the WAL file we expect to be removed on the standby has not been recycled on the primary before the test.
>>
>
> Okay, one possibility of not removing on primary is that at the time
> of checkpoint (when we compute RedoRecPtr), the wal_swtich and insert
> is not yet performed because in that case it will compute the
> RedoRecPtr as a location before those operations which would be 0000*3
> file. However, it is not clear how is that possible except from a
> background checkpoint happening at that point but from LOGs, it
> appears that the checkpoint triggered by test has recycled the wal
> files.
>
>>> I think we need to add more DEBUG info to find that
>>> out. Can you please try to print 'RedoRecPtr', '_logSegNo', and
>>> recptr?
>>>
>>
>> Yes, will do.
>>
>
> Okay, thanks, please try to print similar locations on standby in
> CreateRestartPoint().
>

The extra information is displayed that way:

https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR6822-R6830
https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR7269-R7271
https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR7281-R7284

There is 2 runs with this extra info in place:

A successful one: https://cirrus-ci.com/task/6528745436086272
A failed one: https://cirrus-ci.com/task/4558139312308224

For both the testrun.zip is available in the Artifacts section.

Sharing this now in case you want to have a look (I'll have a look at them early next week on my side).

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Ford 2023-05-06 08:41:49 Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Previous Message MARK CALLAGHAN 2023-05-06 05:01:57 Re: benchmark results comparing versions 15.2 and 16