diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php
index ffd4f1a69451c90d75e1cbefb54ab79d5f809b64..277bbd2e04e62983e749df428e90f2d33985ab66 100644
--- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php
+++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php
@@ -226,7 +226,6 @@ public static function schemaDefinition() {
       ],
       'primary key' => ['collection', 'name'],
       'indexes' => [
-        'all' => ['name', 'collection', 'expire'],
         'expire' => ['expire'],
       ],
     ];
diff --git a/core/modules/system/system.post_update.php b/core/modules/system/system.post_update.php
index 14391c15e9b33e2245a4b66c530f309b8e0cd451..6d09e99c0b0d1cea647d84e36b89308f893ac7c6 100644
--- a/core/modules/system/system.post_update.php
+++ b/core/modules/system/system.post_update.php
@@ -179,3 +179,13 @@ function system_post_update_delete_rss_settings() {
     ->clear('langcode')
     ->save();
 }
+
+/**
+ * Drop the 'all' index on the 'key_value_expire' table.
+ */
+function system_post_update_remove_key_value_expire_all_index() {
+  $schema = \Drupal::database()->schema();
+  if ($schema->tableExists('key_value_expire')) {
+    $schema->dropIndex('key_value_expire', 'all');
+  }
+}
diff --git a/core/modules/system/tests/src/Functional/Update/DropIndexAllOnKeyValueExpireTableUpdateTest.php b/core/modules/system/tests/src/Functional/Update/DropIndexAllOnKeyValueExpireTableUpdateTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..1fe071ba34e08725f7da817c860800d0293f2cdc
--- /dev/null
+++ b/core/modules/system/tests/src/Functional/Update/DropIndexAllOnKeyValueExpireTableUpdateTest.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace Drupal\Tests\system\Functional\Update;
+
+use Drupal\FunctionalTests\Update\UpdatePathTestBase;
+
+/**
+ * Tests that 'all' index is dropped from the 'key_value_expire' table.
+ *
+ * @group Update
+ * @see system_post_update_remove_key_value_expire_all_index()
+ */
+class DropIndexAllOnKeyValueExpireTableUpdateTest extends UpdatePathTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setDatabaseDumpFiles() {
+    $this->databaseDumpFiles = [
+      dirname(__DIR__, 3) . '/fixtures/update/drupal-8.8.0.bare.standard.php.gz',
+    ];
+  }
+
+  /**
+   * Tests that 'all' index is dropped from the 'key_value_expire' table.
+   */
+  public function testUpdate() {
+    $schema = \Drupal::database()->schema();
+
+    $this->assertTrue($schema->indexExists('key_value_expire', 'all'));
+    $this->runUpdates();
+    $this->assertFalse($schema->indexExists('key_value_expire', 'all'));
+  }
+
+}