On Tue, Dec 29, 2020 at 02:17:51PM +0300, Max Vikharev wrote:
> Finally we discovered that the problem is related to
> https://www.postgresql.org/message-id/flat/0A3221C70F24FB45833433255569204D1F8A4DC6%40G01JPEXMBYT05
>
> Autovacuum hangs on the database which contains orphaned temp tables. When
> I deleted the schema with orphaned temporary tables - autovacuum continued
> to work without reboot.
Just wondering. Are you sure that this instance is based on 12.3?
The removal of orphaned temp tables should be more aggressive as we
also track down in autovacuum if a specific temp schema OID is in use
by a backend, and the initialization of a temp namespace for a backend
cleans up temp objects from past connections that were leaving around
orphaned objects because of a crash (see around RemoveTempRelations()
in InitTempTableNamespace()).
--
Michael