On Thu, Feb 16, 2023 at 5:40 PM Mikhail Balayan <mv.bala...@gmail.com> wrote: >> >> Do you have any non-btree indexes on the table? Can you show us the >> >> details of the >> >> table, including all of its indexes? In other words, can you show "\d >> >> applications" output from psql? > > Only btree indexes. Please find the full table schema below:
It's possible that VACUUM had to wait a long time for a cleanup lock on one individual heap page here, which could have added a long delay. But...that doesn't seem particularly likely. Can you run amcheck's bt_index_check() routine against some of the indexes you've shown? There is perhaps some chance that index corruption exists and causes VACUUM to take a very long time to delete index pages. This is pretty much a wild guess, though. -- Peter Geoghegan