Re: collect_corrupt_items_vacuum.patch

Alexander Korotkov <aekorotkov@gmail.com>

From: Alexander Korotkov <aekorotkov@gmail.com>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>, Daniel Shelepanov <deniel1495@mail.ru>, Nikita Malakhov <hukutoc@gmail.com>, Michael Paquier <michael@paquier.xyz>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Andres Freund <andres@anarazel.de>
Date: 2023-11-07T11:38:40Z
Lists: pgsql-hackers

Attachments

Hi, Alexander.

On Tue, Nov 7, 2023 at 1:00 PM Alexander Lakhin <exclusion@gmail.com> wrote:
> It looks like the v2 patch doesn't fix the original issue. Maybe I miss
> something, but with the patch applied, I see the failure immediately,
> though without the patch several iterations are needed to get it.


That's a bug in the patch.  Thank you for cathing it.  It should start
calculation from latestCompletedXid + 1, not InvalidTransactionId.
Please, check the revised patch.

------
Regards,
Alexander Korotkov

Commits

  1. Fix GetStrictOldestNonRemovableTransactionId() on standby

  2. Fix typo in GetRunningTransactionData()

  3. Optimize memory access in GetRunningTransactionData()

  4. Fix false reports in pg_visibility

  5. Fix indentation