diff --git a/core/modules/system/tests/fixtures/update/drupal-8.pgsql-orphan-sequence.php b/core/modules/system/tests/fixtures/update/drupal-8.pgsql-orphan-sequence.php
new file mode 100644
index 0000000000..0c41bdcd95
--- /dev/null
+++ b/core/modules/system/tests/fixtures/update/drupal-8.pgsql-orphan-sequence.php
@@ -0,0 +1,26 @@
+<?php
+// @codingStandardsIgnoreFile
+
+use Drupal\Core\Database\Database;
+
+$connection = Database::getConnection();
+$db_type = $connection->databaseType();
+
+if ($db_type === 'pgsql') {
+  // Creates a table, then adds a sequence without ownership to simulate tables
+  // that were altered from integer to serial columns.
+  $connection
+    ->schema()
+    ->createTable('pgsql_sequence_test', [
+      'fields' => [
+        'sequence_field' => [
+          'type' => 'int',
+          'not null' => TRUE,
+          'unsigned' => TRUE,
+        ],
+      ],
+      'primary key' => ['sequence_field'],
+    ]);
+  $seq = $connection->makeSequenceName('pgsql_sequence_test', 'sequence_field');
+  $connection->query('CREATE SEQUENCE ' . $seq);
+}
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.install b/core/modules/system/tests/modules/entity_test/entity_test.install
index c796c9adcb..1a10033c8a 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.install
+++ b/core/modules/system/tests/modules/entity_test/entity_test.install
@@ -51,6 +51,17 @@ function entity_test_schema() {
     ],
     'primary key' => ['id'],
   ];
+  $schema['pgsql_sequence_test'] = [
+    'description' => 'Test sequence changes on pgsql driver.',
+    'fields' => [
+      'sequence_field' => [
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Primary Key: A serial integer field.',
+      ],
+    ],
+    'primary key' => ['sequence_field'],
+  ];
   return $schema;
 }
 
diff --git a/core/tests/Drupal/FunctionalTests/Core/Database/PostgreSqlSequenceUpdateTest.php b/core/tests/Drupal/FunctionalTests/Core/Database/PostgreSqlSequenceUpdateTest.php
new file mode 100644
index 0000000000..e50add78bc
--- /dev/null
+++ b/core/tests/Drupal/FunctionalTests/Core/Database/PostgreSqlSequenceUpdateTest.php
@@ -0,0 +1,49 @@
+<?php
+
+namespace Drupal\FunctionalTests\Core\Database;
+
+use Drupal\FunctionalTests\Update\UpdatePathTestBase;
+
+/**
+ * Tests that any unowned sequences created previously have a table owner.
+ *
+ * The update path only applies to Drupal sites using the pgsql driver.
+ *
+ * @group database
+ */
+class PostgreSqlSequenceUpdateTest extends UpdatePathTestBase {
+
+  protected $loadedModules = ['entity_test'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setDatabaseDumpFiles() {
+    $this->databaseDumpFiles = [
+      __DIR__ . '/../../../../../modules/system/tests/fixtures/update/drupal-8.6.0.bare.testing.php.gz',
+      __DIR__ . '/../../../../../modules/system/tests/fixtures/update/drupal-8.pgsql-orphan-sequence.php',
+    ];
+  }
+
+  /**
+   * Asserts that a newly created sequence has the correct ownership.
+   */
+  public function testPostgreSqlSequenceUpdate() {
+    $database = $this->container->get('database');
+    $db_type = $database->databaseType();
+
+    // Run the updates.
+    $this->runUpdates();
+
+    if ($db_type === 'pgsql') {
+      $sequenceExists = (bool) $database
+        ->query("SELECT pg_get_serial_sequence('{" . $database->prefixTables('pgsql_sequence_test') . "}', 'sequence_field')")
+        ->fetchField();
+      $this->assertTrue($sequenceExists, 'Sequence is owned by the table and column.');
+    }
+    else {
+      $this->assertTrue(TRUE, 'Database update ran successfully on non-pgsql driver.');
+    }
+  }
+
+}
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
index 240bee29e2..7c2839602b 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
@@ -55,6 +55,9 @@ protected function setUp() {
    * Tests database interactions.
    */
   public function testSchema() {
+    // Tests for indexes are Database specific.
+    $db_type = $this->connection->databaseType();
+
     // Try creating a table.
     $table_specification = [
       'description' => 'Schema table description may contain "quotes" and could be long—very long indeed.',
@@ -93,7 +96,7 @@ public function testSchema() {
     // Assert that the column comment has been set.
     $this->checkSchemaComment($table_specification['fields']['test_field']['description'], 'test_table', 'test_field');
 
-    if ($this->connection->databaseType() === 'mysql') {
+    if ($db_type === 'mysql') {
       // Make sure that varchar fields have the correct collation.
       $columns = $this->connection->query('SHOW FULL COLUMNS FROM {test_table}');
       foreach ($columns as $column) {
@@ -160,6 +163,13 @@ public function testSchema() {
 
     // Change the new field to a serial column.
     $this->schema->changeField('test_table', 'test_serial', 'test_serial', ['type' => 'serial', 'not null' => TRUE, 'description' => 'Changed column description.'], ['primary key' => ['test_serial']]);
+    // Confirms that the new sequence is owned by the table in PostgreSQL.
+    if ($db_type == 'pgsql') {
+      $sequence_exists = (bool) $this->connection
+        ->query("SELECT pg_get_serial_sequence('{test_table}', 'test_serial')")
+        ->fetchField();
+      $this->assertTrue($sequence_exists, 'New sequence is owned by its table.');
+    }
 
     // Assert that the column comment has been set.
     $this->checkSchemaComment('Changed column description.', 'test_table', 'test_serial');
@@ -228,6 +238,27 @@ public function testSchema() {
     $this->assertIndexOnColumns($table_name, ['id'], 'primary');
     $this->assertIndexOnColumns($table_name, ['test_field'], 'unique');
 
+    // Test for existing primary and unique keys.
+    switch ($db_type) {
+      case 'pgsql':
+        $primary_key_exists = (bool) $this->schema->queryFieldInformation($table_name, 'id', 'p');
+        $unique_key_exists = (bool) $this->schema->queryFieldInformation($table_name, 'test_field', 'u');
+        break;
+
+      case 'sqlite':
+        // SQLite does not create a standalone index for primary keys.
+        $primary_key_exists = TRUE;
+        $unique_key_exists = $this->schema->indexExists($table_name, 'test_field');
+        break;
+
+      default:
+        $primary_key_exists = $this->schema->indexExists($table_name, 'PRIMARY');
+        $unique_key_exists = $this->schema->indexExists($table_name, 'test_field');
+        break;
+    }
+    $this->assertIdentical($primary_key_exists, TRUE, 'Primary key created.');
+    $this->assertIdentical($unique_key_exists, TRUE, 'Unique key created.');
+
     $new_table_name = strtolower($this->getRandomGenerator()->name(63 - strlen($this->getDatabasePrefix())));
     $this->assertNull($this->schema->renameTable($table_name, $new_table_name));
 
