File 00007-drop-orphan-tt.patch of Package postgresql96-libs.7822

diff -urNp a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
--- a/src/backend/postmaster/autovacuum.c	2017-08-29 00:21:42.000000000 +0300
+++ b/src/backend/postmaster/autovacuum.c	2017-10-30 11:25:43.756355339 +0300
@@ -2040,32 +2040,20 @@ do_autovacuum(void)
 			{
 				/*
 				 * We found an orphan temp table (which was probably left
-				 * behind by a crashed backend).  If it's so old as to need
-				 * vacuum for wraparound, forcibly drop it.  Otherwise just
-				 * log a complaint.
+				 * behind by a crashed backend).
+				 * Will forcibly drop it.
 				 */
-				if (wraparound)
-				{
-					ObjectAddress object;
+				ObjectAddress object;
 
-					ereport(LOG,
-							(errmsg("autovacuum: dropping orphan temp table \"%s\".\"%s\" in database \"%s\"",
-								 get_namespace_name(classForm->relnamespace),
-									NameStr(classForm->relname),
-									get_database_name(MyDatabaseId))));
-					object.classId = RelationRelationId;
-					object.objectId = relid;
-					object.objectSubId = 0;
-					performDeletion(&object, DROP_CASCADE, PERFORM_DELETION_INTERNAL);
-				}
-				else
-				{
-					ereport(LOG,
-							(errmsg("autovacuum: found orphan temp table \"%s\".\"%s\" in database \"%s\"",
-								 get_namespace_name(classForm->relnamespace),
-									NameStr(classForm->relname),
-									get_database_name(MyDatabaseId))));
-				}
+				ereport(LOG,
+						(errmsg("autovacuum: dropping orphan temp table \"%s\".\"%s\" in database \"%s\"",
+							 get_namespace_name(classForm->relnamespace),
+								NameStr(classForm->relname),
+								get_database_name(MyDatabaseId))));
+				object.classId = RelationRelationId;
+				object.objectId = relid;
+				object.objectSubId = 0;
+				performDeletion(&object, DROP_CASCADE, PERFORM_DELETION_INTERNAL);
 			}
 		}
 		else