On Mon, Mar 15, 2021 at 10:10 PM Mark Dilger <mark.dil...@enterprisedb.com> wrote: > It is unfortunate that the failing test only runs pg_amcheck after creating > numerous corruptions, as we can't know if pg_amcheck would have complained > about pg_statistic before the corruptions were created in other tables, or if > it only does so after. The attached patch v7-0003 adds a call to pg_amcheck > after all tables are created and populated, but before any corruptions are > caused. This should help narrow down what is happening, and doesn't hurt to > leave in place long-term. > > I don't immediately see anything wrong with how pg_statistic uses a > pseudo-type, but it leads me to want to poke a bit more at pg_statistic on > hornet and tern, though I don't have any regression tests specifically for > doing so. > > Tests v7-0001 and v7-0002 are just repeats of the tests posted previously.
Since we now know that shutting autovacuum off makes the problem go away, I don't see a reason to commit 0001. We should fix pg_amcheck instead, if, as presently seems to be the case, that's where the problem is. I just committed 0002. I think 0003 is probably a good idea, but I haven't committed it yet. As for 0004, it seems to me that we might want to do a little more rewording of these messages and perhaps we should try to do it all at once. Like, for example, your other change to print out the toast value ID seems like a good idea, and could apply to any new messages as well as some existing ones. Maybe there are also more fields in the TOAST pointer for which we could add checks. -- Robert Haas EDB: http://www.enterprisedb.com