Re: collect_corrupt_items_vacuum.patch
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: Dmitry Koval <d.koval@postgrespro.ru>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2024-01-09T09:17:28Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-false-reports-in-pg_visibility-v5.patch (application/octet-stream) patch v5-0001
Hi! On Tue, Dec 5, 2023 at 9:03 PM Dmitry Koval <d.koval@postgrespro.ru> wrote: > I agree with Alexander Lakhin about PROC_IN_VACUUM and > VISHORIZON_DATA_STRICT: > 1) probably manipulations with the PROC_IN_VACUUM flag in > pg_visibility.c were needed for condition [1] and can be removed now; Right, PROC_IN_VACUUM is no longer required. The possible benefit of it would be to avoid bloat during a possibly long run of pg_visibility() function. But the downside are problems with the snapshot if the invoking query contains something except a single call of the pg_visibility() function, and complexity. Removed. > 2) the VISHORIZON_DATA_STRICT macro is probably unnecessary too (since > we are not going to use it in the GlobalVisHorizonKindForRel() function). Makes sense, removed. > Also It would be nice to remove the get_strict_xid_horizon() function > from the comment (replace to GetStrictOldestNonRemovableTransactionId()?). Right, fixed. The revised patch is attached. Besides the fixes above, it contains improvements for comments and the detailed commit message. Tom, Robert, what do you think about the patch attached? It required a new type of xid horizon in core and sacrifices accuracy. But this is the only way I can imagine, we can fix the problem in a general way. ------ Regards, Alexander Korotkov
Commits
-
Fix GetStrictOldestNonRemovableTransactionId() on standby
- e2ed7e32271a 18.0 landed
-
Fix typo in GetRunningTransactionData()
- 619f76cce11d 17.0 landed
- 6c1af5482e69 18.0 landed
-
Optimize memory access in GetRunningTransactionData()
- 6897f0ec0245 18.0 landed
-
Fix false reports in pg_visibility
- e85662df44ff 17.0 landed
-
Fix indentation
- 4d0cf0b05def 17.0 cited