Hi Álvaro, > I think the real problem is the shutdown of pgaio or pgstats.
That matches what I saw, and it looks like both are involved. One path is on the pgaio side: the abort reaches pgaio_io_wait (through DropRelationsAllBuffers -> WaitIO) and waits on an IO that can never complete, since the IO workers are gone with the postmaster -- with io_method=sync that wait disappears, which is how I isolated it. The pgstat report is the other: it runs with a transaction still active, and merely clearing the pending list trades the assert for "releasing ref with pending data". Happy to test the repack.c variant you suggest, if that helps. Regards, Manu
