diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
index 5dec0a8..597df9b 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
@@ -70,10 +70,21 @@ public function __construct(\PDO $connection, array $connection_options) {
     // Force PostgreSQL to use the UTF-8 character set by default.
     $this->connection->exec("SET NAMES 'UTF8'");
 
+    // Set PostgreSQL init_commands if not already defined.
+    $connection_options += array(
+      'init_commands' => array(),
+    );
+
+    $connection_options['init_commands'] += array(
+      // Set standard_conforming_strings to off so as to treat backslashes as
+      // escape characters, complying with historical PostgreSQL behavior. In
+      // PostgreSQL 9.1 and up this is on by default, however Drupal still
+      // assumes this to be off.
+      'standard_conforming_strings' => 'SET standard_conforming_strings = off',
+    );
+
     // Execute PostgreSQL init_commands.
-    if (isset($connection_options['init_commands'])) {
-      $this->connection->exec(implode('; ', $connection_options['init_commands']));
-    }
+    $this->connection->exec(implode('; ', $connection_options['init_commands']));
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
index 06b7540..7142107 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php
@@ -708,23 +708,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 ce06b7a..ff14b82 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -1162,6 +1162,26 @@ function system_update_8001(&$sandbox = NULL) {
   if ($schema->tableExists('menu_tree')) {
 
     if (!isset($sandbox['current'])) {
+      // Converting directly to blob causes problems with reading out and
+      // searlizing the 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',
@@ -1169,7 +1189,7 @@ function system_update_8001(&$sandbox = NULL) {
         'not null' => FALSE,
         'serialize' => TRUE,
       );
-      $schema->changeField('menu_tree', 'title', 'title', $spec);
+      $schema->addField('menu_tree', 'title', $spec);
       $spec = array(
         'description' => 'The description of this link - used for admin pages and title attribute.',
         'type' => 'blob',
@@ -1177,14 +1197,14 @@ function system_update_8001(&$sandbox = NULL) {
         'not null' => FALSE,
         'serialize' => TRUE,
       );
-      $schema->changeField('menu_tree', 'description', 'description', $spec);
+      $schema->addField('menu_tree', 'description', $spec);
 
       $sandbox['current'] = 0;
       $sandbox['max'] = $database->query('SELECT COUNT(mlid) FROM {menu_tree}')
         ->fetchField();
     }
 
-    $menu_links = $database->queryRange('SELECT mlid, title, description FROM {menu_tree} ORDER BY mlid ASC', $sandbox['current'], $sandbox['current'] + 50)
+    $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)
       ->fetchAllAssoc('mlid');
 
     foreach ($menu_links as $menu_link) {
@@ -1205,8 +1225,10 @@ 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');
   }
