On Sat, Jan 11, 2025 at 4:40 AM yuansong <yyuans...@126.com> wrote: > If such index anomalies need to be checked, it would be better to do so using > external tools rather than checking during the core search process.
Why? Did you use an external tool? > If you agree with this proposal, I can try to implement the related fix later. I strongly disagree. If the hardening in this function (and similar hardening elsewhere) had been in place on the production server that you were using (if you'd kept up with point releases, rather than staying on 13.2) then you almost certainly wouldn't have had the problem of btree_xlog_insert crashing in the first place. The problem would have been contained, and you'd probably only have needed to REINDEX to fix everything. But you now propose to *remove* that hardening, because it is "confusing and inefficient". This seems illogical. -- Peter Geoghegan