diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
index 1557d41..b5747f0 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
@@ -35,6 +35,10 @@ public function __construct() {
       'arguments' => array(),
     );
     $this->tasks[] = array(
+      'function' => 'checkStandardConformingStrings',
+      'arguments' => array(),
+    );
+    $this->tasks[] = array(
       'function' => 'initializeDatabase',
       'arguments' => array(),
     );
@@ -185,6 +189,56 @@ protected function checkBinaryOutputSuccess() {
   }
 
   /**
+   * Check standard_conforming_strings setting.
+   *
+   * @todo explain why we want this on.
+   */
+  function checkStandardConformingStrings() {
+    $database_connection = Database::getConnection();
+    if (!$this->checkStandardConformingStringsSuccess()) {
+      // First try to alter the database. If it fails, raise an error telling
+      // the user to do it themselves.
+      $connection_options = $database_connection->getConnectionOptions();
+      // It is safe to include the database name directly here, because this
+      // code is only called when a connection to the database is already
+      // established, thus the database name is guaranteed to be a correct
+      // value.
+      $query = "ALTER DATABASE \"" . $connection_options['database'] . "\" SET standard_conforming_strings = 'on';";
+      try {
+        db_query($query);
+      }
+      catch (\Exception $e) {
+        // Ignore possible errors when the user doesn't have the necessary
+        // privileges to ALTER the database.
+      }
+
+      // Close the database connection so that the configuration parameter
+      // is applied to the current connection.
+      db_close();
+
+      // Recheck, if it fails, finally just rely on the end user to do the
+      // right thing.
+      if (!$this->checkStandardConformingStringsSuccess()) {
+        $replacements = array(
+          '%setting' => 'standard_conforming_strings',
+          '%current_value' => 'off',
+          '%needed_value' => 'on',
+          '!query' => "<code>" . $query . "</code>",
+        );
+        $this->fail(t("The %setting setting is currently set to '%current_value', but needs to be '%needed_value'. Change this by running the following query: !query", $replacements));
+      }
+    }
+  }
+
+  /**
+   * Verify that a binary data roundtrip returns the original string.
+   */
+  protected function checkStandardConformingStringsSuccess() {
+    $standard_conforming_strings = db_query("SHOW standard_conforming_strings")->fetchField();
+    return ($standard_conforming_strings == 'on');
+  }
+
+  /**
    * Make PostgreSQL Drupal friendly.
    */
   function initializeDatabase() {
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
index 7e1e0b7..40db31a 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
@@ -723,23 +723,7 @@ public function changeField($table, $field, $field_new, $spec, $new_keys = array
     $this->fieldSetNoDefault($table, $field);
 
     // Convert field type.
-    // Usually, we do this via a simple typecast 'USING fieldname::type'. But
-    // the typecast does not work for conversions to bytea.
-    // @see http://www.postgresql.org/docs/current/static/datatype-binary.html
-    if ($spec['pgsql_type'] != 'bytea') {
-      $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $field_def . ' USING "' . $field . '"::' . $field_def);
-    }
-    else {
-      // Do not attempt to convert a field that is bytea already.
-      $table_information = $this->queryTableInformation($table);
-      if (!in_array($field, $table_information->blob_fields)) {
-        // Convert to a bytea type by using the SQL replace() function to
-        // convert any single backslashes in the field content to double
-        // backslashes ('\' to '\\').
-        $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $field_def . ' USING decode(replace("' . $field . '"' . ", '\\', '\\\\'), 'escape');");
-      }
-    }
-
+    $this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $field_def . ' USING "' . $field . '"::' . $field_def);
     if (isset($spec['not null'])) {
       if ($spec['not null']) {
         $nullaction = 'SET NOT NULL';
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 86365a9..0170487 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -1183,26 +1183,6 @@ function system_update_8001(&$sandbox = NULL) {
   if ($schema->tableExists('menu_tree')) {
 
     if (!isset($sandbox['current'])) {
-      // Converting directly to blob can cause problems with reading out and
-      // serializing the string data later on postgres, so rename the existing
-      // columns and create replacement ones to hold the serialized objects.
-      $old_fields = array(
-        'title' => array(
-          'description' => 'The text displayed for the link.',
-          'type' => 'varchar',
-          'length' => 255,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'description' => array(
-          'description' => 'The description of this link - used for admin pages and title attribute.',
-          'type' => 'text',
-          'not null' => FALSE,
-        ),
-      );
-      foreach ($old_fields as $name => $spec) {
-        $schema->changeField('menu_tree', $name, 'system_update_8001_' . $name, $spec);
-      }
       $spec = array(
         'description' => 'The title for the link. May be a serialized TranslationWrapper.',
         'type' => 'blob',
@@ -1210,7 +1190,7 @@ function system_update_8001(&$sandbox = NULL) {
         'not null' => FALSE,
         'serialize' => TRUE,
       );
-      $schema->addField('menu_tree', 'title', $spec);
+      $schema->changeField('menu_tree', 'title', 'title', $spec);
       $spec = array(
         'description' => 'The description of this link - used for admin pages and title attribute.',
         'type' => 'blob',
@@ -1218,14 +1198,14 @@ function system_update_8001(&$sandbox = NULL) {
         'not null' => FALSE,
         'serialize' => TRUE,
       );
-      $schema->addField('menu_tree', 'description', $spec);
+      $schema->changeField('menu_tree', 'description', 'description', $spec);
 
       $sandbox['current'] = 0;
       $sandbox['max'] = $database->query('SELECT COUNT(mlid) FROM {menu_tree}')
         ->fetchField();
     }
 
-    $menu_links = $database->queryRange('SELECT mlid, system_update_8001_title AS title, system_update_8001_description AS description FROM {menu_tree} ORDER BY mlid ASC', $sandbox['current'], $sandbox['current'] + 50)
+    $menu_links = $database->queryRange('SELECT mlid, title, description FROM {menu_tree} ORDER BY mlid ASC', $sandbox['current'], $sandbox['current'] + 50)
       ->fetchAllAssoc('mlid');
 
     foreach ($menu_links as $menu_link) {
@@ -1246,10 +1226,8 @@ function system_update_8001(&$sandbox = NULL) {
 
     if ($sandbox['#finished'] >= 1) {
       // Drop unnecessary fields from {menu_tree}.
-      $schema->dropField('menu_tree', 'system_update_8001_title');
       $schema->dropField('menu_tree', 'title_arguments');
       $schema->dropField('menu_tree', 'title_context');
-      $schema->dropField('menu_tree', 'system_update_8001_description');
     }
     return t('Menu links converted');
   }
